│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
79 typedef typename std::conditional<dim==coorddim,
│ │ │ -
80 DiagonalMatrix<ctype,dim>,
│ │ │ -
│ │ │ -
│ │ │ -
89 typedef typename std::conditional<dim==coorddim,
│ │ │ -
90 DiagonalMatrix<ctype,dim>,
│ │ │ -
│ │ │ -
│ │ │ -
100 using Jacobian = std::conditional_t<dim==coorddim, DiagonalMatrix<ctype,dim>, FieldMatrix<ctype,coorddim,dim> >;
│ │ │ -
│ │ │ -
109 using JacobianInverse = std::conditional_t<dim==coorddim, DiagonalMatrix<ctype,dim>, FieldMatrix<ctype,dim,coorddim> >;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
125 const Dune::FieldVector<ctype,coorddim> upper)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
130 static_assert(dim==coorddim,
"Use this constructor only if dim==coorddim!");
│ │ │ -
│ │ │ -
132 axes_ = (1<<coorddim)-1;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
143 const Dune::FieldVector<ctype,coorddim> upper,
│ │ │ -
144 const std::bitset<coorddim>& axes)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
149 assert(axes.count()==dim);
│ │ │ -
150 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
│ │ │ -
152 upper_[i] = lower_[i];
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
173 if (dim == coorddim) {
│ │ │ -
174 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
175 result[i] = lower_[i] +
local[i]*(upper_[i] - lower_[i]);
│ │ │ -
176 }
else if (dim == 0) {
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
180 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
181 result[i] = (axes_[i])
│ │ │ -
182 ? lower_[i] +
local[lc++]*(upper_[i] - lower_[i])
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
192 if (dim == coorddim) {
│ │ │ -
193 for (
size_t i=0; i<dim; i++)
│ │ │ -
194 result[i] = (
global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ -
195 }
else if (dim != 0) {
│ │ │ -
│ │ │ -
197 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
│ │ │ -
199 result[lc++] = (
global[i] - lower_[i]) / (upper_[i] - lower_[i]);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
17#include <dune/common/exceptions.hh>
│ │ │ +
18#include <dune/common/fvector.hh>
│ │ │ +
19#include <dune/common/iteratorfacades.hh>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
35 template<
int dimension,
class CoordType>
│ │ │ +
36 typename VirtualRefinement<dimension, CoordType>::VertexIterator
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
43 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
51 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
59 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
71 template<
int dimension,
class CoordType,
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
75 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
80 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
91 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
96 return static_cast<const Common *
>(
this)->backend->vertexIndices();
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
100 template<
int dimension,
class CoordType>
│ │ │ +
101 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
103 :
public ForwardIteratorFacade<typename VirtualRefinement<dimension, CoordType>::template Codim<codimension>::SubEntityIterator, int>,
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
132 template<
int dimension,
class CoordType>
│ │ │ +
133 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
139 template<
int dimension,
class CoordType>
│ │ │ +
140 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
143 : backend(other.backend->clone())
│ │ │ +
│ │ │ +
│ │ │ +
146 template<
int dimension,
class CoordType>
│ │ │ +
147 template<
int codimension>
│ │ │ +
148 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
154 template<
int dimension,
class CoordType>
│ │ │ +
155 template<
int codimension>
│ │ │ +
│ │ │ +
157 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ +
158 operator=(
const This &other)
│ │ │ +
│ │ │ +
│ │ │ +
161 backend = other.backend->clone();
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
165 template<
int dimension,
class CoordType>
│ │ │ +
166 template<
int codimension>
│ │ │ +
│ │ │ +
168 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ +
169 equals(
const This &other)
const
│ │ │ +
170 {
return *backend == *(other.backend); }
│ │ │ +
│ │ │ +
172 template<
int dimension,
class CoordType>
│ │ │ +
173 template<
int codimension>
│ │ │ +
│ │ │ +
175 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
181 template<
int dimension,
class CoordType>
│ │ │ +
182 template<
int codimension>
│ │ │ +
│ │ │ +
184 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ +
│ │ │ +
186 {
return backend->index(); }
│ │ │ +
│ │ │ +
188 template<
int dimension,
class CoordType>
│ │ │ +
189 template<
int codimension>
│ │ │ +
│ │ │ +
191 VirtualRefinement<dimension, CoordType>::Codim<codimension>::SubEntityIterator::
│ │ │ +
│ │ │ +
193 {
return backend->coords(); }
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
200 template<
int dimension,
class CoordType,
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
204 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
256 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
257 result[i] = CoordType(0.5) * (lower_[i] + upper_[i]);
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
272 if (dim == coorddim) {
│ │ │ -
273 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
274 result[i] = (k & (1<<i)) ? upper_[i] : lower_[i];
│ │ │ -
275 }
else if (dim == 0) {
│ │ │ -
│ │ │ -
│ │ │ -
278 unsigned int mask = 1;
│ │ │ -
│ │ │ -
280 for (
size_t i=0; i<coorddim; i++) {
│ │ │ -
│ │ │ -
282 result[i] = lower_[i];
│ │ │ -
│ │ │ -
284 result[i] = (k & mask) ? upper_[i] : lower_[i];
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
214 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
228 template<
int dimension,
class CoordType>
│ │ │ +
229 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
258 template<
unsigned topologyId,
class CoordType,
│ │ │ +
259 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
260 class VirtualRefinementImp
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
267 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
274 static VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension> &
instance();
│ │ │ +
│ │ │ +
276 VirtualRefinementImp() {}
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
284 template<
unsigned topologyId,
class CoordType,
│ │ │ +
285 unsigned coerceToId,
int dimension>
│ │ │ +
286 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension> &
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
289 static VirtualRefinementImp instance_{};
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
293 template<
unsigned topologyId,
class CoordType,
│ │ │ +
294 unsigned coerceToId,
int dimension>
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
298 if (dim == coorddim) {
│ │ │ -
299 for (
size_t i=0; i<dim; i++)
│ │ │ -
300 vol *= upper_[i] - lower_[i];
│ │ │ -
│ │ │ -
302 }
else if (dim != 0) {
│ │ │ -
303 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
│ │ │ -
305 vol *= upper_[i] - lower_[i];
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
325 for (
size_t i=0; i<dim; i++)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
301 template<
unsigned topologyId,
class CoordType,
│ │ │ +
302 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
310 template<
unsigned topologyId,
class CoordType,
│ │ │ +
311 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
313 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
319 template<
unsigned topologyId,
class CoordType,
│ │ │ +
320 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
326 template<
unsigned topologyId,
class CoordType,
│ │ │ +
327 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
336 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
344 for (
size_t i=0; i<dim; i++)
│ │ │ -
│ │ │ -
│ │ │ +
335 template<
unsigned topologyId,
class CoordType,
│ │ │ +
336 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
355 for (
size_t i=0; i<coorddim; i++)
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ +
│ │ │ +
349 template<
unsigned topologyId,
class CoordType,
│ │ │ +
│ │ │ +
350 unsigned coerceToId,
int dimension,
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
354 template<
unsigned topologyId,
class CoordType,
│ │ │ +
355 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
│ │ │ +
357 :
public VirtualRefinement<dimension, CoordType>::template SubEntityIteratorBack<dimension>
│ │ │ +
│ │ │ +
│ │ │
│ │ │ -
360 Dune::FieldVector<ctype,coorddim> lower_;
│ │ │ +
│ │ │
│ │ │ -
362 Dune::FieldVector<ctype,coorddim> upper_;
│ │ │ -
│ │ │ -
364 std::bitset<coorddim> axes_;
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
│ │ │ -
A unique label for each type of element that can occur in a grid.
│ │ │ +
362 template<
unsigned topologyId,
class CoordType,
│ │ │ +
363 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
│ │ │ +
365 :
public VirtualRefinement<dimension, CoordType>::template SubEntityIteratorBack<0>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
369 typedef typename VirtualRefinementImp::template SubEntityIteratorBack<0>
Common;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
377 template<
unsigned topologyId,
class CoordType,
│ │ │ +
378 unsigned coerceToId,
int dimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
384 vIndices.reserve(StaticRefinement::IndexVector::dimension);
│ │ │ +
│ │ │ +
│ │ │ +
387 for(
int i = 0; i < StaticRefinement::IndexVector::dimension; ++i)
│ │ │ +
388 vIndices.push_back(sIndices[i]);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
393 template<
unsigned topologyId,
class CoordType,
│ │ │ +
394 unsigned coerceToId,
int dimension>
│ │ │ +
395 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
421 template<
unsigned topologyId,
class CoordType,
│ │ │ +
422 unsigned coerceToId,
int dimension>
│ │ │ +
423 template<
int codimension>
│ │ │ +
│ │ │ +
424 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack<codimension>::
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
429 template<
unsigned topologyId,
class CoordType,
│ │ │ +
430 unsigned coerceToId,
int dimension>
│ │ │ +
431 template<
int codimension>
│ │ │ +
│ │ │ +
432 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack<codimension>::
│ │ │ +
433 SubEntityIteratorBack(
const This &other)
│ │ │ +
│ │ │ +
435 backend(other.backend)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
438 template<
unsigned topologyId,
class CoordType,
unsigned coerceToId,
int dimension>
│ │ │ +
439 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
441 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack<codimension>::
│ │ │ +
│ │ │ +
443 {
return new This(*
this); }
│ │ │ +
│ │ │ +
│ │ │ +
445 template<
unsigned topologyId,
class CoordType,
unsigned coerceToId,
int dimension>
│ │ │ +
446 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
448 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack<codimension>::
│ │ │ +
449 operator==(
const Base &other)
const
│ │ │ +
│ │ │ +
│ │ │ +
452 return backend ==
dynamic_cast<const This &
>(other).backend;
│ │ │ +
│ │ │ +
454 catch(
const std::bad_cast&)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
460 template<
unsigned topologyId,
class CoordType,
unsigned coerceToId,
int dimension>
│ │ │ +
461 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
463 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack<codimension>::
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
470 template<
unsigned topologyId,
class CoordType,
unsigned coerceToId,
int dimension>
│ │ │ +
471 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
473 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack<codimension>::
│ │ │ +
│ │ │ +
475 {
return backend.index(); }
│ │ │ +
│ │ │ +
│ │ │ +
477 template<
unsigned topologyId,
class CoordType,
unsigned coerceToId,
int dimension>
│ │ │ +
478 template<
int codimension>
│ │ │ +
│ │ │ +
│ │ │ +
480 VirtualRefinementImp<topologyId, CoordType, coerceToId, dimension>::SubEntityIteratorBack<codimension>::
│ │ │ +
│ │ │ +
482 {
return backend.coords(); }
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
489 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
502 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
510 assert(geometryType.
dim() == dimension && coerceTo.
dim() == dimension);
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
517 template<
int dimension,
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
523 build(
unsigned topologyId,
unsigned coerceToId)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
562 DUNE_THROW( NotImplemented,
"No Refinement<" << topologyId <<
", CoordType, "
│ │ │ +
563 << coerceToId <<
" >.");
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
567 template<
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
570 static const std::size_t dimension = 1;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
574 build(
unsigned topologyId,
unsigned coerceToId)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
581 if (topologyId == 0 && coerceToId == 0)
│ │ │ +
│ │ │ +
│ │ │ +
584 DUNE_THROW( NotImplemented,
"No Refinement<" << topologyId <<
", CoordType, "
│ │ │ +
585 << coerceToId <<
" >.");
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
589 template<
class CoordType>
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
592 static const std::size_t dimension = 3;
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
596 build(
unsigned topologyId,
unsigned coerceToId)
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
659 DUNE_THROW( NotImplemented,
"No Refinement<" << topologyId <<
", CoordType, "
│ │ │ +
660 << coerceToId <<
" >.");
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
│ │ │ +
A unique label for each type of element that can occur in a grid.
│ │ │ +
This file simply includes all Refinement implementations so you don't have to do them separately.
│ │ │
constexpr GeometryType cube(unsigned int dim)
Returns a GeometryType representing a hypercube of dimension dim.
Definition type.hh:462
│ │ │ +
constexpr GeometryType prism
GeometryType representing a 3D prism.
Definition type.hh:528
│ │ │ +
constexpr GeometryType pyramid
GeometryType representing a 3D pyramid.
Definition type.hh:522
│ │ │ +
constexpr GeometryType simplex(unsigned int dim)
Returns a GeometryType representing a simplex of dimension dim.
Definition type.hh:453
│ │ │
Definition affinegeometry.hh:22
│ │ │ -
Volume volume() const
Return the element volume.
Definition axisalignedcubegeometry.hh:295
│ │ │ -
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const Dune::FieldVector< ctype, coorddim > upper, const std::bitset< coorddim > &axes)
Constructor from a lower left and an upper right corner.
Definition axisalignedcubegeometry.hh:142
│ │ │ -
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower, const Dune::FieldVector< ctype, coorddim > upper)
Constructor from a lower left and an upper right corner.
Definition axisalignedcubegeometry.hh:124
│ │ │ -
JacobianInverse jacobianInverse(const LocalCoordinate &local) const
Inverse Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:235
│ │ │ -
JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
Inverse Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:217
│ │ │ -
std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, dim, coorddim > >::type JacobianTransposed
Return type of jacobianTransposed.
Definition axisalignedcubegeometry.hh:81
│ │ │ -
AxisAlignedCubeGeometry(const Dune::FieldVector< ctype, coorddim > lower)
Constructor from a single point only.
Definition axisalignedcubegeometry.hh:159
│ │ │ -
static constexpr int mydimension
Definition axisalignedcubegeometry.hh:56
│ │ │ -
friend Dune::ReferenceElements< ctype, dim >::ReferenceElement referenceElement(const AxisAlignedCubeGeometry &)
Definition axisalignedcubegeometry.hh:316
│ │ │ -
static constexpr int coorddimension
Definition axisalignedcubegeometry.hh:59
│ │ │ -
GlobalCoordinate corner(int k) const
Return world coordinates of the k-th corner of the element.
Definition axisalignedcubegeometry.hh:269
│ │ │ -
ctype Volume
Type used for volume.
Definition axisalignedcubegeometry.hh:71
│ │ │ -
FieldVector< ctype, dim > LocalCoordinate
Type used for a vector of element coordinates.
Definition axisalignedcubegeometry.hh:65
│ │ │ -
JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
Jacobian transposed of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:205
│ │ │ -
FieldVector< ctype, coorddim > GlobalCoordinate
Type used for a vector of world coordinates.
Definition axisalignedcubegeometry.hh:68
│ │ │ -
LocalCoordinate local(const GlobalCoordinate &global) const
Definition axisalignedcubegeometry.hh:189
│ │ │ -
CoordType ctype
Type used for single coordinate coefficients.
Definition axisalignedcubegeometry.hh:62
│ │ │ -
std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, coorddim, dim > > Jacobian
Return type of jacobian.
Definition axisalignedcubegeometry.hh:100
│ │ │ -
GeometryType type() const
Type of the cube. Here: a hypercube of the correct dimension.
Definition axisalignedcubegeometry.hh:164
│ │ │ -
int corners() const
Return the number of corners of the element.
Definition axisalignedcubegeometry.hh:263
│ │ │ -
Jacobian jacobian(const LocalCoordinate &local) const
Jacobian of the transformation from local to global coordinates.
Definition axisalignedcubegeometry.hh:229
│ │ │ -
std::conditional< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, coorddim, dim > >::type JacobianInverseTransposed
Return type of jacobianInverseTransposed.
Definition axisalignedcubegeometry.hh:91
│ │ │ -
Volume integrationElement(const LocalCoordinate &local) const
Return the integration element, i.e., the determinant term in the integral transformation formula.
Definition axisalignedcubegeometry.hh:243
│ │ │ -
GlobalCoordinate center() const
Return center of mass of the element.
Definition axisalignedcubegeometry.hh:249
│ │ │ -
AxisAlignedCubeGeometry()=default
Constructs an empty geometry.
│ │ │ -
bool affine() const
Return if the element is affine. Here: yes.
Definition axisalignedcubegeometry.hh:311
│ │ │ -
std::conditional_t< dim==coorddim, DiagonalMatrix< ctype, dim >, FieldMatrix< ctype, dim, coorddim > > JacobianInverse
Return type of jacobianInverse.
Definition axisalignedcubegeometry.hh:109
│ │ │ -
GlobalCoordinate global(const LocalCoordinate &local) const
Map a point in local (element) coordinates to world coordinates.
Definition axisalignedcubegeometry.hh:170
│ │ │ +
VirtualRefinement< dimension, CoordType > & buildRefinement(GeometryType geometryType, GeometryType coerceTo)
return a reference to the VirtualRefinement according to the parameters
Definition virtualrefinement.cc:504
│ │ │ +
Static tag representing a codimension.
Definition dimension.hh:24
│ │ │ +
Holds the number of refined intervals per axis needed for virtual and static refinement.
Definition base.cc:94
│ │ │ +
Wrap each Refinement implementation to get a consistent interface.
Definition base.cc:141
│ │ │ +
static ElementIterator eEnd(Dune::RefinementIntervals tag)
Get an ElementIterator.
Definition base.cc:247
│ │ │ +
static ElementIterator eBegin(Dune::RefinementIntervals tag)
Get an ElementIterator.
Definition base.cc:237
│ │ │ +
static int nElements(Dune::RefinementIntervals tag)
Get the number of Elements.
Definition base.cc:227
│ │ │ +
static int nVertices(Dune::RefinementIntervals tag)
Get the number of Vertices.
Definition base.cc:197
│ │ │ +
static VertexIterator vBegin(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:207
│ │ │ +
typedef IndexVector
Definition base.cc:177
│ │ │ +
static VertexIterator vEnd(Dune::RefinementIntervals tag)
Get a VertexIterator.
Definition base.cc:217
│ │ │
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:114
│ │ │ -
typename Container::ReferenceElement ReferenceElement
The reference element type.
Definition referenceelements.hh:146
│ │ │ -
static const ReferenceElement & cube()
get hypercube reference elements
Definition referenceelements.hh:168
│ │ │ +
constexpr unsigned int dim() const
Return dimension of the type.
Definition type.hh:360
│ │ │ +
constexpr unsigned int id() const
Return the topology id of the type.
Definition type.hh:365
│ │ │ +
Definition virtualrefinement.cc:72
│ │ │ +
Refinement::template Codim< 0 >::SubEntityIterator Common
Definition virtualrefinement.cc:85
│ │ │ +
IndexVector vertexIndices() const
Definition virtualrefinement.cc:94
│ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:84
│ │ │ +
Refinement::IndexVector IndexVector
Definition virtualrefinement.cc:86
│ │ │ +
VirtualRefinement< dimension, CoordType >::template Codim< codimension >::SubEntityIterator::CoordVector coords() const
│ │ │ +
SubEntityIterator(const This &other)
│ │ │ +
This & operator=(const This &other)
│ │ │ +
│ │ │ +
│ │ │ +
SubEntityIterator(IteratorBack *backend)
│ │ │ +
Refinement::template SubEntityIteratorBack< codimension > IteratorBack
Definition virtualrefinement.cc:109
│ │ │ +
Refinement::CoordVector CoordVector
Definition virtualrefinement.cc:110
│ │ │ +
Refinement::template Codim< codimension >::SubEntityIterator This
Definition virtualrefinement.cc:108
│ │ │ +
bool equals(const This &other) const
│ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:107
│ │ │ +
│ │ │ +
Definition virtualrefinement.cc:201
│ │ │ +
virtual ~VirtualRefinementSubEntityIteratorBackSpecial()
Definition virtualrefinement.cc:209
│ │ │ +
virtual IndexVector vertexIndices() const =0
│ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:218
│ │ │ +
Refinement::IndexVector IndexVector
Definition virtualrefinement.cc:219
│ │ │ +
virtual ~VirtualRefinementSubEntityIteratorBackSpecial()
Definition virtualrefinement.cc:223
│ │ │ +
Definition virtualrefinement.cc:232
│ │ │ +
virtual int index() const =0
│ │ │ +
Refinement::template SubEntityIteratorBack< codimension > This
Definition virtualrefinement.cc:235
│ │ │ +
virtual This * clone() const =0
│ │ │ +
Refinement::CoordVector CoordVector
Definition virtualrefinement.cc:236
│ │ │ +
VirtualRefinement< dimension, CoordType > Refinement
Definition virtualrefinement.cc:234
│ │ │ +
virtual bool operator==(const This &other) const =0
│ │ │ +
virtual CoordVector coords() const =0
│ │ │ +
virtual ~SubEntityIteratorBack()
Definition virtualrefinement.cc:238
│ │ │ +
virtual This & operator++()=0
│ │ │ +
Definition virtualrefinement.cc:262
│ │ │ +
int nVertices(Dune::RefinementIntervals tag) const override
Get the number of Vertices.
Definition virtualrefinement.cc:296
│ │ │ +
int nElements(Dune::RefinementIntervals tag) const override
Get the number of Elements.
Definition virtualrefinement.cc:321
│ │ │ +
Dune::VirtualRefinement< dimension, CoordType > VirtualRefinement
Definition virtualrefinement.cc:265
│ │ │ +
static VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > & instance()
Definition virtualrefinement.cc:287
│ │ │ +
Dune::StaticRefinement< topologyId, CoordType, coerceToId, dimension > StaticRefinement
Definition virtualrefinement.cc:264
│ │ │ +
Definition virtualrefinement.cc:398
│ │ │ +
SubEntityIteratorBack(const BackendIterator &backend)
Definition virtualrefinement.cc:425
│ │ │ +
VirtualRefinement::template SubEntityIteratorBack< codimension > Base
Definition virtualrefinement.cc:402
│ │ │ +
bool operator==(const Base &other) const
Definition virtualrefinement.cc:449
│ │ │ +
Base & operator++()
Definition virtualrefinement.cc:464
│ │ │ +
Base * clone() const
Definition virtualrefinement.cc:442
│ │ │ +
int index() const
Definition virtualrefinement.cc:474
│ │ │ +
CoordVector coords() const
Definition virtualrefinement.cc:481
│ │ │ +
VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension >::template SubEntityIteratorBack< codimension > This
Definition virtualrefinement.cc:401
│ │ │ +
StaticRefinement::template Codim< codimension >::SubEntityIterator BackendIterator
Definition virtualrefinement.cc:400
│ │ │ +
VirtualRefinement::CoordVector CoordVector
Definition virtualrefinement.cc:403
│ │ │ +
Definition virtualrefinement.cc:351
│ │ │ +
IndexVector vertexIndices() const
Definition virtualrefinement.cc:381
│ │ │ +
VirtualRefinementImp::template SubEntityIteratorBack< 0 > Common
Definition virtualrefinement.cc:369
│ │ │ +
RefinementBase::IndexVector IndexVector
Definition virtualrefinement.cc:372
│ │ │ +
VirtualRefinement< dimension, CoordType > RefinementBase
Definition virtualrefinement.cc:371
│ │ │ +
Dune::VirtualRefinementImp< topologyId, CoordType, coerceToId, dimension > VirtualRefinementImp
Definition virtualrefinement.cc:368
│ │ │ +
VirtualRefinementImp::StaticRefinement StaticRefinement
Definition virtualrefinement.cc:370
│ │ │ +
Definition virtualrefinement.cc:519
│ │ │ +
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:523
│ │ │ +
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:574
│ │ │ +
static VirtualRefinement< dimension, CoordType > & build(unsigned topologyId, unsigned coerceToId)
Definition virtualrefinement.cc:596
│ │ │ +
VirtualRefinement base class.
Definition virtualrefinement.hh:283
│ │ │ +
SubEntityIteratorBack< dimension > VertexIteratorBack
Definition virtualrefinement.hh:307
│ │ │ +
virtual ElementIteratorBack * eEndBack(Dune::RefinementIntervals tag) const =0
│ │ │ +
VertexIterator vBegin(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:38
│ │ │ +
ElementIterator eBegin(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:54
│ │ │ +
ElementIterator eEnd(Dune::RefinementIntervals tag) const
Get an ElementIterator.
Definition virtualrefinement.cc:62
│ │ │ +
Codim< 0 >::SubEntityIterator ElementIterator
The ElementIterator of the VirtualRefinement.
Definition virtualrefinement.hh:290
│ │ │ +
VertexIterator vEnd(Dune::RefinementIntervals tag) const
Get an VertexIterator.
Definition virtualrefinement.cc:46
│ │ │ +
FieldVector< CoordType, dimension > CoordVector
The CoordVector of the VirtualRefinement.
Definition virtualrefinement.hh:297
│ │ │ +
std::vector< int > IndexVector
The IndexVector of the VirtualRefinement.
Definition virtualrefinement.hh:303
│ │ │ +
Codim< dimension >::SubEntityIterator VertexIterator
The VertexIterator of the VirtualRefinement.
Definition virtualrefinement.hh:288
│ │ │ +
virtual VertexIteratorBack * vEndBack(Dune::RefinementIntervals tag) const =0
│ │ │ +
SubEntityIteratorBack< 0 > ElementIteratorBack
Definition virtualrefinement.hh:308
│ │ │ +
virtual ElementIteratorBack * eBeginBack(Dune::RefinementIntervals tag) const =0
│ │ │ +
virtual VertexIteratorBack * vBeginBack(Dune::RefinementIntervals tag) const =0
│ │ │ +
codim database of VirtualRefinement
Definition virtualrefinement.hh:367
│ │ │