G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsBoundaryConditions< T > Class Template Reference

Detailed Description

template<class T>
class gismo::gsBoundaryConditions< T >

Class containing a set of boundary conditions.

The boundary conditions are stored in the form of a list of boundary_condition instances.

+ Collaboration diagram for gsBoundaryConditions< T >:

Public Member Functions

void addCondition (int p, boxSide s, condition_type::type t, gsFunctionSet< T > *f, short_t unknown=0, bool parametric=false, int comp=-1)
 Adds another boundary condition. More...
 
void addCornerValue (boxCorner c, T value, int p=0, short_t unknown=0, int component=-1)
 Adds a boundary condition with value on a corner c of patch p for unknown component.
 
void addCornerValue (boundary::corner c, T value, int p=0, short_t unknown=0, int component=-1)
 Adds a boundary condition with value on a corner c of patch p for unknown component.
 
void addCoupled (int p1, boundary::side s1, int p2, boundary::side s2, index_t dim, short_t unknown=0, int comp=-1)
 Couples the degrees of freedom on patch p1 side s1 and patch p2 side s2 for unknown and component comp.
 
void addCoupled (int p1, boxSide s1, int p2, boxSide s2, index_t dim, short_t unknown=0, int comp=-1)
 Couples the degrees of freedom on patch p1 side s1 and patch p2 side s2 for unknown and component comp.
 
void addPeriodic (int p1, boxSide s1, int p2, boxSide s2, short_t dim)
 Add a periodic condition between side s1 of box p1 and side s2 of box p2.
 
const_iterator begin (const std::string &label) const
 Returns a const-iterator to the beginning of the Bc container of type label.
 
iterator begin (const std::string &label)
 Returns an iterator to the beginning of the Bc container of type label.
 
void clearPeriodicPairs ()
 Removes all periodic pairs.
 
const bcContainer & container (const std::string &label) const
 Return a reference to boundary conditions of certain type.
 
const_citerator cornerBegin () const
 
citerator cornerBegin ()
 
const_citerator cornerEnd () const
 
citerator cornerEnd ()
 
const_cpliterator coupledBegin () const
 
cpliterator coupledBegin ()
 
const_cpliterator coupledEnd () const
 
cpliterator coupledEnd ()
 
const_iterator dirichletBegin () const
 
iterator dirichletBegin ()
 
const_iterator dirichletEnd () const
 
iterator dirichletEnd ()
 
const bcContainer & dirichletSides () const
 Return a reference to the Dirichlet sides.
 
const_iterator end (const std::string &label) const
 Returns a const-iterator to the end of the Bc container of type label.
 
iterator end (const std::string &label)
 Returns an iterator to the end of the Bc container of type label.
 
const gsFunctionSet< T > & geoMap () const
 Returns the geometry map.
 
bcRefList get (const std::string &label, const short_t unk=0, int comp=-1) const
 
const boundary_condition< T > * getConditionFromSide (patchSide ps) const
 getSideCondition More...
 
void getConditionFromSide (patchSide ps, bcContainer &result) const
 getConditionFromSide returns the boundary conditions associated to the given patch side More...
 
void getConditionsForPatch (const index_t np, gsBoundaryConditions &result) const
 returns the set of all boundary conditions which refer to patch np More...
 
gsMatrix< T > getTransformMatrix () const
 Get transformation matrix for the periodic pairs of sides.
 
bool hasGeoMap () const
 Checks if a geometry map is stored in the boundary conditions.
 
const_iterator neumannBegin () const
 
iterator neumannBegin ()
 
const_iterator neumannEnd () const
 
iterator neumannEnd ()
 
const bcContainer & neumannSides () const
 Return a reference to the Neumann sides.
 
size_t numPeriodic () const
 Get number of periodic pairs.
 
const_ppiterator periodicBegin () const
 
ppiterator periodicBegin ()
 
const_ppiterator periodicEnd () const
 
ppiterator periodicEnd ()
 
const ppContainer & periodicPairs () const
 Return a reference to the periodic sides.
 
std::ostream & print (std::ostream &os, const bool verbose=false) const
 Prints the object as a string.
 
bcContainer reducedContainer (const bcContainer &container, short_t unknown) const
 Extracts the BC, comming from a certain component.
 
const_iterator robinBegin () const
 
iterator robinBegin ()
 
const_iterator robinEnd () const
 
iterator robinEnd ()
 
const bcContainer & robinSides () const
 Return a reference to the Robin sides.
 
void setGeoMap (const gsFunctionSet< T > &gm)
 Set the geometry map to evaluate boundary conditions.
 
void setIdentityMatrix (short_t dim)
 Set identity transformation matrix for the periodic pairs of sides.
 
void setTransformMatrix (gsMatrix< T > trMatrix)
 Set transformation matrix for the periodic pairs of sides.
 
const_iterator weakDirichletBegin () const
 
iterator weakDirichletBegin ()
 
const_iterator weakDirichletEnd () const
 
iterator weakDirichletEnd ()
 
const bcContainer & weakDirichletSides () const
 Return a reference to the Weak Dirichlet sides.
 

Private Attributes

cornerContainer corner_values
 List of corners with fixed value.
 
cplContainer coupled_boundaries
 List of boundaries that are coupled.
 
bcData m_bc
 Containers for BCs of various types.
 

Member Function Documentation

void addCondition ( int  p,
boxSide  s,
condition_type::type  t,
gsFunctionSet< T > *  f,
short_t  unknown = 0,
bool  parametric = false,
int  comp = -1 
)
inline

Adds another boundary condition.

Creates an object of type boundary_condition and adds is to the list of corresponding boundary conditions.

