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

Detailed Description

template<typename T>
class gismo::gsGridHierarchy< T >

Grid Hierarchy.

This class allows to construct a grid hierarchy and stors a grid hierarchy (vector of bases, local transfer matrices and transfer matrices). The transfer matrices can then be used for the setup of a gsMultiGridOp object.

Public Member Functions

void clear ()
 Reset the object (to save memory)
 
const std::vector
< gsMultiBasis< T > > & 
getMultiBases () const
 Get the vector of gsMultiBasis objects (by reference)
 
const std::vector
< gsSparseMatrix< T, RowMajor > > & 
getTransferMatrices () const
 Get the vector of transfer matrices (by reference)
 
gsGridHierarchymoveMultiBasesTo (std::vector< gsMultiBasis< T > > &o)
 Get the vector of gsMultiBasis objects.
 
gsGridHierarchymoveTransferMatricesTo (std::vector< gsSparseMatrix< T, RowMajor > > &o)
 Get the vector of transfer matrices.
 

Static Public Member Functions

static gsGridHierarchy buildByCoarsening (gsMultiBasis< T > mBasis, const gsBoundaryConditions< T > &boundaryConditions, const gsOptionList &assemblerOptions, index_t levels, index_t degreesOfFreedom=0, index_t unk=0)
 This function sets up a grid hierarchy by coarsening. More...
 
static gsGridHierarchy buildByCoarsening (gsMultiBasis< T > mBasis, const gsBoundaryConditions< T > &boundaryConditions, const gsOptionList &options)
 This function sets up a grid hierarchy by coarsening. More...
 
static gsGridHierarchy buildByRefinement (gsMultiBasis< T > mBasis, const gsBoundaryConditions< T > &boundaryConditions, const gsOptionList &assemblerOptions, index_t levels, index_t numberOfKnotsToBeInserted=1, index_t multiplicityOfKnotsToBeInserted=1, index_t unk=0)
 This function sets up a multigrid hierarchy by uniform refinement. More...
 
static gsGridHierarchy buildByRefinement (gsMultiBasis< T > mBasis, const gsBoundaryConditions< T > &boundaryConditions, const gsOptionList &options)
 This function sets up a multigrid hierarchy by uniform refinement. More...
 
static gsOptionList defaultOptions ()
 Get the default options.
 

Member Function Documentation

gsGridHierarchy< T > buildByCoarsening ( gsMultiBasis< T >  mBasis,
const gsBoundaryConditions< T > &  boundaryConditions,
const gsOptionList assemblerOptions,
index_t  levels,
index_t  degreesOfFreedom = 0,
index_t  unk = 0 
)
static

This function sets up a grid hierarchy by coarsening.

Parameters
mBasisThe gsMultiBasis to be coarsened (initial basis)
boundaryConditionsThe boundary conditions
assemblerOptionsA gsOptionList defining a "DirichletStrategy" and a "InterfaceStrategy"
levelsThe maximum number of levels
degreesOfFreedomNumber of dofs in the coarsest grid in the grid hierarchy
unkSince the gsBoundaryCondition object can obtain data for systems of PDEs, we have to provide information concerning which unknown we are refering to.

The algorithm terminates if either the number of levels is reached or the number of degrees of freedom is below the given threshold.

static gsGridHierarchy buildByCoarsening ( gsMultiBasis< T >  mBasis,
const gsBoundaryConditions< T > &  boundaryConditions,
const gsOptionList options 
)
inlinestatic

This function sets up a grid hierarchy by coarsening.

Parameters
mBasisThe gsMultiBasis to be coarsened (initial basis)
boundaryConditionsThe boundary conditions
optionsA gsOptionList defining the necessary infomation

Takes boundary conditions for unkown 0.

gsGridHierarchy< T > buildByRefinement ( gsMultiBasis< T >  mBasis,
const gsBoundaryConditions< T > &  boundaryConditions,
const gsOptionList assemblerOptions,
index_t  levels,
index_t  numberOfKnotsToBeInserted = 1,
index_t  multiplicityOfKnotsToBeInserted = 1,
index_t  unk = 0 
)
static

This function sets up a multigrid hierarchy by uniform refinement.

Parameters
mBasisThe gsMultiBasis to be refined (initial basis)
boundaryConditionsThe boundary conditions
assemblerOptionsA gsOptionList defining a "DirichletStrategy" and a "InterfaceStrategy"
levelsThe number of levels
numberOfKnotsToBeInsertedThe number of knots to be inserted, defaulted to 1
multiplicityOfKnotsToBeInsertedThe multiplicity of the knots to be inserted, defaulted to 1
unkSince the gsBoundaryCondition object can obtain data for systems of PDEs, we have to provide information concerning which unknown we are refering to.
static gsGridHierarchy buildByRefinement ( gsMultiBasis< T >  mBasis,
const gsBoundaryConditions< T > &  boundaryConditions,
const gsOptionList options 
)
inlinestatic

This function sets up a multigrid hierarchy by uniform refinement.

Parameters
mBasisThe gsMultiBasis to be refined (initial basis)
boundaryConditionsThe boundary conditions
optionsA gsOptionList defining the necessary infomation Takes boundary conditions for unknown 0.