LifeV
BCVectorBase Class Reference

BCVectorBase - class that holds the FE vectors used for prescribing boundary conditions. More...

#include <BCVector.hpp>

+ Inheritance diagram for BCVectorBase:
+ Collaboration diagram for BCVectorBase:

Protected Attributes

vectorConstPtr_Type M_rightHandSideVectorPtr
 The pointer to FE vector for the right hand side part of the equation. More...
 
vectorConstPtr_Type M_robinBoundaryMassCoeffVectorPtr
 The pointer to FE Vector holding the robin boundary Mass coefficients. More...
 
vectorConstPtr_Type M_betaCoeffVectorPtr
 
UInt M_numberOfTotalDof
 Number of total dof in the vector of data. More...
 
Real M_robinBoundaryMassCoeff
 Coefficient for boundary mass term in Robin conditions. More...
 
Real M_resistanceCoeff
 Coefficient for Resistance coefficient. More...
 
Real M_betaCoeff
 Coefficient for the beta coefficient. More...
 
bool M_isRobinBdMassCoeffAVector
 boolean determining whether the boundary mass coefficient is a FE Vector More...
 
bool M_isBetaCoeffAVector
 boolean determining whether the boundary mass coefficient is a FE Vector More...
 
UInt M_type
 Type of boundary condition; see the BCBase class description. More...
 
bool M_finalized
 true when the BCVector is updated More...
 

Public Types

typedef VectorEpetra vector_Type
 
typedef vector_Type const * vectorConstPtr_Type
 
typedef std::shared_ptr< BCVectorBaseBCVectorBasePtr_Type
 

Constructors and Detypedef BCVectorBase::vector_Type vector_Type;structor

 BCVectorBase ()
 Empty Constructor. More...
 
 BCVectorBase (const vector_Type &rightHandSideVector, const UInt numberOfTotalDof, UInt type=0)
 Constructor. More...
 
 BCVectorBase (const BCVectorBase &bcVectorBase)
 Copy Constructor. More...
 
virtual ~BCVectorBase ()
 Destructor. More...
 

Operators

virtual BCVectorBaseoperator= (BCVectorBase const &)
 Assignment operator. More...
 
virtual Real operator() (const ID &globalDofId, const ID &component) const
 Return the value of the selected component of rightHandSideVector at position globalDofID. More...
 

Methods

virtual BCVectorBasePtr_Type clone () const
 Clone the current object. More...
 
virtual Real robinCoeffVector (const ID &globalDofId, const ID &component) const
 Return the value of the selected component of the boundary mass coefficient vector at position dofID. More...
 
virtual Real betaCoeffVector (const ID &globalDofId, const ID &component) const
 Return the value of the selected component of the beta coefficient vector at position dofID. More...
 
virtual std::ostream & showMe (bool, std::ostream &out=std::cout) const
 showMe More...
 

Get Methods

const vector_TyperhsVector () const
 Return the underlying data structure for the RHS vector. More...
 
UInt nbTotalDOF () const
 Return the number of total DOF. More...
 
UInt type () const
 Return the type of conditions (see BCVector class description) More...
 
bool isFinalized () const
 determine whether the BCVector is updated More...
 
bool isRobinCoeffAVector () const
 determine whether the boundary mass coefficient for Robin bc is a Vector More...
 
bool isBetaCoeffAVector () const
 
Real robinCoeff () const
 Return the value of the boundary mass coefficient of Robin conditions. More...
 
Real resistanceCoeff () const
 Return the value of the resistance coefficient. More...
 
Real betaCoeff () const
 Return the value of the beta coefficient. More...
 

Set Methods

void setRobinCoeff (const Real &robinBoundaryMassCoeff)
 set the boundary mass coefficient of Robin bc More...
 
void setResistanceCoeff (const Real &resistanceCoeff)
 set the Resistance coefficient More...
 
void setBetaCoeff (const Real &betaCoeff)
 set the Beta coefficient FE vector More...
 
void setRobinCoeffVector (const vector_Type &robinBoundaryMassCoeffVector)
 set the boundary mass coefficient FE vector for Robin boundary conditions More...
 
void setBetaCoeffVector (const vector_Type &betaCoeffVector)
 set the beta coefficient FE vector More...
 
void setRhsVector (const vector_Type &righHandSideVector, UInt numberOfTotalDOF, UInt type=0)
 set the right hand side FE vector More...
 

Detailed Description

BCVectorBase - class that holds the FE vectors used for prescribing boundary conditions.

Author
Miguel Fernandez
Christophe Prud'homme chris.nosp@m.toph.nosp@m.e.pru.nosp@m.dhom.nosp@m.me@ep.nosp@m.fl.c.nosp@m.h
Vincent Martin vince.nosp@m.nt.m.nosp@m.artin.nosp@m.@inr.nosp@m.ia.fr

