27 #include <lifev/core/LifeV.hpp> 29 #include <lifev/fsi/solver/MonolithicBlockComposedDNND.hpp> 39 void MonolithicBlockComposedDNND::coupler (mapPtr_Type& map,
40 const std::map<ID, ID>& locDofMap,
41 const vectorPtr_Type& numerationInterface,
43 const Real& coefficient,
44 const Real& rescaleFactor)
46 UInt totalDofs = map->map (Unique)->NumGlobalElements();
47 UInt fluidSolid = M_offset[0] + M_FESpace[0]->map().map (Unique)->NumGlobalElements();
49 for (
ID k = 0; k < 2; ++k)
51 M_blocks[k]->globalAssemble();
52 matrixPtr_Type block (
new matrix_Type (*M_blocks[k]) );
53 M_blocks.push_back (block);
54 M_bch.push_back (M_bch[k]);
55 M_FESpace.push_back (M_FESpace[k]);
56 M_offset.push_back (M_offset[k]);
57 M_recompute[2 + k] = (M_recompute[k]);
58 M_blockReordering->push_back ( (*M_blockReordering) [k]);
63 matrixPtr_Type coupling (
new matrix_Type (*map) );
66 coupling.reset (
new matrix_Type (*map, 0) );
67 coupling->insertValueDiagonal (one, M_offset[fluid], M_offset[solid] );
68 coupling->insertValueDiagonal (one, fluidSolid, totalDofs);
69 couplingMatrix (coupling, (*M_couplingFlags) [0], M_FESpace, M_offset, locDofMap, numerationInterface, timeStep, 2., coefficient, rescaleFactor);
70 M_coupling.push_back (coupling);
72 coupling.reset (
new matrix_Type (*map, 0) );
73 coupling->insertValueDiagonal ( one, M_FESpace[solid]->map() , M_offset[solid] );
74 coupling->insertValueDiagonal (one, fluidSolid, totalDofs);
75 couplingMatrix (coupling, (*M_couplingFlags) [1], M_FESpace, M_offset, locDofMap, numerationInterface, timeStep, 4., coefficient, rescaleFactor);
76 couplingMatrix (coupling, (*M_couplingFlags) [2], M_FESpace, M_offset, locDofMap, numerationInterface, timeStep, 2., coefficient, rescaleFactor);
77 M_coupling.push_back (coupling);
79 coupling.reset (
new matrix_Type ( *map, 0 ) );
80 coupling->insertValueDiagonal ( one, M_offset[fluid], M_offset[solid] );
81 coupling->insertValueDiagonal ( -1, fluidSolid, totalDofs );
82 couplingMatrix ( coupling, (*M_couplingFlags) [3], M_FESpace, M_offset, locDofMap, numerationInterface, timeStep, 2., coefficient, rescaleFactor );
83 couplingMatrix ( coupling, (*M_couplingFlags) [4], M_FESpace, M_offset, locDofMap, numerationInterface, timeStep, 4., coefficient, rescaleFactor );
84 M_coupling.push_back ( coupling );
86 coupling.reset (
new matrix_Type ( *map, 0 ) );
87 coupling->insertValueDiagonal ( one, M_FESpace[solid]->map(), M_offset[solid] );
88 coupling->insertValueDiagonal ( one, fluidSolid, totalDofs );
89 couplingMatrix ( coupling, (*M_couplingFlags) [5], M_FESpace, M_offset, locDofMap, numerationInterface, timeStep, 2., coefficient, rescaleFactor );
90 M_coupling.push_back ( coupling );
92 M_prec.resize (M_blocks.size() );
void updateInverseJacobian(const UInt &iQuadPt)
double Real
Generic real data.
uint32_type UInt
generic unsigned integer (used mainly for addressing)