LifeV
BCInterface0D< BcHandler, PhysicalSolverType > Class Template Reference

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

#include <BCInterface0D.hpp>

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

Private Attributes

dataPtr_Type M_data
 

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 BCInterfaceData0D data_Type
 
typedef std::shared_ptr< data_TypedataPtr_Type
 

Constructors & Destructor

 BCInterface0D ()
 Constructor. More...
 
virtual ~BCInterface0D ()
 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...
 

Get Methods

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

Unimplemented Methods

 BCInterface0D (const BCInterface0D &interface0D)
 
BCInterface0Doperator= (const BCInterface0D &interface0D)
 

Private Methods

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...
 
virtual void setPhysicalSolver (const physicalSolverPtr_Type &physicalSolver)
 Set a 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::BCInterface0D< BcHandler, PhysicalSolverType >

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

Author
Cristiano Malossi

This class allows to impose boundary conditions for a 0D 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]
flag = 0
type0D = Current
function = 'sin(2*pi*t)'

[OutFlow]
flag = 1
type0D = Voltage
function = 0

where flag, and type0D are the classical parameters for a 0D 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.

All the parameters are case sensitive.

See BCInterface base class for more details.

Definition at line 96 of file BCInterface0D.hpp.

Member Typedef Documentation

◆ bcInterface_Type

typedef BCInterface< BcHandler, PhysicalSolverType > bcInterface_Type

Definition at line 103 of file BCInterface0D.hpp.

◆ bcHandler_Type

◆ bcHandlerPtr_Type

◆ physicalSolver_Type

◆ physicalSolverPtr_Type

◆ factory_Type

◆ bcFunctionPtr_Type

◆ vectorFunction_Type

◆ bcFunctionSolverDefinedPtr_Type

◆ vectorFunctionSolverDefined_Type

◆ data_Type

Definition at line 119 of file BCInterface0D.hpp.

◆ dataPtr_Type

typedef std::shared_ptr< data_Type > dataPtr_Type

Definition at line 120 of file BCInterface0D.hpp.

Constructor & Destructor Documentation

◆ BCInterface0D() [1/2]

BCInterface0D ( )
inlineexplicit

Constructor.

Definition at line 129 of file BCInterface0D.hpp.

◆ ~BCInterface0D()

virtual ~BCInterface0D ( )
inlinevirtual

Destructor.

Definition at line 132 of file BCInterface0D.hpp.

◆ BCInterface0D() [2/2]

BCInterface0D ( const BCInterface0D< BcHandler, PhysicalSolverType > &  interface0D)
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 146 of file BCInterface0D.hpp.

◆ insertBC()

void insertBC ( )
inlinevirtual

Insert the current boundary condition in the BChandler.

Implements BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 200 of file BCInterface0D.hpp.

◆ dataContainer()

data_Type& dataContainer ( )
inlinevirtual

Get the data container.

Returns
the data container

Implements BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 164 of file BCInterface0D.hpp.

◆ operator=()

BCInterface0D& operator= ( const BCInterface0D< BcHandler, PhysicalSolverType > &  interface0D)
private

◆ addBcToHandler()

void addBcToHandler ( BCBaseType &  base)
inlineprivate

Definition at line 240 of file BCInterface0D.hpp.

Field Documentation

◆ M_data

dataPtr_Type M_data
private

Definition at line 192 of file BCInterface0D.hpp.


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