37 #ifndef BCInterfaceFunctionSolverDefinedFSI3D_H 38 #define BCInterfaceFunctionSolverDefinedFSI3D_H 1
41 #include <lifev/fsi/solver/FSIExactJacobian.hpp> 42 #include <lifev/fsi/solver/FSIFixedPoint.hpp> 44 #include <lifev/fsi/solver/FSIMonolithicGE.hpp> 45 #include <lifev/fsi/solver/FSIMonolithicGI.hpp> 48 #include <lifev/bc_interface/3D/bc/BCInterfaceData3D.hpp> 49 #include <lifev/bc_interface/core/function/BCInterfaceFunctionSolverDefined.hpp> 90 class BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >
143 template<
class BCBaseType >
180 baseContainer_Type
baseType()
const;
191 BCInterfaceFunctionSolverDefined&
operator= (
const BCInterfaceFunctionSolverDefined& function );
199 template<
class MethodType >
202 template<
class MethodType >
205 template<
class MethodType >
255 template<
class BCBaseType >
257 BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::
assignFunction ( BCBaseType& base )
260 std::map< std::string, FSIMethod > mapMethod;
262 mapMethod[
"exactJacobian"] = EXACTJACOBIAN;
263 mapMethod[
"fixedPoint"] = FIXEDPOINT;
264 mapMethod[
"monolithicGE"] = MONOLITHIC_GE;
265 mapMethod[
"monolithicGI"] = MONOLITHIC_GI;
267 switch ( mapMethod[M_physicalSolver->data().method()] )
271 #ifdef HAVE_LIFEV_DEBUG 272 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkMethod exactJacobian" <<
"\n";
275 checkFunction< FSIExactJacobian > ( base );
281 #ifdef HAVE_LIFEV_DEBUG 282 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkMethod fixedPoint" <<
"\n";
285 checkFunction< FSIFixedPoint > ( base );
291 #ifdef HAVE_LIFEV_DEBUG 292 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkMethod monolithicGE" <<
"\n";
295 checkFunction< FSIMonolithicGE > ( base );
301 #ifdef HAVE_LIFEV_DEBUG 302 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkMethod monolithicGI" <<
"\n";
305 checkFunction< FSIMonolithicGI > ( base );
311 std::cout <<
" !!! Warning:" << mapMethod[M_physicalSolver->data().method()] <<
" not assigned !!!" << std::endl;
321 template<
class MethodType >
322 inline void BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::
checkFunction ( BCVectorInterface& base )
324 std::shared_ptr< MethodType > operMethod = std::dynamic_pointer_cast< MethodType > ( M_physicalSolver );
330 #ifdef HAVE_LIFEV_DEBUG 331 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction DerFluidLoadToFluid" <<
"\n";
338 #ifdef HAVE_LIFEV_DEBUG 339 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction DerFluidLoadToStructure" <<
"\n";
341 if ( !operMethod->isSolid() )
346 operMethod->setDerFluidLoadToStructure ( operMethod->sigmaSolidRepeated() );
348 base = *operMethod->bcvDerFluidLoadToStructure();
354 #ifdef HAVE_LIFEV_DEBUG 355 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction DerHarmonicExtensionVelToFluid" <<
"\n";
358 if ( !operMethod->isFluid() )
363 operMethod->setDerHarmonicExtensionVelToFluid ( operMethod->derVeloFluidMesh() );
365 base = *operMethod->bcvDerHarmonicExtensionVelToFluid();
371 #ifdef HAVE_LIFEV_DEBUG 372 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction DerStructureDispToSolid" <<
"\n";
379 #ifdef HAVE_LIFEV_DEBUG 380 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction FluidInterfaceDisp" <<
"\n";
391 #ifdef HAVE_LIFEV_DEBUG 392 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction FluidLoadToStructure" <<
"\n";
395 if ( !operMethod->isSolid() )
400 operMethod->setFluidLoadToStructure ( operMethod->sigmaSolidRepeated() );
402 base = *operMethod->bcvFluidLoadToStructure();
408 #ifdef HAVE_LIFEV_DEBUG 409 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction HarmonicExtensionVelToFluid" <<
"\n";
412 if ( !operMethod->isFluid() )
417 operMethod->setHarmonicExtensionVelToFluid ( operMethod->veloFluidMesh() );
419 base = *operMethod->bcvHarmonicExtensionVelToFluid();
425 #ifdef HAVE_LIFEV_DEBUG 426 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction SolidLoadToStructure" <<
"\n";
428 if ( !operMethod->isFluid() )
433 operMethod->setSolidLoadToStructure ( operMethod->minusSigmaFluidRepeated() );
435 base = *operMethod->bcvSolidLoadToStructure();
441 #ifdef HAVE_LIFEV_DEBUG 442 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction StructureDispToHarmonicExtension" <<
"\n";
445 if ( !operMethod->isFluid() )
450 operMethod->setStructureDispToHarmonicExtension ( operMethod->lambdaFluidRepeated() );
452 base = *operMethod->bcvStructureDispToHarmonicExtension();
458 #ifdef HAVE_LIFEV_DEBUG 459 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction StructureDispToSolid" <<
"\n";
466 #ifdef HAVE_LIFEV_DEBUG 467 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction StructureToFluid" <<
"\n";
470 if ( !operMethod->isFluid() )
475 operMethod->setStructureToFluid ( operMethod->veloFluidMesh() );
476 operMethod->setStructureToFluidParameters();
478 base = *operMethod->bcvStructureToFluid();
484 std::cout <<
" !!! Error: " << M_FSIFunction <<
" is not available as a BCVectorInterface !!!" << std::endl;
490 template<
class MethodType >
491 inline void BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::
checkFunction ( BCVector& base )
493 std::shared_ptr< MethodType > operMethod = std::dynamic_pointer_cast< MethodType > ( M_physicalSolver );
499 #ifdef HAVE_LIFEV_DEBUG 500 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::checkFunction RobinWall" <<
"\n";
503 if ( !operMethod->isSolid() )
509 M_robinRHS.reset (
new physicalSolver_Type::vector_Type ( operMethod->dFESpace().map(), Repeated, Zero ) );
510 M_robinAlphaCoefficient.reset (
new physicalSolver_Type::vector_Type ( operMethod->dFESpace().map(), Repeated, Zero ) );
511 M_robinBetaCoefficient.reset (
new physicalSolver_Type::vector_Type ( operMethod->dFESpace().map(), Repeated, Zero ) );
514 base.setRhsVector ( *M_robinRHS, operMethod->dFESpace().dof().numTotalDof(), 0 );
515 base.setRobinCoeffVector ( *M_robinAlphaCoefficient );
516 base.setBetaCoeffVector ( *M_robinBetaCoefficient );
519 for ( UInt i ( 0 ); i < M_vectorFunctionRobin.size(); ++i )
521 functionParserSolverPtr_Type castedFunctionSolver = std::dynamic_pointer_cast< functionParserSolver_Type > ( M_vectorFunctionRobin[i] );
523 if ( castedFunctionSolver != 0 )
525 castedFunctionSolver->setPhysicalSolver ( M_physicalSolver );
533 std::cout <<
" !!! Error: " << M_FSIFunction <<
" is not available as a BCVector !!!" << std::endl;
539 template<
class MethodType >
540 inline void BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::
checkFunction ( BCFunctionBase& )
542 std::shared_ptr< MethodType > operMethod = std::dynamic_pointer_cast< MethodType > ( M_physicalSolver );
548 std::cout <<
" !!! Error: " << M_FSIFunction <<
" is not available as a BCFunction !!!" << std::endl;
baseContainer_Type baseType() const
Detect the correct base type.
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
std::shared_ptr< data_Type > dataPtr_Type
FSIOperator::vectorPtr_Type M_robinBetaCoefficient
void checkFunction(BCVector &base)
void setPhysicalSolver(const physicalSolverPtr_Type &physicalSolver)
Set the physical solver.
void checkFunction(BCFunctionBase &base)
FSIOperator physicalSolver_Type
std::vector< bcFunctionPtr_Type > vectorFunction_Type
BCInterfaceFunctionSolverDefined()
Constructor.
virtual ~BCInterfaceFunctionSolverDefined()
Destructor.
BCInterfaceFunction< bcHandler_Type, physicalSolver_Type > bcFunction_Type
BCInterfaceFunctionSolverDefined(const BCInterfaceFunctionSolverDefined &function)
BCInterfaceData3D data_Type
void assignFunction(BCBaseType &base)
Assign a boundary function to the boundary condition vector base.
BCInterfaceFunctionParserSolver< bcHandler_Type, physicalSolver_Type > functionParserSolver_Type
std::shared_ptr< bcHandler_Type > bcHandlerPtr_Type
std::shared_ptr< functionParserSolver_Type > functionParserSolverPtr_Type
FSIOperator::vectorPtr_Type M_robinAlphaCoefficient
void checkFunction(BCVectorInterface &base)
BCInterfaceFactory< bcHandler_Type, physicalSolver_Type > factory_Type
bcComponentsVec_Type M_componentsVector
FSIOperator::vectorPtr_Type M_robinRHS
BCInterfaceFunctionSolverDefined & operator=(const BCInterfaceFunctionSolverDefined &function)
void setData(const dataPtr_Type &data)
Set data.
void exportData(dataPtr_Type &data)
Copy the stored parameters in the data container.
std::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type
vectorFunction_Type M_vectorFunctionRobin
void updatePhysicalSolverVariables()
Update the solver variables.
FSIFunction M_FSIFunction
std::shared_ptr< bcFunction_Type > bcFunctionPtr_Type
physicalSolverPtr_Type M_physicalSolver