This class holds the FE vectors used for prescribing boundary conditions. The FE vectors given by the user must have the dimension of the total DOFs, although only DOFs on the boundary are considered.

In the case of Essential boundary condition, we want to prescribe u = v on part of the boundary ( u is the solution, v the given FE vector). In the case of Natural boundary condition, depending on the type, we want to add to the right hand side of the equation one of the following terms:

type 0: v, in this case v is a quantity integrated on the boundary (i.e. a residual)
type 1: ( v, n phi)_bd with v scalar and phi vector
type 2: ( v n, phi)_bd v vector, phi scalar
type 3: ( v, phi)_bd v and phi can be both vectors or scalars (not yet implemented)

here ( . , . )_bd denote the L2 inner product on the boundary, n is the normal, v the given FE vector

This class holds data structure also for Resistance and Flux boundary conditions

This is the base class for other BCVectorXXX classes. Inheritance is used to hold specific boundary condition data.

Definition at line 74 of file BCVector.hpp.

Member Typedef Documentation

◆ vector_Type

Definition at line 81 of file BCVector.hpp.

◆ vectorConstPtr_Type

Definition at line 82 of file BCVector.hpp.

◆ BCVectorBasePtr_Type

typedef std::shared_ptr<BCVectorBase> BCVectorBasePtr_Type

Definition at line 83 of file BCVector.hpp.

Constructor & Destructor Documentation

◆ BCVectorBase() [1/3]

Empty Constructor.

The user must call setBCVector(..).

Definition at line 54 of file BCVector.cpp.

◆ BCVectorBase() [2/3]

BCVectorBase ( const vector_Type rightHandSideVector,
const UInt  numberOfTotalDof,
UInt  type = 0 
)

Constructor.

Parameters
rightHandSideVectorThe given Finite Element vector holding data to prescribe on boundary
numberOfTotalDofnumber of total dof in the vector of data
typeThe type can assume the following values (0, 1, 2); see BCVector class description for their meaning

Definition at line 66 of file BCVector.cpp.

+ Here is the caller graph for this function:

◆ BCVectorBase() [3/3]

BCVectorBase ( const BCVectorBase bcVectorBase)

Copy Constructor.

Definition at line 79 of file BCVector.cpp.

+ Here is the caller graph for this function:

◆ ~BCVectorBase()

virtual ~BCVectorBase ( )
inlinevirtual

Destructor.

Definition at line 113 of file BCVector.hpp.

Member Function Documentation

◆ operator=()

BCVectorBase & operator= ( BCVectorBase const &  bcVectorBase)
virtual

Assignment operator.

Definition at line 101 of file BCVector.cpp.

+ Here is the caller graph for this function:

◆ operator()()

Real operator() ( const ID globalDofId,
const ID component 
) const
virtual

Return the value of the selected component of rightHandSideVector at position globalDofID.

Parameters
globalDofIdThe global DOF id
componentThe vector component

Reimplemented in BCVectorInterface.

Definition at line 123 of file BCVector.cpp.

◆ clone()

virtual BCVectorBasePtr_Type clone ( ) const
inlinevirtual

Clone the current object.

Returns
Pointer to the cloned object

Reimplemented in BCVectorInterface.

Definition at line 143 of file BCVector.hpp.

◆ robinCoeffVector()

Real robinCoeffVector ( const ID globalDofId,
const ID component 
) const
virtual

Return the value of the selected component of the boundary mass coefficient vector at position dofID.

Parameters
globalDofIdThe global DOF id
componentThe vector component

Reimplemented in BCVectorInterface.

Definition at line 135 of file BCVector.cpp.

◆ betaCoeffVector()

Real betaCoeffVector ( const ID globalDofId,
const ID component 
) const
virtual

Return the value of the selected component of the beta coefficient vector at position dofID.

Parameters
globalDofIdThe global DOF id
componentThe vector component

Reimplemented in BCVectorInterface.

Definition at line 143 of file BCVector.cpp.

◆ showMe()

virtual std::ostream& showMe ( bool  ,
std::ostream &  out = std::cout 
) const
inlinevirtual

showMe

Parameters
verboseThe verbosity
outThe output stream (default: cout)

Reimplemented in BCVectorInterface, and BCVector.

Definition at line 170 of file BCVector.hpp.

◆ rhsVector()

const vector_Type& rhsVector ( ) const
inline

Return the underlying data structure for the RHS vector.

Definition at line 183 of file BCVector.hpp.

+ Here is the caller graph for this function:

◆ nbTotalDOF()

UInt nbTotalDOF ( ) const
inline

Return the number of total DOF.

Definition at line 190 of file BCVector.hpp.

◆ type()

UInt type ( ) const
inline

Return the type of conditions (see BCVector class description)

Definition at line 197 of file BCVector.hpp.

+ Here is the caller graph for this function:

