LifeV
BCVector Class Reference

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

#include <BCVector.hpp>

+ Inheritance diagram for BCVector:
+ Collaboration diagram for BCVector:

Public Types

typedef BCVectorBase bcVectorBase_Type
 super class More...
 
typedef BCVectorBase::vector_Type vector_Type
 
typedef BCVectorBase::vectorConstPtr_Type vectorConstPtr_Type
 

Constructors and Destructor

 BCVector ()
 Default Constructor. More...
 
 BCVector (const vector_Type &rightHandSideVector, UInt const numberOfTotalDof, UInt type=0)
 Constructor. More...
 
 BCVector (const BCVector &bcVector)
 
virtual ~BCVector ()
 Destructor. More...
 

Operators

BCVectoroperator= (const BCVector &bcVector)
 Assignment operator for BCVector. More...
 

Methods

std::ostream & showMe (bool verbose=false, std::ostream &out=std::cout) const
 showMe More...
 

Additional Inherited Members

- Public Types inherited from BCVectorBase
typedef VectorEpetra vector_Type
 
typedef vector_Type const * vectorConstPtr_Type
 
typedef std::shared_ptr< BCVectorBaseBCVectorBasePtr_Type
 
- Public Member Functions inherited from BCVectorBase
 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...
 
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...
 
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...
 
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...
 
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...
 
- Protected Attributes inherited from BCVectorBase
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...
 

Detailed Description

BCVector - 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. It is derived from the class BCVectorBase 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 the L2 inner product on the boundary, n is the normal, v the given FE vector and phi the FE test function

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

Since the FE vector v is used in the right hand side of the equation, the associate code variable is M_rightHandSideVector (VectorEpetra)

In Robin boundary conditions we add to the matrix the term:
(coeff u, phi)_bd
and to the right hand side of the equation the term:
@ ( v, phi)_bd
The code variables associated with coeff are M_boundaryMassCoeff and M_boundaryMassCoeffVector, the former being a scalar (Real), the latter an FE Vector (VectorEpetra)

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

Definition at line 381 of file BCVector.hpp.

Member Typedef Documentation

◆ bcVectorBase_Type

super class

Definition at line 389 of file BCVector.hpp.

◆ vector_Type

Definition at line 390 of file BCVector.hpp.

◆ vectorConstPtr_Type

Constructor & Destructor Documentation

◆ BCVector() [1/3]

BCVector ( )
inline

Default Constructor.

The user must call setVector(..)

Definition at line 402 of file BCVector.hpp.

◆ BCVector() [2/3]

BCVector ( const vector_Type rightHandSideVector,
UInt const  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 192 of file BCVector.cpp.

◆ BCVector() [3/3]

BCVector ( const BCVector bcVector)

Definition at line 200 of file BCVector.cpp.

+ Here is the caller graph for this function:

◆ ~BCVector()

virtual ~BCVector ( )
inlinevirtual

Destructor.

Definition at line 417 of file BCVector.hpp.

Member Function Documentation

◆ operator=()

BCVector & operator= ( const BCVector bcVector)

Assignment operator for BCVector.

Definition at line 211 of file BCVector.cpp.

◆ showMe()

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

showMe

Parameters
verboseThe verbosity
outThe output stream (default: cout)

Reimplemented from BCVectorBase.

Definition at line 227 of file BCVector.cpp.


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