LifeV
BCInterface3D< BcHandler, PhysicalSolverType > Class Template Reference

BCInterface3D - LifeV interface to load boundary conditions for 3D problems completely from a GetPot file. More...

#include <BCInterface3D.hpp>

+ Inheritance diagram for BCInterface3D< BcHandler, PhysicalSolverType >:
+ Collaboration diagram for BCInterface3D< BcHandler, PhysicalSolverType >:

Private Attributes

dataPtr_Type M_data
 
vectorFunctionRobin_Type M_vectorFunctionRobin
 
vectorFunctionDirectional_Type M_vectorFunctionDirection
 
vectorDataInterpolator_Type M_vectorDataInterpolator
 

Type definitions

typedef BCInterface< BcHandler, PhysicalSolverType > bcInterface_Type
 
typedef bcInterface_Type::bcHandler_Type bcHandler_Type
 
typedef bcInterface_Type::bcHandlerPtr_Type bcHandlerPtr_Type
 
typedef bcInterface_Type::physicalSolver_Type physicalSolver_Type
 
typedef bcInterface_Type::physicalSolverPtr_Type physicalSolverPtr_Type
 
typedef bcInterface_Type::factory_Type factory_Type
 
typedef bcInterface_Type::bcFunctionPtr_Type bcFunctionPtr_Type
 
typedef bcInterface_Type::vectorFunction_Type vectorFunction_Type
 
typedef bcInterface_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type
 
typedef bcInterface_Type::vectorFunctionSolverDefined_Type vectorFunctionSolverDefined_Type
 
typedef BCInterfaceData3D data_Type
 
typedef std::shared_ptr< data_TypedataPtr_Type
 
typedef BCFunctionRobin bcFunctionRobin_Type
 
typedef std::shared_ptr< bcFunctionRobin_TypebcFunctionRobinPtr_Type
 
typedef std::vector< bcFunctionRobinPtr_TypevectorFunctionRobin_Type
 
typedef BCFunctionDirectional bcFunctionDirectional_Type
 
typedef std::shared_ptr< bcFunctionDirectional_TypebcFunctionDirectionalPtr_Type
 
typedef std::vector< bcFunctionDirectionalPtr_TypevectorFunctionDirectional_Type
 
typedef BCDataInterpolator bcFunctionDataInterpolator_Type
 
typedef std::shared_ptr< bcFunctionDataInterpolator_TypebcFunctionDataInterpolatorPtr_Type
 
typedef std::vector< bcFunctionDataInterpolatorPtr_TypevectorDataInterpolator_Type
 

Constructors & Destructor

 BCInterface3D ()
 Constructor. More...
 
virtual ~BCInterface3D ()
 Destructor. More...
 

Methods

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. More...
 
void insertBC ()
 Insert the current boundary condition in the BChandler. More...
 

External interface for BCHandler functions

template<class BCBaseType >
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. More...
 
template<class BCBaseType , class BCCompType >
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. More...
 

Set Methods

void setPhysicalSolver (const physicalSolverPtr_Type &physicalSolver)
 Set a physical solver. More...
 

Get Methods

data_TypedataContainer ()
 Get the data container. More...
 

Unimplemented Methods

 BCInterface3D (const BCInterface3D &bcInterface3D)
 
BCInterface3Doperator= (const BCInterface3D &bcInterface3D)
 

Private Methods

template<class BCBaseType >
void createFunctionRobin (BCBaseType &base)
 
template<class BCBaseType >
void createFunctionDirectional (BCBaseType &base)
 
void createFunctionDataInterpolator ()
 
template<class BCBaseType >
void addBcToHandler (BCBaseType &base)
 

Additional Inherited Members

- Public Types inherited from BCInterface< BcHandler, PhysicalSolverType >
typedef BcHandler bcHandler_Type
 
typedef std::shared_ptr< bcHandler_TypebcHandlerPtr_Type
 
typedef PhysicalSolverType physicalSolver_Type
 
typedef std::shared_ptr< physicalSolver_TypephysicalSolverPtr_Type
 
typedef BCInterfaceFactory< bcHandler_Type, physicalSolver_Typefactory_Type
 
typedef factory_Type::bcFunctionPtr_Type bcFunctionPtr_Type
 
typedef std::vector< bcFunctionPtr_TypevectorFunction_Type
 
typedef factory_Type::bcFunctionParserSolver_Type bcFunctionParserSolver_Type
 
