LifeV
BCInterface1D< BcHandler, PhysicalSolverType > Class Template Reference

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

#include <BCInterface1D.hpp>

+ Inheritance diagram for BCInterface1D< BcHandler, PhysicalSolverType >:
+ Collaboration diagram for BCInterface1D< 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::bcFunctionParserSolver_Type bcFunctionParserSolver_Type
 
typedef bcInterface_Type::bcFunctionParserSolverPtr_Type bcFunctionParserSolverPtr_Type
 
typedef bcInterface_Type::bcFunctionSolverDefinedPtr_Type bcFunctionSolverDefinedPtr_Type
 
typedef bcInterface_Type::vectorFunctionSolverDefined_Type vectorFunctionSolverDefined_Type
 
typedef BCInterfaceData1D data_Type
 
typedef std::shared_ptr< data_TypedataPtr_Type
 
typedef bcHandler_Type::solutionPtr_Type solutionPtr_Type
 
typedef bcHandler_Type::fluxPtr_Type fluxPtr_Type
 
typedef bcHandler_Type::sourcePtr_Type sourcePtr_Type
 
typedef bcHandler_Type::vectorPtrContainer_Type vectorPtrContainer_Type
 

Constructors & Destructor

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

Set Methods

void setFluxSource (const fluxPtr_Type &flux, const sourcePtr_Type &source)
 Set the solution for the members that need it. More...
 
void setSolution (const solutionPtr_Type &solution)
 Set the solution for the members that need it. More...
 

Get Methods

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

Unimplemented Methods

 BCInterface1D (const BCInterface1D &interface1D)
 
BCInterface1Doperator= (const BCInterface1D &interface1D)
 

Private Methods

template<class BCInterfaceBaseType >
void createFunction (std::vector< std::shared_ptr< BCInterfaceBaseType > > &baseVector)
 
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::BCInterface1D< BcHandler, PhysicalSolverType >

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

Author
Cristiano Malossi

This class allows to impose boundary conditions for a 1D 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]
side = left
quantity = Q
line = first
function = 'sin(2*pi*t)'

[OutFlow]
side = right
quantity = W2
line = first
functionSD = Absorbing

where side, quantity, and line are the classical parameters for a 1D 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.

All the parameters are case sensitive.

See BCInterface base class for more details.

Definition at line 100 of file BCInterface1D.hpp.

Member Typedef Documentation

◆ bcInterface_Type

typedef BCInterface< BcHandler, PhysicalSolverType > bcInterface_Type

Definition at line 107 of file BCInterface1D.hpp.

◆ bcHandler_Type

◆ bcHandlerPtr_Type

◆ physicalSolver_Type

◆ physicalSolverPtr_Type

◆ factory_Type

◆ bcFunctionPtr_Type

◆ vectorFunction_Type

◆ bcFunctionParserSolver_Type

◆ bcFunctionParserSolverPtr_Type

◆ bcFunctionSolverDefinedPtr_Type

◆ vectorFunctionSolverDefined_Type

◆ data_Type

Definition at line 126 of file BCInterface1D.hpp.

◆ dataPtr_Type

typedef std::shared_ptr< data_Type > dataPtr_Type

Definition at line 127 of file BCInterface1D.hpp.

◆ solutionPtr_Type

typedef bcHandler_Type::solutionPtr_Type solutionPtr_Type

Definition at line 129 of file BCInterface1D.hpp.

◆ fluxPtr_Type

typedef bcHandler_Type::fluxPtr_Type fluxPtr_Type

Definition at line 130 of file BCInterface1D.hpp.

◆ sourcePtr_Type

typedef bcHandler_Type::sourcePtr_Type sourcePtr_Type

Definition at line 131 of file BCInterface1D.hpp.

◆ vectorPtrContainer_Type

typedef bcHandler_Type::vectorPtrContainer_Type vectorPtrContainer_Type

Definition at line 132 of file BCInterface1D.hpp.

Constructor & Destructor Documentation

◆ BCInterface1D() [1/2]

BCInterface1D ( )
inlineexplicit

Constructor.

Definition at line 141 of file BCInterface1D.hpp.

◆ ~BCInterface1D()

virtual ~BCInterface1D ( )
inlinevirtual

Destructor.

Definition at line 144 of file BCInterface1D.hpp.

◆ BCInterface1D() [2/2]

BCInterface1D ( const BCInterface1D< BcHandler, PhysicalSolverType > &  interface1D)
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 158 of file BCInterface1D.hpp.

◆ insertBC()

void insertBC ( )
inlinevirtual

Insert the current boundary condition in the BChandler.

Implements BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 253 of file BCInterface1D.hpp.

◆ setBC()

void setBC ( const OneDFSI::bcSide_Type bcSide,
const OneDFSI::bcLine_Type bcLine,
const OneDFSI::bcType_Type bcType,
const BCBaseType &  base 
)
inline

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

Parameters
sideside of the condition
lineline of the condition
typetype of the condition
basebase of the condition

Definition at line 180 of file BCInterface1D.hpp.

◆ setFluxSource()

void setFluxSource ( const fluxPtr_Type flux,
const sourcePtr_Type source 
)

Set the solution for the members that need it.

Parameters
fluxflux
sourcesource

Definition at line 300 of file BCInterface1D.hpp.

◆ setSolution()

void setSolution ( const solutionPtr_Type solution)

Set the solution for the members that need it.

Parameters
solutionsolution

Definition at line 312 of file BCInterface1D.hpp.

◆ dataContainer()

data_Type& dataContainer ( )
inlinevirtual

Get the data container.

Returns
the data container

Implements BCInterface< BcHandler, PhysicalSolverType >.

Definition at line 214 of file BCInterface1D.hpp.

◆ operator=()

BCInterface1D& operator= ( const BCInterface1D< BcHandler, PhysicalSolverType > &  interface1D)
private

◆ createFunction()

void createFunction ( std::vector< std::shared_ptr< BCInterfaceBaseType > > &  baseVector)
inlineprivate

Definition at line 338 of file BCInterface1D.hpp.

◆ addBcToHandler()

void addBcToHandler ( BCBaseType &  base)
inlineprivate

Definition at line 347 of file BCInterface1D.hpp.

Field Documentation

◆ M_data

dataPtr_Type M_data
private

Definition at line 245 of file BCInterface1D.hpp.


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