37 #include <lifev/bc_interface/3D/function/fsi/BCInterfaceFunctionSolverDefinedFSI3D.hpp> 59 #ifdef HAVE_LIFEV_DEBUG 60 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::BCInterfaceFunctionSolverDefined()" <<
"\n";
72 #ifdef HAVE_LIFEV_DEBUG 73 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::exportData" <<
"\n";
76 data->setName ( M_name );
77 data->setFlag ( M_flag );
78 data->setType ( M_type );
79 data->setMode ( M_mode );
80 data->setComponentsVector ( M_componentsVector );
87 #ifdef HAVE_LIFEV_DEBUG 88 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::updatePhysicalSolverVariables" <<
"\n";
95 if ( !M_physicalSolver->isSolid() )
101 for ( UInt i ( 0 ); i < M_vectorFunctionRobin.size(); ++i )
103 functionParserSolverPtr_Type castedFunctionSolver = std::dynamic_pointer_cast< functionParserSolver_Type > ( M_vectorFunctionRobin[i] );
105 if ( castedFunctionSolver != 0 )
107 castedFunctionSolver->updatePhysicalSolverVariables();
115 Real t ( M_physicalSolver->dataSolid()->dataTime()->time() );
116 Real timeStep ( M_physicalSolver->dataSolid()->dataTime()->timeStep() );
118 Int verticesGlobalNumber ( M_physicalSolver->solidLocalMesh().numGlobalVertices() );
119 for ( UInt i (0) ; i < M_physicalSolver->solidLocalMesh().numVertices() ; ++i )
121 gid = M_physicalSolver->solidLocalMesh().meshTransformer().pointInitial ( i ).id();
123 x = M_physicalSolver->solidLocalMesh().meshTransformer().pointInitial ( i ).x();
124 y = M_physicalSolver->solidLocalMesh().meshTransformer().pointInitial ( i ).y();
125 z = M_physicalSolver->solidLocalMesh().meshTransformer().pointInitial ( i ).z();
127 alpha = M_vectorFunctionRobin[0]->functionTimeSpace ( t, x, y, z, 0 );
128 beta = M_vectorFunctionRobin[1]->functionTimeSpace ( t, x, y, z, 0 );
130 alpha += M_physicalSolver->solidTimeAdvance()->coefficientFirstDerivative ( 0 ) / timeStep * beta;
132 (*M_robinAlphaCoefficient) [gid] = alpha;
133 (*M_robinBetaCoefficient) [gid] = beta;
135 (*M_robinAlphaCoefficient) [gid + verticesGlobalNumber] = alpha;
136 (*M_robinBetaCoefficient) [gid + verticesGlobalNumber] = beta;
138 (*M_robinAlphaCoefficient) [gid + verticesGlobalNumber * 2] = alpha;
139 (*M_robinBetaCoefficient) [gid + verticesGlobalNumber * 2] = beta;
142 M_physicalSolver->solidTimeAdvance()->updateRHSFirstDerivative ( timeStep );
143 if ( M_physicalSolver->data().method().compare (
"monolithicGE") == 0 || M_physicalSolver->data().method().compare (
"monolithicGI") == 0 )
145 M_robinRHS->subset ( M_physicalSolver->solidTimeAdvance()->rhsContributionFirstDerivative(),
146 std::dynamic_pointer_cast< FSIMonolithic > ( M_physicalSolver )->offset() );
150 *M_robinRHS = M_physicalSolver->solidTimeAdvance()->rhsContributionFirstDerivative();
166 #ifdef HAVE_LIFEV_DEBUG 167 debugStream ( 5025 ) <<
"BCInterfaceFunctionSolverDefined::setData" <<
"\n";
171 std::map< std::string, FSIFunction > mapFunction;
172 mapFunction[
"DerFluidLoadToFluid"] = DerFluidLoadToFluid;
173 mapFunction[
"DerFluidLoadToStructure"] = DerFluidLoadToStructure;
174 mapFunction[
"DerHarmonicExtensionVelToFluid"] = DerHarmonicExtensionVelToFluid;
175 mapFunction[
"DerStructureDispToSolid"] = DerStructureDispToSolid;
176 mapFunction[
"FluidInterfaceDisp"] = FluidInterfaceDisp;
177 mapFunction[
"FluidLoadToStructure"] = FluidLoadToStructure;
178 mapFunction[
"HarmonicExtensionVelToFluid"] = HarmonicExtensionVelToFluid;
179 mapFunction[
"SolidLoadToStructure"] = SolidLoadToStructure;
180 mapFunction[
"StructureDispToHarmonicExtension"] = StructureDispToHarmonicExtension;
181 mapFunction[
"StructureDispToSolid"] = StructureDispToSolid;
182 mapFunction[
"StructureToFluid"] = StructureToFluid;
183 mapFunction[
"RobinWall"] = RobinWall;
186 M_FSIFunction = mapFunction[ data->baseString() ];
188 M_name = data->name();
189 M_flag = data->flag();
190 M_type = data->type();
191 M_mode = data->mode();
192 M_componentsVector = data->componentsVector();
197 M_vectorFunctionRobin.reserve (2);
201 temporaryData->setRobinBaseAlpha();
202 M_vectorFunctionRobin.push_back ( factory.createFunctionParser ( temporaryData ) );
205 temporaryData->setRobinBaseBeta();
206 M_vectorFunctionRobin.push_back ( factory.createFunctionParser ( temporaryData ) );
215 BCInterfaceFunctionSolverDefined< BCHandler, FSIOperator >::
baseType()
const 231 return BASEVectorInterface3D;
239 std::cout <<
" !!! Error: " << M_FSIFunction <<
" is not available as a FSIFunction !!!" << 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
BCInterfaceFunctionSolverDefined()
Constructor.
int32_type Int
Generic integer data.
FSIOperator::vectorPtr_Type M_robinAlphaCoefficient
BCInterfaceFactory< bcHandler_Type, physicalSolver_Type > factory_Type
bcComponentsVec_Type M_componentsVector
FSIOperator::vectorPtr_Type M_robinRHS
double Real
Generic real data.
void setData(const dataPtr_Type &data)
Set data.
void exportData(dataPtr_Type &data)
Copy the stored parameters in the data container.
vectorFunction_Type M_vectorFunctionRobin
void updatePhysicalSolverVariables()
Update the solver variables.
FSIFunction M_FSIFunction
physicalSolverPtr_Type M_physicalSolver