typedef factory_Type::bcFunctionParserSolverPtr_Type bcFunctionParserSolverPtr_Type
 
typedef factory_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type
 
typedef std::vector< bcFunctionSolverDefinedPtr_TypevectorFunctionSolverDefined_Type
 
typedef BCInterfaceData data_Type
 
typedef std::shared_ptr< data_TypedataPtr_Type
 
- Public Member Functions inherited from BCInterface< BcHandler, PhysicalSolverType >
 BCInterface ()
 Constructor. More...
 
virtual ~BCInterface ()
 Destructor. More...
 
void createHandler ()
 Create the bcHandler. More...
 
void fillHandler (const std::string &fileName, const std::string &dataSection)
 Fill the bcHandler with the BC provided in the file. More...
 
virtual void updatePhysicalSolverVariables ()
 Update the variables inside the physical solver. More...
 
void setHandler (const bcHandlerPtr_Type &handler)
 Set an Handler. More...
 
bcHandlerPtr_Typehandler ()
 Get the shared_ptr to the BCHandler. More...
 
- Protected Attributes inherited from BCInterface< BcHandler, PhysicalSolverType >
bcHandlerPtr_Type M_handler
 
vectorFunction_Type M_vectorFunction
 
vectorFunctionSolverDefined_Type M_vectorFunctionSolverDefined
 

Detailed Description

template<class BcHandler, class PhysicalSolverType>
class LifeV::BCInterface3D< BcHandler, PhysicalSolverType >

BCInterface3D - LifeV interface to load boundary conditions for 3D problems completely from a GetPot file.

Author
Cristiano Malossi

This class allows to impose boundary conditions for a 3D problem completely from a file.

EXAMPLE - DATA FILE
In the GetPot data file, BCInterface reads a new section: [boundary_conditions] .

Inside the new section there is a list of boundary conditions which correspond to other sub-section with the same name, for example: list = 'InFlow OutFlow'

Each boundary condition has a similar structure. The list of properties depends from the type of the boundary condition. For example:

[InFlow]
type = Essential
flag = 2
mode = Full
component = 3
function = '[0, 0, 3*0.03*(1/4-(x^2+y^2)]'

[OutFlow]
type = Essential
flag = 3
mode = Full
component = 3
function = '0'

where type, flag, mode, component are the classical parameters for a 3D boundary condition. The string function represents the base module and can be replaced by other derived/alternative modules. The following functions are available (see the related classes for more information):

  1. function, which is implemented in BCInterfaceFunctionParser;
  2. functionFile, which is implemented in BCInterfaceFunctionParserFile;
  3. functionSolver, which is implemented in BCInterfaceFunctionParserSolver;
  4. functionFileSolver, which is implemented in BCInterfaceFunctionParserFileSolver;
  5. functionUD, which is implemented in BCInterfaceFunctionUserDefined;
  6. functionSD, which is implemented in BCInterfaceFunctionSolverDefined;
  7. dataInterpolator, which is implemented inBCDataInterpolator;

All the parameters are case sensitive.

See BCInterface base class for more details.

Definition at line 118 of file BCInterface3D.hpp.

Member Typedef Documentation

◆ bcInterface_Type

typedef BCInterface< BcHandler, PhysicalSolverType > bcInterface_Type

Definition at line 125 of file BCInterface3D.hpp.

◆ bcHandler_Type

◆ bcHandlerPtr_Type

◆ physicalSolver_Type

◆ physicalSolverPtr_Type

◆ factory_Type

◆ bcFunctionPtr_Type

◆ vectorFunction_Type

◆ bcFunctionSolverDefinedPtr_Type

◆ vectorFunctionSolverDefined_Type

◆ data_Type

Definition at line 141 of file BCInterface3D.hpp.

◆ dataPtr_Type

typedef std::shared_ptr< data_Type > dataPtr_Type

Definition at line 142 of file BCInterface3D.hpp.

◆ bcFunctionRobin_Type

Definition at line 144 of file BCInterface3D.hpp.

◆ bcFunctionRobinPtr_Type

typedef std::shared_ptr< bcFunctionRobin_Type > bcFunctionRobinPtr_Type

Definition at line 145 of file BCInterface3D.hpp.

◆ vectorFunctionRobin_Type

Definition at line 146 of file BCInterface3D.hpp.

◆ bcFunctionDirectional_Type

