38 #define BCInterface_H 1
41 #include <lifev/bc_interface/core/bc/BCInterfaceData.hpp> 42 #include <lifev/bc_interface/core/function/BCInterfaceFactory.hpp> 157 template<
class BcHandler,
class PhysicalSolverType >
206 M_handler.reset (
new bcHandler_Type() );
214 void fillHandler (
const std::string& fileName,
const std::string& dataSection );
222 virtual void readBC (
const std::string& fileName,
const std::string& dataSection,
const std::string& name ) = 0;
301 template<
class BcHandler,
class PhysicalSolverType >
308 #ifdef HAVE_LIFEV_DEBUG 309 debugStream ( 5020 ) <<
"BCInterface::BCInterface" <<
"\n";
317 template<
class BcHandler,
class PhysicalSolverType >
319 BCInterface< BcHandler, PhysicalSolverType >::fillHandler (
const std::string& fileName,
const std::string& dataSection )
322 #ifdef HAVE_LIFEV_DEBUG 323 debugStream ( 5020 ) <<
"BCInterface::fillHandler\n";
327 for ( UInt i ( 0 ); i < dataFile.vector_variable_size ( ( dataSection +
"/boundary_conditions/list" ).c_str() ); ++i )
329 readBC ( fileName, dataSection +
"/boundary_conditions/",
330 dataFile ( ( dataSection +
"/boundary_conditions/list" ).c_str(),
" ", i ) );
336 template<
class BcHandler,
class PhysicalSolverType >
341 #ifdef HAVE_LIFEV_DEBUG 342 debugStream ( 5020 ) <<
"BCInterface::updatePhysicalSolverVariables\n";
345 for ( UInt i ( 0 ); i < M_vectorFunction.size(); ++i )
347 bcFunctionParserSolverPtr_Type castedFunctionSolver = std::dynamic_pointer_cast< bcFunctionParserSolver_Type > ( M_vectorFunction[i] );
349 if ( castedFunctionSolver != 0 )
351 castedFunctionSolver->updatePhysicalSolverVariables();
355 for (
typename vectorFunctionSolverDefined_Type::const_iterator i = M_vectorFunctionSolverDefined.begin() ; i < M_vectorFunctionSolverDefined.end() ; ++i )
357 ( *i )->updatePhysicalSolverVariables();
364 template<
class BcHandler,
class PhysicalSolverType >
369 for ( UInt i ( 0 ); i < M_vectorFunction.size(); ++i )
371 bcFunctionParserSolverPtr_Type castedFunctionSolver = std::dynamic_pointer_cast< bcFunctionParserSolver_Type > ( M_vectorFunction[i] );
373 if ( castedFunctionSolver != 0 )
375 castedFunctionSolver->setPhysicalSolver ( physicalSolver );
379 for (
typename vectorFunctionSolverDefined_Type::const_iterator i = M_vectorFunctionSolverDefined.begin() ; i < M_vectorFunctionSolverDefined.end() ; ++i )
381 ( *i )->setPhysicalSolver ( physicalSolver );
void setHandler(const bcHandlerPtr_Type &handler)
Set an Handler.
vectorFunction_Type M_vectorFunction
virtual void setPhysicalSolver(const physicalSolverPtr_Type &physicalSolver)
Set a physical solver.
BCInterfaceData - The BCInterface data container.
bcHandlerPtr_Type M_handler
PhysicalSolverType physicalSolver_Type
BCInterface & operator=(const BCInterface &interface1D)
std::shared_ptr< data_Type > dataPtr_Type
void updateInverseJacobian(const UInt &iQuadPt)
factory_Type::bcFunctionParserSolverPtr_Type bcFunctionParserSolverPtr_Type
BCInterfaceData data_Type
std::vector< bcFunctionPtr_Type > vectorFunction_Type
bcHandlerPtr_Type & handler()
Get the shared_ptr to the BCHandler.
std::shared_ptr< bcHandler_Type > bcHandlerPtr_Type
BCInterface()
Constructor.
vectorFunctionSolverDefined_Type M_vectorFunctionSolverDefined
virtual ~BCInterface()
Destructor.
virtual void insertBC()=0
Insert the current boundary condition in the BChandler.
factory_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type
factory_Type::bcFunctionPtr_Type bcFunctionPtr_Type
BCInterface(const BCInterface &interface1D)
virtual void updatePhysicalSolverVariables()
Update the variables inside the physical solver.
std::shared_ptr< physicalSolver_Type > physicalSolverPtr_Type
virtual data_Type & dataContainer()=0
Get the data container.
BCInterfaceFactory< bcHandler_Type, physicalSolver_Type > factory_Type
GetPot(const STRING_VECTOR &FileNameList)
factory_Type::bcFunctionParserSolver_Type bcFunctionParserSolver_Type
BCInterface - LifeV interface to load boundary conditions completely from a GetPot file...
std::vector< bcFunctionSolverDefinedPtr_Type > vectorFunctionSolverDefined_Type
void createHandler()
Create the bcHandler.