LifeV
MonolithicRobinInterface.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 #include <lifev/core/LifeV.hpp>
28 
29 #include <lifev/fsi/solver/MonolithicRobinInterface.hpp>
30 
31 namespace LifeV
32 {
33 
34 // ===================================================
35 // Public Methods
36 // ===================================================
37 void MonolithicRobinInterface::setRobinData (const GetPot& data, const std::string& section)
38 {
39  M_alphas = data ( (section + "/alphas").data(), 0.);
40  M_alphaf = data ( (section + "/alphaf").data(), 0.);
41 }
42 
43 void MonolithicRobinInterface::applyRobinCoupling ( std::vector<MonolithicBlock::matrixPtr_Type> blockVector)
44 {
45  M_robinPart.reset (new MonolithicBlock::matrix_Type (M_robinCoupling->map(), 0) );
46 
47  for ( UInt ITBlock = 0; ITBlock < blockVector.size(); ++ITBlock )
48  {
49  applyRobinCoupling ( blockVector[ITBlock] );
50  }
51 }
52 
53 
54 
55 // ===================================================
56 // Protected Methods
57 // ===================================================
58 void MonolithicRobinInterface::applyRobinCoupling ( MonolithicBlock::matrixPtr_Type block)
59 {
60  MonolithicBlock::matrixPtr_Type tmpMatrix (new MonolithicBlock::matrix_Type (M_robinCoupling->map(), 0) );
61  Int err = EpetraExt::MatrixMatrix::Multiply ( *M_robinCoupling->matrixPtr(), false, *block->matrixPtr(), false, *tmpMatrix->matrixPtr() );
62  ASSERT (!err, "Error in multiplication");
63  tmpMatrix->globalAssemble();
64  *M_robinPart += *tmpMatrix;
65 }
66 
67 } // Namespace LifeV
int32_type Int
Generic integer data.
Definition: LifeV.hpp:188
void updateInverseJacobian(const UInt &iQuadPt)
#define ASSERT(X, A)
Definition: LifeAssert.hpp:90