◆ bcFunctionDirectionalPtr_Type

Definition at line 149 of file BCInterface3D.hpp.

◆ vectorFunctionDirectional_Type

Definition at line 150 of file BCInterface3D.hpp.

◆ bcFunctionDataInterpolator_Type

◆ bcFunctionDataInterpolatorPtr_Type

Definition at line 153 of file BCInterface3D.hpp.

◆ vectorDataInterpolator_Type

Definition at line 154 of file BCInterface3D.hpp.

Constructor & Destructor Documentation

◆ BCInterface3D() [1/2]

BCInterface3D ( )
explicit

Constructor.

Definition at line 298 of file BCInterface3D.hpp.

+ Here is the caller graph for this function:

◆ ~BCInterface3D()

virtual ~BCInterface3D ( )
inlinevirtual

Destructor.

Definition at line 166 of file BCInterface3D.hpp.

◆ BCInterface3D() [2/2]

BCInterface3D ( const BCInterface3D< BcHandler, PhysicalSolverType > &  bcInterface3D)
private

Member Function Documentation

◆ readBC()

void readBC ( const std::string &  fileName,
const std::string &  dataSection,
const std::string &  name 
)
inlinevirtual

Read a specific boundary condition from a file and add it to the data container.

Parameters
fileNameName of the data file
dataSectionsection in the data file
namename of the boundary condition

Implements BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 180 of file BCInterface3D.hpp.

◆ insertBC()

void insertBC ( )
virtual

Insert the current boundary condition in the BChandler.

Implements BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 317 of file BCInterface3D.hpp.

◆ addBC() [1/2]

void addBC ( const bcName_Type name,
const bcFlag_Type flag,
const bcType_Type type,
const bcMode_Type mode,
BCBaseType &  base 
)
inline

Add a Boundary Condition using the standard interface of the BCHandler.

Parameters
namename of the condition
flaglist of flags
typetype of the condition
modemode of the condition
basebase of the condition

Definition at line 203 of file BCInterface3D.hpp.

◆ addBC() [2/2]

void addBC ( const bcName_Type name,
const bcFlag_Type flag,
const bcType_Type type,
const bcMode_Type mode,
BCBaseType &  base,
const BCCompType &  comp 
)
inline

Add a Boundary Condition with component using the standard interface of the BCHandler.

Parameters
namename of the condition
flaglist of flags
typetype of the condition
modemode of the condition
basebase of the condition
compcomponent of the condition

Definition at line 218 of file BCInterface3D.hpp.

◆ setPhysicalSolver()

void setPhysicalSolver ( const physicalSolverPtr_Type physicalSolver)
virtual

Set a physical solver.

Parameters
physicalSolverphysical solver

Reimplemented from BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 388 of file BCInterface3D.hpp.

◆ dataContainer()

data_Type& dataContainer ( )
inlinevirtual

Get the data container.

Returns
the data container

Implements BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 245 of file BCInterface3D.hpp.

◆ operator=()

BCInterface3D& operator= ( const BCInterface3D< BcHandler, PhysicalSolverType > &  bcInterface3D)
private

◆ createFunctionRobin()

void createFunctionRobin ( BCBaseType &  base)
inlineprivate

Definition at line 419 of file BCInterface3D.hpp.

◆ createFunctionDirectional()

void createFunctionDirectional ( BCBaseType &  base)
inlineprivate

Definition at line 439 of file BCInterface3D.hpp.

◆ createFunctionDataInterpolator()

void createFunctionDataInterpolator ( )
inlineprivate

Definition at line 459 of file BCInterface3D.hpp.

◆ addBcToHandler()

void addBcToHandler ( BCBaseType &  base)
inlineprivate

Definition at line 470 of file BCInterface3D.hpp.

Field Documentation

◆ M_data

dataPtr_Type M_data
private

Definition at line 281 of file BCInterface3D.hpp.

◆ M_vectorFunctionRobin

vectorFunctionRobin_Type M_vectorFunctionRobin
private

Definition at line 284 of file BCInterface3D.hpp.

◆ M_vectorFunctionDirection

vectorFunctionDirectional_Type M_vectorFunctionDirection
private

Definition at line 287 of file BCInterface3D.hpp.

◆ M_vectorDataInterpolator

vectorDataInterpolator_Type M_vectorDataInterpolator
private

Definition at line 290 of file BCInterface3D.hpp.


The documentation for this class was generated from the following file: