34template<
class T,
int D>
38 typedef typename std::vector<T>::const_iterator uiter;
43 : d( breaks_.size() ),
54 for (
int i=0; i < d; ++i)
56 meshEnd[i] = breaks[i].end() - 1;
57 curElement[i] = meshStart[i] = breaks[i].begin();
59 if (meshEnd[i] == meshStart[i])
80 for (
int i=0; i < d; ++i)
82 breaks.push_back(
m_basis->component(i).domain()->breaks() );
84 meshEnd[i] = breaks[i].end() - 1;
85 curElement[i] = meshStart[i] = breaks[i].begin();
87 if (meshEnd[i] == meshStart[i])
110 for (
index_t i = 0; i < increment; i++)
124 curElement = meshStart;
125 m_isGood = ( meshEnd.array() != meshStart.array() ).all() ;
137 for (
int i = 0; i < d; ++i)
138 curr_index[i] = curElement[i] - breaks[i].begin();
144 result.resize( D, 1 << D);
152 for (
int i = 0; i< D; ++i)
153 result(i,r) = ( v[i] ? upper[i] : lower[i] );
164 bool isBoundaryElement()
const
166 for (
int i = 0; i< D; ++i)
167 if ((lower[i]-*meshStart[i]==0) ||
168 (*meshEnd[0]-upper[0] ==0) )
173 index_t domainDim()
const {
return d;}
182 for (
int i = 0; i < d; ++i)
184 lower[i] = *curElement[i];
185 upper[i] = *(curElement[i]+1);
186 center[i] = (T)(0.5) * (lower[i] + upper[i]);
209 std::vector< std::vector<T> > breaks;
221# define Eigen gsEigen
222 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
A basis represents a family of scalar basis functions defined over a common parameter domain.
Definition gsBasis.h:79
Class which enables iteration over all elements of a parameter domain.
Definition gsDomainIterator.h:68
bool m_isGood
Definition gsDomainIterator.h:223
gsVector< T > center
Coordinates of a central point in the element (in the parameter domain).
Definition gsDomainIterator.h:215
const gsBasis< T > * m_basis
The basis on which the domain iterator is defined.
Definition gsDomainIterator.h:219
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
Re-implements gsDomainIterator for iteration over all elements of a tensor product parameter domain....
Definition gsTensorDomainIterator.h:36
const gsVector< T > & upperCorner() const
Returns the upper corner of the current element.
Definition gsTensorDomainIterator.h:161
gsVector< unsigned, D > index() const
return the tensor index of the current element
Definition gsTensorDomainIterator.h:134
bool next(index_t increment)
Proceeds to the next element (skipping increment elements).
Definition gsTensorDomainIterator.h:108
const gsVector< T > & lowerCorner() const
Returns the lower corner of the current element.
Definition gsTensorDomainIterator.h:158
bool next()
Proceeds to the next element.
Definition gsTensorDomainIterator.h:96
void update()
Definition gsTensorDomainIterator.h:180
void reset()
Resets the iterator so that it points to the first element.
Definition gsTensorDomainIterator.h:121
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
bool nextLexicographic(Vec &cur, const Vec &size)
Iterates through a tensor lattice with the given size. Updates cur and returns true if another entry ...
Definition gsCombinatorics.h:196
bool nextCubeVertex(Vec &cur, const Vec &start, const Vec &end)
Iterate in lexicographic order through the vertices of the cube [start,end]. Updates cur with the cur...
Definition gsCombinatorics.h:252
Provides combinatorial unitilies.
#define index_t
Definition gsConfig.h:32
Provides declaration of DomainIterator abstract interface.
Provides the Gauss-Legendre quadrature rule.
The G+Smo namespace, containing all definitions for the library.