26class FSI :
public NonLinearProblem<SC,LO,GO,NO> {
30 typedef typename Problem_Type::Matrix_Type Matrix_Type;
31 typedef typename Problem_Type::MatrixPtr_Type MatrixPtr_Type;
33 typedef typename Problem_Type::BlockMatrix_Type BlockMatrix_Type;
34 typedef typename Problem_Type::BlockMatrixPtr_Type BlockMatrixPtr_Type;
36 typedef typename Problem_Type::MultiVector_Type MultiVector_Type;
37 typedef typename Problem_Type::MultiVectorPtr_Type MultiVectorPtr_Type;
38 typedef typename Problem_Type::MultiVectorConstPtr_Type MultiVectorConstPtr_Type;
39 typedef typename Problem_Type::BlockMultiVector_Type BlockMultiVector_Type;
40 typedef typename Problem_Type::BlockMultiVectorPtr_Type BlockMultiVectorPtr_Type;
42 typedef typename Problem_Type::Domain_Type Domain_Type;
43 typedef Teuchos::RCP<Domain_Type > DomainPtr_Type;
44 typedef typename Problem_Type::DomainConstPtr_Type DomainConstPtr_Type;
46 typedef typename Problem_Type::Domain_Type::Mesh_Type Mesh_Type;
47 typedef typename Problem_Type::Domain_Type::MeshPtr_Type MeshPtr_Type;
49 typedef typename Problem_Type::CommConstPtr_Type CommConstPtr_Type;
51 typedef NonLinearProblem<SC,LO,GO,NO> NonLinearProblem_Type;
53 typedef typename NonLinearProblem_Type::BlockMultiVectorPtrArray_Type BlockMultiVectorPtrArray_Type;
56 typedef Teuchos::RCP<TimeProblem_Type> TimeProblemPtr_Type;
63 typedef Teuchos::RCP<FluidProblem_Type> FluidProblemPtr_Type;
64 typedef Teuchos::RCP<StructureProblem_Type> StructureProblemPtr_Type;
65 typedef Teuchos::RCP<StructureNonLinProblem_Type> StructureNonLinProblemPtr_Type;
66 typedef Teuchos::RCP<GeometryProblem_Type> GeometryProblemPtr_Type;
68 typedef typename Problem_Type::MapConstPtr_Type MapConstPtr_Type;
70 typedef typename Problem_Type::BC_Type BC_Type;
71 typedef typename Teuchos::RCP<BC_Type> BCPtr_Type;
74 typedef Teuchos::RCP<MeshUnstr_Type> MeshUnstrPtr_Type;
77 typedef Teuchos::RCP<Exporter_Type> ExporterPtr_Type;
78 typedef Teuchos::RCP<ExporterTxt> ExporterTxtPtr_Type;
80 typedef std::vector<GO> vec_GO_Type;
81 typedef std::vector<vec_GO_Type> vec2D_GO_Type;
82 typedef std::vector<vec2D_GO_Type> vec3D_GO_Type;
83 typedef Teuchos::RCP<vec3D_GO_Type> vec3D_GO_ptr_Type;
87 FSI(
const DomainConstPtr_Type &domainVelocity, std::string FETypeVelocity,
88 const DomainConstPtr_Type &domainPressure, std::string FETypePressure,
89 const DomainConstPtr_Type &domainStructure, std::string FETypeStructure,
90 const DomainConstPtr_Type &domainInterface, std::string FETypeInterface,
91 const DomainConstPtr_Type &domainGeometry, std::string FETypeGeometry,
92 ParameterListPtr_Type parameterListFluid, ParameterListPtr_Type parameterListStructure,
93 ParameterListPtr_Type parameterListFSI, ParameterListPtr_Type parameterListGeometry,
100 virtual void assemble( std::string type =
"" )
const;
104 void reAssemble( std::string type )
const;
112 virtual void reAssemble( BlockMultiVectorPtr_Type previousSolution )
const{};
114 virtual void reAssembleExtrapolation(BlockMultiVectorPtrArray_Type previousSolutions);
116 virtual void calculateNonLinResidualVec(std::string type=
"standard",
double time=0.)
const;
118 virtual void getValuesOfInterest( vec_dbl_Type& values );
121 void setFromPartialVectorsInit()
const;
124 void updateMeshDisplacement()
const;
127 void solveGeometryProblem()
const;
134 void setFluidMassmatrix(MatrixPtr_Type& massmatrix)
const;
138 void computeFluidRHSInTime( )
const;
141 void updateFluidInTime()
const;
146 void setSolidMassmatrix( MatrixPtr_Type& massmatrix )
const;
148 void computeSolidRHSInTime()
const;
151 void updateTime()
const;
154 void moveMesh()
const;
157 void addInterfaceBlockRHS()
const;
160 void setupSubTimeProblems(ParameterListPtr_Type parameterListFluid, ParameterListPtr_Type parameterListStructure)
const;
162 FluidProblemPtr_Type getFluidProblem(){
163 return problemFluid_;
166 StructureProblemPtr_Type getStructureProblem(){
167 return problemStructure_;
170 StructureNonLinProblemPtr_Type getNonLinStructureProblem(){
171 return problemStructureNonLin_;
174 GeometryProblemPtr_Type getGeometryProblem(){
175 return problemGeometry_;
180 void toNodeID(UN dim, GO dofID, GO& nodeID, LO& localDofNumber )
const
182 nodeID = (GO) (dofID/dim);
183 localDofNumber = (LO) (dofID%dim);
187 void toDofID(UN dim, GO nodeID, LO localDofNumber, GO& dofID)
const
189 dofID = (GO) ( dim * nodeID + localDofNumber);
192 void findDisplacementTurek2DBenchmark();
194 void findDisplacementRichter3DBenchmark();
196 void getValuesOfInterest2DBenchmark( vec_dbl_Type& values );
198 void getValuesOfInterest3DBenchmark( vec_dbl_Type& values );
200 virtual void computeValuesOfInterestAndExport();
205 MultiVectorPtr_Type meshDisplacementOld_rep_;
206 MultiVectorPtr_Type meshDisplacementNew_rep_;
207 MultiVectorPtr_Type u_rep_;
208 MultiVectorPtr_Type w_rep_;
209 MultiVectorPtr_Type u_minus_w_rep_;
210 MultiVectorPtr_Type p_rep_;
212 mutable MatrixPtr_Type C2_;
214 mutable MatrixPtr_Type P_;
215 mutable int counterP;
217 FluidProblemPtr_Type problemFluid_;
218 StructureProblemPtr_Type problemStructure_;
219 StructureNonLinProblemPtr_Type problemStructureNonLin_;
220 GeometryProblemPtr_Type problemGeometry_;
223 mutable TimeProblemPtr_Type problemTimeFluid_;
224 mutable TimeProblemPtr_Type problemTimeStructure_;
226 Teuchos::RCP<SmallMatrix<int>> defTS_;
227 mutable Teuchos::RCP<TimeSteppingTools> timeSteppingTool_;
230 std::string materialModel_;
231 vec_dbl_Type valuesForExport_;
232 bool geometryExplicit_;
233 ExporterTxtPtr_Type exporterTxtDrag_;
234 ExporterTxtPtr_Type exporterTxtLift_;
235 mutable ExporterPtr_Type exporterGeo_;
258 virtual void evalModelImpl(
259 const ::Thyra::ModelEvaluatorBase::InArgs<SC> &inArgs,
260 const ::Thyra::ModelEvaluatorBase::OutArgs<SC> &outArgs