32    index_t numberOfKnotsToBeInserted,
 
   33    index_t multiplicityOfKnotsToBeInserted,
 
   38    result.m_mBases.resize(levels);
 
   39    result.m_transferMatrices.resize(levels-1);
 
   40    result.m_mBases[0] = 
give(mBasis);
 
   41    for ( 
index_t i=1; i<levels; ++i )
 
   43        result.m_mBases[i] = result.m_mBases[i-1];
 
   44        result.m_mBases[i].uniformRefine_withTransfer(
 
   45            result.m_transferMatrices[i-1],
 
   48            numberOfKnotsToBeInserted,
 
   49            multiplicityOfKnotsToBeInserted,
 
 
   68    result.m_mBases.push_back(
give(mBasis));
 
   70    index_t lastSize = result.m_mBases[0].totalSize();
 
   72    for (
index_t i = 0; i < levels-1 && lastSize > degreesOfFreedom; ++i)
 
   88        if (lastSize <= newSize && degreesOfFreedom > 0)
 
   92        result.m_mBases.push_back(
give(coarseMBasis));
 
   93        result.m_transferMatrices.push_back(
give(transferMatrix));
 
   96    std::reverse( result.m_mBases.begin(), result.m_mBases.end() );
 
   97    std::reverse( result.m_transferMatrices.begin(), result.m_transferMatrices.end() );
 
 
Class containing a set of boundary conditions.
Definition gsBoundaryConditions.h:342
Grid Hierarchy.
Definition gsGridHierarchy.h:34
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.
Definition gsGridHierarchy.hpp:27
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.
Definition gsGridHierarchy.hpp:57
Holds a set of patch-wise bases and their topology information.
Definition gsMultiBasis.h:37
size_t totalSize() const
The total number of basis functions in all bases.
Definition gsMultiBasis.h:246
void uniformCoarsen_withTransfer(gsSparseMatrix< T, RowMajor > &transfer, const gsBoundaryConditions< T > &boundaryConditions, const gsOptionList &assemblerOptions, int numKnots=1, index_t unk=0)
Coarsen every basis uniformly.
Definition gsMultiBasis.hpp:222
Class which holds a list of parameters/options, and provides easy access to them.
Definition gsOptionList.h:33
Sparse matrix class, based on gsEigen::SparseMatrix.
Definition gsSparseMatrix.h:139
Provides assembler and solver options.
Provides declaration of BSplineBasis class.
#define index_t
Definition gsConfig.h:32
Knot vector for B-splines.
Provides declaration of MultiBasis class.
Provides a list of labeled parameters/options that can be set and accessed easily.
Provides declaration of TensorBSplineBasis abstract interface.
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266