29 const size_t nPatches = bases.
nBases();
34 for (
size_t k = 1; k < nPatches; ++k)
39 m_dofs.resize(nComp, std::vector<index_t>(
m_numFreeDofs.back(), 0));
45 const index_t numComp = bases.size();
51 const size_t nPatches = bases[0]->nBases();
54 std::vector<index_t> offsets(nPatches);
55 for (
index_t comp = 0; comp < numComp; ++comp)
57 for (
size_t k = 0; k < nPatches; ++k)
62 "The sizes of the bases are not the same for every component. Dofmapper requries this!");
64 offsets[k] = bases[comp]->basis(k).size();
71 for (
size_t k = 1; k < nPatches; ++k)
77 for (
index_t comp = 0; comp < numComp; ++comp)
78 dofsPatches += bases[comp]->back().size();
90 m_dofs.resize(numComp, std::vector<index_t>(
m_numFreeDofs.back(), 0));
100 for (
typename gsBoundaryConditions<T>::const_iterator
103 if (unk == -1 || it->unknown() == unk)
106 "Problem: a boundary condition is set on a patch id which does not exist.");
114 for (
typename gsBoundaryConditions<T>::const_citerator
117 if (unk == -1 || it->unknown == unk)
120 "Problem: a corner boundary condition is set on a patch id which does not exist.");
122 eliminateDof(basis[it->patch].functionAtCorner(it->corner), it->patch);
137 m_dofs.resize(nComp, std::vector<index_t>(
m_numFreeDofs.back(), 0));
void init(const gsMultiBasis< T > &bases, index_t nComp=1)
Initialize by a gsMultiBasis.
Definition: gsDofMapper.hpp:20
const_citerator cornerBegin() const
Definition: gsBoundaryConditions.h:561
const_iterator dirichletBegin() const
Definition: gsBoundaryConditions.h:490
std::vector< size_t > m_offset
Offsets.
Definition: gsDofMapper.h:571
std::vector< index_t > m_numCpldDofs
Offsets of coupled dofs, nComp+1.
Definition: gsDofMapper.h:584
int size(size_t i) const
The number of basis functions in basis i.
Definition: gsMultiBasis.h:232
Provides declaration of MultiBasis class.
void initSingle(const gsBasis< T > &basis, index_t nComp=1)
Initialize by a single basis patch.
Definition: gsDofMapper.hpp:128
virtual index_t size() const
size
Definition: gsFunctionSet.h:578
index_t m_shift
Shifting of the global index (zero by default)
Definition: gsDofMapper.h:574
#define index_t
Definition: gsConfig.h:32
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
void markBoundary(index_t k, const gsMatrix< index_t > &boundaryDofs, index_t comp=0)
Mark the local dofs boundaryDofs of patch k as eliminated.
Definition: gsDofMapper.cpp:188
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
void eliminateDof(index_t i, index_t k, index_t comp=0)
Mark the local dof i of patch k as eliminated.
Definition: gsDofMapper.cpp:214
const_citerator cornerEnd() const
Definition: gsBoundaryConditions.h:566
index_t m_bshift
Shifting of the boundary index (zero by default)
Definition: gsDofMapper.h:577
Class containing a set of boundary conditions.
Definition: gsBoundaryConditions.h:341
index_t size() const
Returns the total number of dofs (free and eliminated).
Definition: gsDofMapper.h:421
std::vector< index_t > m_numFreeDofs
Offsets of free dofs, nComp+1.
Definition: gsDofMapper.h:580
size_t nBases() const
Number of patch-wise bases.
Definition: gsMultiBasis.h:264
std::vector< index_t > m_numElimDofs
Offsets of eliminated dofs, nComp+1.
Definition: gsDofMapper.h:582
const_iterator dirichletEnd() const
Definition: gsBoundaryConditions.h:495
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78