49 #define __FSISolver_H 1
52 #include <Epetra_ConfigDefs.h> 54 #include <Epetra_MpiComm.h> 56 #include <Epetra_SerialComm.h> 60 #include <lifev/core/LifeV.hpp> 64 #include <lifev/fsi/solver/FSIOperator.hpp> 100 typedef FSIOperator FSIOper_Type;
101 typedef std::shared_ptr<FSIOper_Type> FSIOperPtr_Type;
103 typedef FSIOperator::mesh_Type mesh_Type;
105 typedef FSIOperator::fluid_Type fluid_Type;
106 typedef FSIOperator::solid_Type solid_Type;
108 typedef fluid_Type::function_Type fluidFunction_Type;
109 typedef solid_Type::function solidFunction_Type;
111 typedef fluid_Type::source_Type fluidSource_Type;
112 typedef solid_Type::source_Type solidSource_Type;
114 typedef FSIOperator::fluidBchandlerPtr_Type fluidBchandlerPtr_Type;
115 typedef FSIOperator::solidBchandlerPtr_Type solidBchandlerPtr_Type;
117 typedef FSIOperator::fluidBchandler_Type fluidBchandler_Type;
118 typedef FSIOperator::solidBchandler_Type solidBchandler_Type;
120 typedef fluid_Type::data_Type fluidData_Type;
121 typedef solid_Type::data_Type solidData_Type;
123 typedef FSIOperator::dataPtr_Type dataPtr_Type;
125 typedef FSIOperator::vector_Type vector_Type;
126 typedef FSIOperator::vectorPtr_Type vectorPtr_Type;
144 virtual ~FSISolver() {}
155 FSIOperPtr_Type
const& FSIOper()
const 164 if ( M_epetraWorldComm->MyPID() == 0 )
166 std::cerr << std::endl <<
"Warning: FSISolver::displacement() is deprecated!" << std::endl
167 <<
" You should not access the solution inside FSISolver or FSIOperator!" << std::endl;
170 return M_oper->solution();
184 return M_oper->isFluid();
188 return M_oper->isSolid();
199 void setSourceTerms (
const fluidSource_Type& fluidSource,
200 const solidSource_Type& solidSource );
208 void setFluidBC (
const fluidBchandlerPtr_Type& bc_fluid );
209 void setLinFluidBC (
const fluidBchandlerPtr_Type& bc_dfluid );
210 void setInvLinFluidBC (
const fluidBchandlerPtr_Type& bc_dfluid_inv );
211 void setHarmonicExtensionBC (
const fluidBchandlerPtr_Type& bc_he );
212 void setSolidBC (
const solidBchandlerPtr_Type& bc_solid );
213 void setLinSolidBC (
const solidBchandlerPtr_Type& bc_dsolid );
214 void setInvLinSolidBC (
const solidBchandlerPtr_Type& bc_dsolid_inv );
216 void setFluxBC (
const fluidBchandlerPtr_Type& bc_fluid);
218 void setRobinBC (
const fluidBchandlerPtr_Type& bc_fluid);
228 void setData (
const dataPtr_Type& data );
233 virtual void initialize (std::vector<vectorPtr_Type> u0 = std::vector<vectorPtr_Type> (0), std::vector<vectorPtr_Type> ds0 = std::vector<vectorPtr_Type> (0), std::vector<vectorPtr_Type> df0 = std::vector<vectorPtr_Type> (0) );
235 virtual void initializeMonolithicOperator (std::vector<vectorPtr_Type> u0 = std::vector<vectorPtr_Type> (0), std::vector<vectorPtr_Type> ds0 = std::vector<vectorPtr_Type> (0), std::vector<vectorPtr_Type> df0 = std::vector<vectorPtr_Type> (0) );
239 void iterate ( vectorPtr_Type& solution );
246 FSISolver ( FSISolver
const& );
249 FSISolver& operator= ( FSISolver
const& );
252 FSIOperPtr_Type M_oper;
256 std::shared_ptr<MapEpetra> M_fluidInterfaceMap;
257 std::shared_ptr<MapEpetra> M_solidInterfaceMap;
259 std::shared_ptr<Epetra_MpiComm> M_epetraComm;
260 std::shared_ptr<Epetra_MpiComm> M_epetraWorldComm;
261 std::shared_ptr<MPI_Comm> M_localComm;
262 std::shared_ptr<MPI_Comm> M_interComm;
264 std::ofstream M_out_iter;
265 std::ofstream M_out_res;
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
#define LIFEV_DEPRECATED(func)