◆ isFinalized()

bool isFinalized ( ) const
inline

determine whether the BCVector is updated

Definition at line 204 of file BCVector.hpp.

◆ isRobinCoeffAVector()

bool isRobinCoeffAVector ( ) const
inline

determine whether the boundary mass coefficient for Robin bc is a Vector

Definition at line 211 of file BCVector.hpp.

◆ isBetaCoeffAVector()

bool isBetaCoeffAVector ( ) const
inline

Definition at line 218 of file BCVector.hpp.

◆ robinCoeff()

Real robinCoeff ( ) const
inline

Return the value of the boundary mass coefficient of Robin conditions.

Definition at line 224 of file BCVector.hpp.

◆ resistanceCoeff()

Real resistanceCoeff ( ) const
inline

Return the value of the resistance coefficient.

Definition at line 231 of file BCVector.hpp.

◆ betaCoeff()

Real betaCoeff ( ) const
inline

Return the value of the beta coefficient.

Definition at line 238 of file BCVector.hpp.

◆ setRobinCoeff()

void setRobinCoeff ( const Real robinBoundaryMassCoeff)
inline

set the boundary mass coefficient of Robin bc

Parameters
robinBoundaryMassCoeffThe boundary mass coefficient of robin conditions

Definition at line 253 of file BCVector.hpp.

◆ setResistanceCoeff()

void setResistanceCoeff ( const Real resistanceCoeff)
inline

set the Resistance coefficient

Parameters
robinBoundaryMassCoeffThe boundary mass coefficient of robin conditions

Definition at line 264 of file BCVector.hpp.

◆ setBetaCoeff()

void setBetaCoeff ( const Real betaCoeff)
inline

set the Beta coefficient FE vector

Parameters
betaCoeffThe beta coefficient

Definition at line 275 of file BCVector.hpp.

+ Here is the caller graph for this function:

◆ setRobinCoeffVector()

void setRobinCoeffVector ( const vector_Type robinBoundaryMassCoeffVector)

set the boundary mass coefficient FE vector for Robin boundary conditions

Parameters
robinBoundaryMassCoeffThe boundary mass coefficient of robin conditions

Definition at line 167 of file BCVector.cpp.

+ Here is the caller graph for this function:

◆ setBetaCoeffVector()

void setBetaCoeffVector ( const vector_Type betaCoeffVector)

set the beta coefficient FE vector

Parameters
betaCoeffVectorThe beta coefficient FE vector

Definition at line 174 of file BCVector.cpp.

◆ setRhsVector()

void setRhsVector ( const vector_Type righHandSideVector,
UInt  numberOfTotalDOF,
UInt  type = 0 
)

set the right hand side FE vector

Parameters
righHandSideVector
numberOfTotalDOF
type

Definition at line 158 of file BCVector.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_rightHandSideVectorPtr

vectorConstPtr_Type M_rightHandSideVectorPtr
protected

The pointer to FE vector for the right hand side part of the equation.

Definition at line 310 of file BCVector.hpp.

◆ M_robinBoundaryMassCoeffVectorPtr

vectorConstPtr_Type M_robinBoundaryMassCoeffVectorPtr
protected

The pointer to FE Vector holding the robin boundary Mass coefficients.

Definition at line 313 of file BCVector.hpp.

◆ M_betaCoeffVectorPtr

vectorConstPtr_Type M_betaCoeffVectorPtr
protected

Definition at line 314 of file BCVector.hpp.

◆ M_numberOfTotalDof

UInt M_numberOfTotalDof
protected

Number of total dof in the vector of data.

Definition at line 317 of file BCVector.hpp.

◆ M_robinBoundaryMassCoeff

Real M_robinBoundaryMassCoeff
protected

Coefficient for boundary mass term in Robin conditions.

Definition at line 320 of file BCVector.hpp.

◆ M_resistanceCoeff

Real M_resistanceCoeff
protected

Coefficient for Resistance coefficient.

Definition at line 323 of file BCVector.hpp.

◆ M_betaCoeff

Real M_betaCoeff
protected

Coefficient for the beta coefficient.

Definition at line 327 of file BCVector.hpp.

◆ M_isRobinBdMassCoeffAVector

bool M_isRobinBdMassCoeffAVector
protected

boolean determining whether the boundary mass coefficient is a FE Vector

Definition at line 330 of file BCVector.hpp.

◆ M_isBetaCoeffAVector

bool M_isBetaCoeffAVector
protected

boolean determining whether the boundary mass coefficient is a FE Vector

Definition at line 333 of file BCVector.hpp.

◆ M_type

UInt M_type
protected

Type of boundary condition; see the BCBase class description.

Definition at line 336 of file BCVector.hpp.

◆ M_finalized

bool M_finalized
protected

true when the BCVector is updated

Definition at line 339 of file BCVector.hpp.


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