Parameters
pIndex of the patch
sSide of the patch
tType of boundary condition (see condition_type::type)
fFunction defining the boundary condition
unknownSpecifies which unknown variable the boundary condition refers to (to be used if more than one variable is unknown, e.g., velocity and pressure)
parametricTrue if the function data for this boundary condition is defined in parametric coordinates.
const_citerator cornerBegin ( ) const
inline

Get an iterator to the beginning of the corner values

Returns
an iterator to the beginning of the corner values
citerator cornerBegin ( )
inline

Get an iterator to the beginning of the corner values

Returns
an iterator to the beginning of the corner values
const_citerator cornerEnd ( ) const
inline

Get an iterator to the end of corner values

Returns
an iterator to the end of the corner values
citerator cornerEnd ( )
inline

Get an iterator to the end of corner values

Returns
an iterator to the end of the corner values
const_cpliterator coupledBegin ( ) const
inline

Get an iterator to the beginning of the coupled boundaries

Returns
an iterator to the beginning of the coupled boundaries
cpliterator coupledBegin ( )
inline

Get an iterator to the beginning of the coupled boundaries

Returns
an iterator to the beginning of the coupled boundaries
const_cpliterator coupledEnd ( ) const
inline

Get an iterator to the end of coupled boundaries

Returns
an iterator to the end of the coupled boundaries
cpliterator coupledEnd ( )
inline

Get an iterator to the end of coupled boundaries

Returns
an iterator to the end of the coupled boundaries
const_iterator dirichletBegin ( ) const
inline

Get a const-iterator to the beginning of the Dirichlet sides

Returns
an iterator to the beginning of the Dirichlet sides
iterator dirichletBegin ( )
inline

Get an iterator to the beginning of the Dirichlet sides

Returns
an iterator to the beginning of the Dirichlet sides
const_iterator dirichletEnd ( ) const
inline

Get a const-iterator to the end of the Dirichlet sides

Returns
an iterator to the end of the Dirichlet sides
iterator dirichletEnd ( )
inline

Get an iterator to the end of the Dirichlet sides

Returns
an iterator to the end of the Dirichlet sides
bcRefList get ( const std::string &  label,
const short_t  unk = 0,
int  comp = -1 
) const
inline

Return a reference to boundary conditions of certain type for unknown unk

const boundary_condition<T>* getConditionFromSide ( patchSide  ps) const
inline

getSideCondition

Parameters
psthe patch side
Returns
the boundary condition associated to ps or NULL if no condition is associated to ps

It is the task of the user of this function to check if the returned pointer is NULL.

Do not use this function if you want to apply boundary conditions during matrix assembly. Instead, iterate over all conditions of the type you need (eg. Neumann, Dirichlet)

void getConditionFromSide ( patchSide  ps,
bcContainer &  result 
) const
inline

getConditionFromSide returns the boundary conditions associated to the given patch side

Parameters
[in]pspatch side
[out]resultbcContainer containing the boundary conditions associated to ps
void getConditionsForPatch ( const index_t  np,
gsBoundaryConditions< T > &  result 
) const
inline

returns the set of all boundary conditions which refer to patch np

Parameters
[in]npthe patch index
[out]resultthe new set of boundary conditions
const_iterator neumannBegin ( ) const
inline

Get a const-iterator to the beginning of the Neumann sides

Returns
an iterator to the beginning of the Neumann sides
iterator neumannBegin ( )
inline

Get an iterator to the beginning of the Neumann sides

Returns
an iterator to the beginning of the Neumann sides
const_iterator neumannEnd ( ) const
inline

Get a const-iterator to the end of the Neumann sides

Returns
an iterator to the end of the Neumann sides
iterator neumannEnd ( )
inline

Get an iterator to the end of the Neumann sides

Returns
an iterator to the end of the Neumann sides
const_ppiterator periodicBegin ( ) const
inline

Get a const-iterator to the beginning of the periodic sides

Returns
an iterator to the beginning of the periodic sides
ppiterator periodicBegin ( )
inline

Get an iterator to the beginning of the periodic sides

Returns
an iterator to the beginning of the periodic sides
const_ppiterator periodicEnd ( ) const
inline

Get a const-iterator to the end of the periodic sides

Returns
an iterator to the end of the periodic sides
ppiterator periodicEnd ( )
inline

Get an iterator to the end of the periodic sides

Returns
an iterator to the end of the periodic sides
const_iterator robinBegin ( ) const
inline

Get a const-iterator to the beginning of the Robin sides

Returns
an iterator to the beginning of the Robin sides
iterator robinBegin ( )
inline

Get an iterator to the beginning of the Robin sides

Returns
an iterator to the beginning of the Robin sides
const_iterator robinEnd ( ) const
inline

Get a const-iterator to the end of the Robin sides

Returns
an iterator to the end of the Robin sides
iterator robinEnd ( )
inline

Get an iterator to the end of the Robin sides

Returns
an iterator to the end of the Robin sides
const_iterator weakDirichletBegin ( ) const
inline

Get a const-iterator to the beginning of the Weak Dirichlet sides

Returns
an iterator to the beginning of the Weak Dirichlet sides
iterator weakDirichletBegin ( )
inline

Get an iterator to the beginning of the Weak Dirichlet sides

Returns
an iterator to the beginning of the Weak Dirichlet sides
const_iterator weakDirichletEnd ( ) const
inline

Get a const-iterator to the end of the Weak Dirichlet sides

Returns
an iterator to the end of the Weak Dirichlet sides
iterator weakDirichletEnd ( )
inline

Get an iterator to the end of the Weak Dirichlet sides

Returns
an iterator to the end of the Weak Dirichlet sides