39 #ifndef MONOLITHICBLOCKCOMPOSED_H 40 #define MONOLITHICBLOCKCOMPOSED_H 1
42 #include <lifev/core/LifeV.hpp> 43 #include <Epetra_Operator.h> 44 #include <lifev/core/algorithm/ComposedOperator.hpp> 45 #include <lifev/fsi/solver/MonolithicBlock.hpp> 47 #include <boost/scoped_ptr.hpp> 67 class MonolithicBlockComposed :
public MonolithicBlock
71 enum Block { solid, fluid, mesh };
75 typedef MonolithicBlock super_Type;
76 typedef super_Type::fespacePtr_Type fespacePtr_Type;
77 typedef ComposedOperator<Epetra_Operator> operatorPtr_Type;
89 MonolithicBlockComposed (
const std::vector<Int>& flags,
const std::vector<Int>& order) :
91 M_recompute (order.size() ),
93 M_couplingFlags (
new std::vector<Int> (flags) ),
94 M_blockReordering (
new std::vector<Int> (order) )
98 ~MonolithicBlockComposed() {}
111 virtual int solveSystem (
const vector_Type& rhs, vector_Type& step, solverPtr_Type& linearSolver) = 0;
118 virtual void setDataFromGetPot (
const GetPot& data,
const std::string& section) = 0;
124 virtual bool set() = 0;
135 void GlobalAssemble();
141 virtual void blockAssembling();
159 void coupler (mapPtr_Type& map,
160 const std::map<ID, ID>& locDofMap,
161 const vectorPtr_Type& numerationInterface,
162 const Real& timeStep,
163 const Real& coefficient,
164 const Real& rescaleFactor,
175 virtual void push_back_matrix (
const matrixPtr_Type& Mat,
const bool recompute);
183 virtual void push_back_oper ( MonolithicBlockComposed& Oper);
190 virtual void push_back_coupling ( matrixPtr_Type& coupling);
198 virtual void replace_matrix (
const matrixPtr_Type& oper,
UInt position );
207 virtual void replace_coupling (
const matrixPtr_Type& Mat,
UInt index);
215 virtual void addToCoupling (
const matrixPtr_Type& Mat,
UInt position);
224 void addToCoupling (
const Real& entry ,
UInt row,
UInt col,
UInt position );
231 const std::vector<
bool>& recompute()
237 const std::vector<matrixPtr_Type>& couplingVector()
const 248 void setRecompute (
UInt position,
bool flag )
250 M_recompute[position] = flag;
253 const UInt whereIsBlock (
UInt position )
const;
265 void blockAssembling (
const UInt k);
274 virtual void swap (
const UInt i,
const UInt j);
281 std::vector<
bool> M_recompute;
283 std::vector<matrixPtr_Type> M_coupling;
292 std::unique_ptr<std::vector<Int> > M_couplingFlags;
299 std::unique_ptr<std::vector<Int> > M_blockReordering;
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
double Real
Generic real data.
uint32_type UInt
generic unsigned integer (used mainly for addressing)