37 #ifndef BCInterface1D_H 38 #define BCInterface1D_H 1
41 #include <lifev/bc_interface/core/bc/BCInterface.hpp> 42 #include <lifev/bc_interface/1D/bc/BCInterfaceData1D.hpp> 45 #include <lifev/bc_interface/1D/function/BCInterfaceFunctionParser1D.hpp> 46 #include <lifev/bc_interface/1D/function/BCInterfaceFunctionParserSolver1D.hpp> 47 #include <lifev/bc_interface/1D/function/BCInterfaceFunctionSolverDefined1D.hpp> 48 #include <lifev/bc_interface/1D/function/BCInterfaceFunctionUserDefined1D.hpp> 99 template<
class BcHandler,
class PhysicalSolverType >
158 void readBC (
const std::string& fileName,
const std::string& dataSection,
const std::string& name )
160 M_data->readBC ( fileName, dataSection, name );
179 template<
class BCBaseType >
182 this->M_handler->setBC ( bcSide, bcLine, bcType, base );
236 template<
class BCInterfaceBaseType >
239 template<
class BCBaseType >
251 template<
class BcHandler,
class PhysicalSolverType >
256 #ifdef HAVE_LIFEV_DEBUG 257 debugStream ( 5020 ) <<
"BCInterface1D::insertBC\n";
265 switch ( M_data->base().second )
267 case BCIFunctionParser:
268 case BCIFunctionParserFile:
269 case BCIFunctionParserSolver:
270 case BCIFunctionParserFileSolver:
271 case BCIFunctionUserDefined:
273 this->M_vectorFunction.push_back ( factory.createFunctionParser ( M_data ) );
274 this->M_vectorFunction.back()->assignFunction ( base );
278 case BCIFunctionSolverDefined:
280 this->M_vectorFunctionSolverDefined.push_back ( factory.createFunctionSolverDefined ( M_data ) );
281 this->M_vectorFunctionSolverDefined.back()->assignFunction ( base );
287 std::cout <<
" !!! Error: " << M_data->base().first <<
" is not valid in BCInterface1D !!!" << std::endl;
292 addBcToHandler ( base );
298 template<
class BcHandler,
class PhysicalSolverType >
302 for (
typename vectorFunctionSolverDefined_Type::const_iterator i =
this->M_vectorFunctionSolverDefined.begin() ; i <
this->M_vectorFunctionSolverDefined.end() ; ++i )
304 ( *i )->setFluxSource ( flux, source );
307 this->M_handler->setFluxSource ( flux, source );
310 template<
class BcHandler,
class PhysicalSolverType >
315 for (
UInt i ( 0 ); i <
this->M_vectorFunction.size(); ++i )
319 if ( castedFunctionSolver != 0 )
321 castedFunctionSolver->setSolution ( solution );
325 for (
typename vectorFunctionSolverDefined_Type::const_iterator i =
this->M_vectorFunctionSolverDefined.begin() ; i <
this->M_vectorFunctionSolverDefined.end() ; ++i )
327 ( *i )->setSolution ( solution );
330 this->M_handler->setSolution ( solution );
340 std::shared_ptr< BCInterfaceBaseType > function (
new BCInterfaceBaseType() );
341 function->setData ( M_data );
342 baseVector.push_back ( function );
349 if ( !
this->M_handler.get() )
351 this->createHandler();
354 #ifdef HAVE_LIFEV_DEBUG 355 debugStream ( 5020 ) <<
"BCInterface1D::addBCManager" <<
"\n\n";
358 this->M_handler->setBC ( M_data->side(), M_data->line(), M_data->quantity(), base );
data_Type & dataContainer()
Get the data container.
bcHandler_Type::sourcePtr_Type sourcePtr_Type
bcInterface_Type::physicalSolver_Type physicalSolver_Type
BCInterface1D()
Constructor.
bcInterface_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type
bcInterface_Type::vectorFunction_Type vectorFunction_Type
bcInterface_Type::factory_Type factory_Type
BCInterface1D - LifeV interface to load boundary conditions for 1D problems completely from a GetPot ...
void setSolution(const solutionPtr_Type &solution)
Set the solution for the members that need it.
void updateInverseJacobian(const UInt &iQuadPt)
bcInterface_Type::bcHandlerPtr_Type bcHandlerPtr_Type
OneDFSIFunction - Base class for 1D BC Functions.
bcHandler_Type::vectorPtrContainer_Type vectorPtrContainer_Type
bcInterface_Type::bcHandler_Type bcHandler_Type
bcHandler_Type::fluxPtr_Type fluxPtr_Type
void readBC(const std::string &fileName, const std::string &dataSection, const std::string &name)
Read a specific boundary condition from a file and add it to the data container.
bcInterface_Type::bcFunctionParserSolverPtr_Type bcFunctionParserSolverPtr_Type
void createFunction(std::vector< std::shared_ptr< BCInterfaceBaseType > > &baseVector)
void setBC(const OneDFSI::bcSide_Type &bcSide, const OneDFSI::bcLine_Type &bcLine, const OneDFSI::bcType_Type &bcType, const BCBaseType &base)
Add a Boundary Condition using the standard interface of the BCHandler.
void setFluxSource(const fluxPtr_Type &flux, const sourcePtr_Type &source)
Set the solution for the members that need it.
std::shared_ptr< data_Type > dataPtr_Type
BCInterfaceData1D - The BCInterface1D data container.
bcHandler_Type::solutionPtr_Type solutionPtr_Type
void insertBC()
Insert the current boundary condition in the BChandler.
bcInterface_Type::vectorFunctionSolverDefined_Type vectorFunctionSolverDefined_Type
bcInterface_Type::bcFunctionPtr_Type bcFunctionPtr_Type
void addBcToHandler(BCBaseType &base)
BCInterface1D & operator=(const BCInterface1D &interface1D)
bcInterface_Type::physicalSolverPtr_Type physicalSolverPtr_Type
bcInterface_Type::bcFunctionParserSolver_Type bcFunctionParserSolver_Type
virtual ~BCInterface1D()
Destructor.
BCInterfaceData1D data_Type
BCInterface< BcHandler, PhysicalSolverType > bcInterface_Type
BCInterface1D(const BCInterface1D &interface1D)
BCInterface - LifeV interface to load boundary conditions completely from a GetPot file...
uint32_type UInt
generic unsigned integer (used mainly for addressing)