37 #ifndef BCInterface3D_H 38 #define BCInterface3D_H 1
41 #include <lifev/bc_interface/core/bc/BCInterface.hpp> 42 #include <lifev/bc_interface/3D/bc/BCInterfaceData3D.hpp> 117 template<
class BcHandler,
class PhysicalSolverType >
180 void readBC (
const std::string& fileName,
const std::string& dataSection,
const std::string& name )
182 M_data->readBC ( fileName, dataSection, name );
202 template<
class BCBaseType >
205 this->M_handler->addBC ( name, flag, type, mode, base );
217 template<
class BCBaseType,
class BCCompType >
220 this->M_handler->addBC ( name, flag, type, mode, base, comp );
267 template<
class BCBaseType >
270 template<
class BCBaseType >
275 template<
class BCBaseType >
297 template<
class BcHandler,
class PhysicalSolverType >
306 #ifdef HAVE_LIFEV_DEBUG 307 debugStream ( 5020 ) <<
"BCInterface3D::BCInterface3D" <<
"\n";
315 template<
class BcHandler,
class PhysicalSolverType >
320 #ifdef HAVE_LIFEV_DEBUG 321 debugStream ( 5020 ) <<
"BCInterface3D::insertBC\n";
324 switch ( M_data->base().second )
326 case BCIFunctionParser:
327 case BCIFunctionParserFile:
328 case BCIFunctionParserSolver:
329 case BCIFunctionParserFileSolver:
330 case BCIFunctionUserDefined:
332 factory_Type factory;
333 this->M_vectorFunction.push_back ( factory.createFunctionParser ( M_data ) );
336 this->M_vectorFunction.back()->assignFunction ( base );
339 if ( M_data->mode() == Directional )
341 createFunctionDirectional ( base );
342 addBcToHandler ( *M_vectorFunctionDirection.back() );
348 if ( M_data->type() == Robin )
350 createFunctionRobin ( base );
351 addBcToHandler ( *M_vectorFunctionRobin.back() );
357 addBcToHandler ( base );
361 case BCIFunctionSolverDefined:
363 factory_Type factory;
364 this->M_vectorFunctionSolverDefined.push_back ( factory.createFunctionSolverDefined ( M_data ) );
368 case BCI3DDataInterpolator:
370 createFunctionDataInterpolator();
371 addBcToHandler ( *M_vectorDataInterpolator.back() );
377 std::cout <<
" !!! Error: " << M_data->base().first <<
" is not valid in BCInterface3D !!!" << std::endl;
386 template<
class BcHandler,
class PhysicalSolverType >
392 for (
typename vectorFunctionSolverDefined_Type::const_iterator i =
this->M_vectorFunctionSolverDefined.begin() ; i <
this->M_vectorFunctionSolverDefined.end() ; ++i )
394 ( *i )->exportData (
M_data );
397 if ( M_data->type() == Robin )
401 ( *i )->assignFunction ( base );
402 addBcToHandler ( base );
408 ( *i )->assignFunction ( base );
409 addBcToHandler ( base );
422 M_data->setName ( M_data->name() +
"_robinMassTerm" );
423 M_data->setRobinBaseAlpha();
427 this->M_vectorFunction.push_back ( factory.createFunctionParser (
M_data ) );
430 this->M_vectorFunction.back()->assignFunction ( baseRobin );
434 M_vectorFunctionRobin.push_back ( robinBase );
442 M_data->setName ( M_data->name() +
"_directionalField" );
443 M_data->setDirectionalBase();
447 this->M_vectorFunction.push_back ( factory.createFunctionParser (
M_data ) );
450 this->M_vectorFunction.back()->assignFunction ( baseDirectional );
454 M_vectorFunctionDirection.push_back ( directionalBase );
457 template<
class BcHandler,
class PhysicalSolverType >
463 dataInterpolatorBase->readData ( M_data->baseString() );
464 dataInterpolatorBase->setInterpolationMethod ( LifeV::BCDataInterpolator::RBF_InverseMultiQuadric);
465 M_vectorDataInterpolator.push_back ( dataInterpolatorBase );
472 if ( !
this->M_handler.get() )
474 this->createHandler();
477 switch ( M_data->mode() )
484 #ifdef HAVE_LIFEV_DEBUG 485 debugStream ( 5020 ) <<
"BCInterface3D::addBcToHandler Scalar, Normal, Tangential, Directional" <<
"\n\n";
488 this->M_handler->addBC ( M_data->name(), M_data->flag(), M_data->type(), M_data->mode(), base );
494 #ifdef HAVE_LIFEV_DEBUG 495 debugStream ( 5020 ) <<
"BCInterface3D::addBcToHandler Full" <<
"\n\n";
498 this->M_handler->addBC ( M_data->name(), M_data->flag(), M_data->type(), M_data->mode(), base, M_data->componentsNumber() );
504 #ifdef HAVE_LIFEV_DEBUG 505 debugStream ( 5020 ) <<
"BCInterface3D::addBcToHandler Component" <<
"\n\n";
508 this->M_handler->addBC ( M_data->name(), M_data->flag(), M_data->type(), M_data->mode(), base, M_data->componentsVector() );
void createFunctionRobin(BCBaseType &base)
bcInterface_Type::vectorFunctionSolverDefined_Type vectorFunctionSolverDefined_Type
std::vector< bcFunctionRobinPtr_Type > vectorFunctionRobin_Type
BCInterface3D(const BCInterface3D &bcInterface3D)
data_Type & dataContainer()
Get the data container.
markerID_Type bcFlag_Type
virtual ~BCInterface3D()
Destructor.
std::shared_ptr< bcFunctionDataInterpolator_Type > bcFunctionDataInterpolatorPtr_Type
bcInterface_Type::factory_Type factory_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.
BCFunctionRobin bcFunctionRobin_Type
std::vector< bcFunctionDataInterpolatorPtr_Type > vectorDataInterpolator_Type
BCInterface< BcHandler, PhysicalSolverType > bcInterface_Type
BCInterface3D - LifeV interface to load boundary conditions for 3D problems completely from a GetPot ...
void addBC(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCBaseType &base, const BCCompType &comp)
Add a Boundary Condition with component using the standard interface of the BCHandler.
bcInterface_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type
void updateInverseJacobian(const UInt &iQuadPt)
BCInterface3D & operator=(const BCInterface3D &bcInterface3D)
BCFunctionRobin - class that holds the function used for prescribing Robin boundary conditions...
std::shared_ptr< bcFunctionDirectional_Type > bcFunctionDirectionalPtr_Type
void insertBC()
Insert the current boundary condition in the BChandler.
BCFunctionBase - class that holds the function used for prescribing boundary conditions.
vectorFunctionRobin_Type M_vectorFunctionRobin
bcInterface_Type::bcFunctionPtr_Type bcFunctionPtr_Type
void createFunctionDirectional(BCBaseType &base)
bcInterface_Type::bcHandler_Type bcHandler_Type
bcInterface_Type::physicalSolverPtr_Type physicalSolverPtr_Type
void createFunctionDataInterpolator()
BCDataInterpolator bcFunctionDataInterpolator_Type
BCInterfaceData3D - The BCInterface3D data container.
BCVectorInterface - class that holds the FE vectors used for prescribing boundary conditions on Inter...
bcInterface_Type::bcHandlerPtr_Type bcHandlerPtr_Type
void addBcToHandler(BCBaseType &base)
BCFunctionDirectional bcFunctionDirectional_Type
BCDataInterpolator - Class for interpolating boundary functions from scattered data.
void setPhysicalSolver(const physicalSolverPtr_Type &physicalSolver)
Set a physical solver.
std::shared_ptr< data_Type > dataPtr_Type
BCFunctionUDepBase - class that holds the function used for prescribing boundary conditions.
BCInterfaceData3D data_Type
vectorDataInterpolator_Type M_vectorDataInterpolator
BCVector - class that holds the FE vectors used for prescribing boundary conditions.
bcInterface_Type::physicalSolver_Type physicalSolver_Type
vectorFunctionDirectional_Type M_vectorFunctionDirection
void addBC(const bcName_Type &name, const bcFlag_Type &flag, const bcType_Type &type, const bcMode_Type &mode, BCBaseType &base)
Add a Boundary Condition using the standard interface of the BCHandler.
bcInterface_Type::vectorFunction_Type vectorFunction_Type
std::vector< bcFunctionDirectionalPtr_Type > vectorFunctionDirectional_Type
BCInterface - LifeV interface to load boundary conditions completely from a GetPot file...
BCInterface3D()
Constructor.
std::shared_ptr< bcFunctionRobin_Type > bcFunctionRobinPtr_Type