MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
maia::dg::collector::ElementCollector< nDim, SysEqn > Class Template Reference

Class that represents DG element collector. More...

#include <dgcartesianelementcollector.h>

Inheritance diagram for maia::dg::collector::ElementCollector< nDim, SysEqn >:
[legend]
Collaboration diagram for maia::dg::collector::ElementCollector< nDim, SysEqn >:
[legend]

Public Types

template<class T >
using Invalid = typename maia::dg::collector::Invalid< T >
 

Public Member Functions

constexpr ElementCollector ()=default
 Default c'tor does nothing. More...
 
MIntcellId (const MInt id)
 Accessor for cell id. More...
 
MInt cellId (const MInt id) const
 Accessor for cell id (const version). More...
 
MIntpolyDeg (const MInt id)
 Accessor for polynomial degree. More...
 
MInt polyDeg (const MInt id) const
 Accessor for polynomial degree (const version). More...
 
MInt noNodes1D (const MInt id) const
 Accessor for number of nodes 1D (const version). More...
 
MIntnoNodes1D (const MInt id)
 Accessor for number of nodes 1D. More...
 
MInt noNodesXD (const MInt id) const
 Accessor for number of nodes XD (const version). More...
 
MIntsurfaceIds (const MInt id, const MInt dir)
 Accessor for surface ids. More...
 
MInt surfaceIds (const MInt id, const MInt dir) const
 Accessor for surface ids (const version). More...
 
MFloatnodeCoordinates (const MInt id)
 Accessor for node coordinates. More...
 
MFloat nodeCoordinates (const MInt id) const
 Accessor for node coordinates (const version). More...
 
MFloatvariables (const MInt id, const MInt pos)
 Accessor for variables. More...
 
MFloatvariables (const MInt id)
 
MFloat variables (const MInt id, const MInt pos) const
 Accessor for variables (const version). More...
 
MFloat variables (const MInt id) const
 
MFloattimeIntStorage (const MInt id)
 Accessor for storage variables. More...
 
MFloat timeIntStorage (const MInt id) const
 Accessor for storage variables (const version). More...
 
MFloatnodeVars (const MInt id)
 Accessor for node variables. More...
 
MFloat nodeVars (const MInt id) const
 Accessor for node variables (const version). More...
 
MFloatrightHandSide (const MInt id)
 Accessor for right hand side. More...
 
MFloat rightHandSide (const MInt id) const
 Accessor for right hand side (const version). More...
 
MFloatexternalSource (const MInt id)
 Accessor for external source terms. More...
 
MFloat externalSource (const MInt id) const
 Accessor for external source terms (const version). More...
 
MFloatinvJacobian (const MInt id)
 Accessor for inverse jacobian. More...
 
MFloat invJacobian (const MInt id) const
 Accessor for inverse jacobian (const version). More...
 
MInt maxPolyDeg () const
 Return maximum polynomial degree. More...
 
MInt maxPolyDeg (const MInt maxPolyDeg_)
 Set maximum polynomial degree. More...
 
MInt maxNoNodes1D () const
 Return maximum number of nodes 1D. More...
 
void maxNoNodes1D (const MInt maxNoNodesDeg_)
 Set maximum noNodes. More...
 
MInt maxNoNodesXD () const
 Return maximum number of nodes XD. More...
 
void noNodeVars (const MInt noNodeVars_)
 
constexpr MInt noNodeVars () const
 Return number of node variables. More...
 
MInt getElementByCellId (const MInt cellId) const
 Return element id for a given cell id (or -1 if not found). More...
 
MInt getElementByCellId (const MInt first, const MInt last, const MInt cellId) const
 Search for element with cell id cellId in [first, last). More...
 
- Public Member Functions inherited from maia::container::Container< ElementCollector< nDim, SysEqn >, Invalid >
constexpr Container ()=default
 Default c'tor does nothing. More...
 
constexpr MInt capacity () const
 Return capacity (i.e., maximum number of nodes) More...
 
void reset (const MInt capacity)
 Reset tree, re-create data structures with given capacity, and set size to zero. More...
 
void resize (const MInt capacity)
 Resize the container capacity. More...
 
constexpr MInt size () const
 Return size (i.e., currently used number of nodes) More...
 
void size (const MInt size_)
 Resize tree WITHOUT CONSIDERING ANY NODE CONSISTENCY! Use at own risk and remove ASAP... More...
 
void append (const MInt count)
 Append nodes to end of tree. More...
 
void append ()
 
void shrink (const MInt count)
 Remove nodes from end of tree. More...
 
void shrink ()
 
void copy (const T &source, const MInt begin, const MInt end, const MInt to)
 Copy nodes to another location without changing any parent/child/neighbor information. More...
 
void copy (const T &source, const MInt from, const MInt to)
 
void copy (const MInt begin, const MInt end, const MInt to)
 
void copy (const MInt from, const MInt to)
 
void move (const MInt begin, const MInt end, const MInt to)
 Move nodes to another location and update parent/child/neighbor information accordingly. More...
 
void move (const MInt from, const MInt to)
 
void swap (const MInt a, const MInt b)
 Swap two nodes and update parent/child/neighbor information accordingly. More...
 
void insert (const MInt begin, const MInt count)
 
void insert (const MInt id)
 
void erase (const MInt begin, const MInt end)
 Erase nodes in range [begin, end) and update parent/child/neighbor information. More...
 
void erase (const MInt id)
 
void removeAndShift (const MInt begin, const MInt end)
 
void removeAndShift (const MInt id)
 
void removeAndFill (const MInt begin, const MInt end)
 
void removeAndFill (const MInt id)
 
void clear ()
 Clear tree by invalidating all nodes and setting size to zero. More...
 
ElementCollector< nDim, SysEqn > & derived ()
 
const ElementCollector< nDim, SysEqn > & derived () const
 
void rawCopy (const T &source, const MInt begin, const MInt end, const MInt to)
 Copy range of nodes [begin, end) to range starting at 'to'. More...
 
void rawCopy (const T &source, const MInt from, const MInt to)
 
void deleteConnectivity (const MInt NotUsed(begin), const MInt NotUsed(end))
 
void moveConnectivity (const MInt NotUsed(begin), const MInt NotUsed(end), const MInt NotUsed(to))
 
void moveConnectivity (const MInt from, const MInt to)
 
constexpr MInt dummy () const
 

Static Public Member Functions

static constexpr MInt noVars ()
 Return number of nodes in 1D. More...
 
static constexpr MInt noSurfaces ()
 Return number of surfaces per element. More...
 

Private Types

using Base = maia::container::Container< ElementCollector< nDim, SysEqn >, Invalid >
 
template<class T >
using Storage = typename Base::template Storage< T >
 

Private Member Functions

void reset ()
 Reset tree, re-create data structures with given capacity, and set size to zero. More...
 
void invalidate (const MInt begin, const MInt end)
 Erase range of nodes such that they contain no sensible values anymore. More...
 
template<class Functor , class T >
void rawCopyGeneric (Functor &&c, const T &source, const MInt begin, const MInt end, const MInt destination)
 Helper function for rawCopy(). Destination may refer to beginning or end of target range. More...
 

Private Attributes

MInt m_maxPolyDeg = -1
 Maximum polynomial degree. More...
 
MInt m_maxNoNodes1D = -1
 Maximum number of nodes 1D. More...
 
MInt m_maxNoNodesXD = -1
 Maximum number if nodes XD. More...
 
MInt m_noNodeVars = -1
 
Storage< MIntm_cellId {}
 
Storage< MIntm_polyDeg {}
 
Storage< MIntm_noNodes1D {}
 
Storage< MIntm_surfaceIds {}
 
Storage< MFloatm_nodeCoordinates {}
 
Storage< MFloatm_variables {}
 
Storage< MFloatm_timeIntStorage {}
 
Storage< MFloatm_nodeVariables {}
 
Storage< MFloatm_rightHandSide {}
 
Storage< MFloatm_externalSource {}
 
Storage< MFloatm_invJacobian {}
 

Friends

class maia::container::Container< ElementCollector< nDim, SysEqn >, Invalid >
 

Additional Inherited Members

- Protected Types inherited from maia::container::Container< ElementCollector< nDim, SysEqn >, Invalid >
using Storage = std::vector< T >
 
- Protected Member Functions inherited from maia::container::Container< ElementCollector< nDim, SysEqn >, Invalid >
virtual void resize ()
 
void resetStorage (const MInt n, Storage< T > &c)
 Create new container with given size and replace original one. More...
 
void resizeStorage (const MInt n, Storage< T > &c)
 Resize container with given size. More...
 
void fill_invalid (Container_ &c, const MInt begin, const MInt end, const MInt solverSize=1, const T value=Invalid< T >::value())
 
void copyData (const Container_ &source, Container_ &target, Functor &&f, const MInt begin, const MInt end, const MInt dest, const MInt solverSize=1)
 Copy [begin, end) range with given solver size from source to dest position of target. More...
 
MBool isValidId (const MInt id) const
 Return whether given id refers to a valid node (auxiliary method). More...
 

Detailed Description

template<MInt nDim, class SysEqn>
class maia::dg::collector::ElementCollector< nDim, SysEqn >

Definition at line 117 of file dgcartesianelementcollector.h.

Member Typedef Documentation

◆ Base

template<MInt nDim, class SysEqn >
using maia::dg::collector::ElementCollector< nDim, SysEqn >::Base = maia::container::Container<ElementCollector<nDim, SysEqn>, Invalid>
private

Definition at line 122 of file dgcartesianelementcollector.h.

◆ Invalid

template<MInt nDim, class SysEqn >
template<class T >
using maia::dg::collector::ElementCollector< nDim, SysEqn >::Invalid = typename maia::dg::collector::Invalid<T>

Definition at line 130 of file dgcartesianelementcollector.h.

◆ Storage

template<MInt nDim, class SysEqn >
template<class T >
using maia::dg::collector::ElementCollector< nDim, SysEqn >::Storage = typename Base::template Storage<T>
private

Definition at line 125 of file dgcartesianelementcollector.h.

Constructor & Destructor Documentation

◆ ElementCollector()

template<MInt nDim, class SysEqn >
constexpr maia::dg::collector::ElementCollector< nDim, SysEqn >::ElementCollector ( )
constexprdefault

Member Function Documentation

◆ cellId() [1/2]

template<MInt nDim, class SysEqn >
MInt & maia::dg::collector::ElementCollector< nDim, SysEqn >::cellId ( const MInt  id)

Definition at line 255 of file dgcartesianelementcollector.h.

255 {
256// Prevent accidental compilation without support for SoA layout
257#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
258#error Missing implementation for structure-of-arrays memory layout.
259#endif
260 ENSURE_VALID_ID_ACCESSOR(id);
261 return m_cellId[id];
262}
MInt id
Definition: maiatypes.h:71

◆ cellId() [2/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::cellId ( const MInt  id) const

Definition at line 265 of file dgcartesianelementcollector.h.

265 {
266// Prevent accidental compilation without support for SoA layout
267#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
268#error Missing implementation for structure-of-arrays memory layout.
269#endif
270 ENSURE_VALID_ID_ACCESSOR(id);
271 return m_cellId[id];
272}

◆ externalSource() [1/2]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::externalSource ( const MInt  id)

Definition at line 467 of file dgcartesianelementcollector.h.

467 {
468// Prevent accidental compilation without support for SoA layout
469#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
470#error Missing implementation for structure-of-arrays memory layout.
471#endif
472 ENSURE_VALID_ID_ACCESSOR(id);
473 return m_externalSource[id * noVars() * maxNoNodesXD()];
474}
static constexpr MInt noVars()
Return number of nodes in 1D.
MInt maxNoNodesXD() const
Return maximum number of nodes XD.

◆ externalSource() [2/2]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::externalSource ( const MInt  id) const

Definition at line 477 of file dgcartesianelementcollector.h.

477 {
478// Prevent accidental compilation without support for SoA layout
479#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
480#error Missing implementation for structure-of-arrays memory layout.
481#endif
482 ENSURE_VALID_ID_ACCESSOR(id);
483 return m_externalSource[id * noVars() * maxNoNodesXD()];
484}

◆ getElementByCellId() [1/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::getElementByCellId ( const MInt  cellId) const
Author
Michael Schlottke (mic) mic@a.nosp@m.ia.r.nosp@m.wth-a.nosp@m.ache.nosp@m.n.de
Date
2014-02-13
Parameters
[in]cellIdCell id for which the element is searched.
Returns
The element id if found, -1 otherwise.

Definition at line 628 of file dgcartesianelementcollector.h.

628 {
629 return getElementByCellId(0, this->size(), cellId);
630}
constexpr MInt size() const
Return size (i.e., currently used number of nodes)
Definition: container.h:89
MInt & cellId(const MInt id)
Accessor for cell id.
MInt getElementByCellId(const MInt cellId) const
Return element id for a given cell id (or -1 if not found).

◆ getElementByCellId() [2/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::getElementByCellId ( const MInt  first,
const MInt  last,
const MInt  cellId 
) const
Author
Michael Schlottke (mic) mic@a.nosp@m.ia.r.nosp@m.wth-a.nosp@m.ache.nosp@m.n.de
Date
2014-02-13
Parameters
[in]firstFirst element id to consider.
[in]lastLast element id to consider + 1.
[in]cellIdCell id of the searched element.
Returns
The element id if found, -1 otherwise.

Definition at line 644 of file dgcartesianelementcollector.h.

644 {
645 const MInt* const begin = &m_cellId[0];
646 const MInt* const end = begin + (last - first);
647 const MInt* const low = std::lower_bound(begin, end, cellId);
648
649 // Return not found if searched cell id is smaller than [first, last]
650 if(low == begin && *low != cellId) {
651 return -1;
652 }
653
654 // Return not found if std::lower_bound does not find anything
655 if(low == end) {
656 return -1;
657 }
658
659 // Return not found if the lower bound does not match the searched id (happens
660 // if a cell has no corresponding element)
661 if(*low != cellId) {
662 return -1;
663 }
664
665 // Otherwise return found element id
666 return first + std::distance(begin, low);
667}
int32_t MInt
Definition: maiatypes.h:62

◆ invalidate()

template<MInt nDim, class SysEqn >
void maia::dg::collector::ElementCollector< nDim, SysEqn >::invalidate ( const MInt  begin,
const MInt  end 
)
private

Definition at line 511 of file dgcartesianelementcollector.h.

511 {
512// Prevent accidental compilation without support for SoA layout
513#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
514#error Missing implementation for structure-of-arrays memory layout.
515#endif
516
517 const MInt coordSize = nDim * maxNoNodesXD();
518 const MInt varSize = maxNoNodesXD() * noVars();
519 const MInt nodeVarSize = maxNoNodesXD() * noNodeVars();
520
521 // Cell id
522 fill_invalid(m_cellId, begin, end);
523
524 // Polynomial degree
525 fill_invalid(m_polyDeg, begin, end);
526
527 // Number of nodes 1D
528 fill_invalid(m_noNodes1D, begin, end);
529
530 // Surface ids
531 fill_invalid(m_surfaceIds, begin, end, noSurfaces());
532
533 // Node coordinates
534 fill_invalid(m_nodeCoordinates, begin, end, coordSize);
535
536 // Variables
537 fill_invalid(m_variables, begin, end, varSize);
538
539 // Old variables
540 fill_invalid(m_timeIntStorage, begin, end, varSize);
541
542 // Node variables
543 fill_invalid(m_nodeVariables, begin, end, nodeVarSize);
544
545 // Right hand side
546 fill_invalid(m_rightHandSide, begin, end, varSize);
547
548 // External source terms
549 fill_invalid(m_externalSource, begin, end, varSize);
550
551 // Inverse jacobian
552 fill_invalid(m_invJacobian, begin, end);
553}
void fill_invalid(Container_ &c, const MInt begin, const MInt end, const MInt solverSize=1, const T value=Invalid< T >::value())
Definition: container.h:131
constexpr MInt noNodeVars() const
Return number of node variables.
static constexpr MInt noSurfaces()
Return number of surfaces per element.

◆ invJacobian() [1/2]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::invJacobian ( const MInt  id)

Definition at line 489 of file dgcartesianelementcollector.h.

489 {
490// Prevent accidental compilation without support for SoA layout
491#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
492#error Missing implementation for structure-of-arrays memory layout.
493#endif
494 ENSURE_VALID_ID_ACCESSOR(id);
495 return m_invJacobian[id];
496}

◆ invJacobian() [2/2]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::invJacobian ( const MInt  id) const

Definition at line 499 of file dgcartesianelementcollector.h.

499 {
500// Prevent accidental compilation without support for SoA layout
501#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
502#error Missing implementation for structure-of-arrays memory layout.
503#endif
504 ENSURE_VALID_ID_ACCESSOR(id);
505 return m_invJacobian[id];
506}

◆ maxNoNodes1D() [1/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::maxNoNodes1D ( ) const
inline

Definition at line 174 of file dgcartesianelementcollector.h.

174{ return m_maxNoNodes1D; }
MInt m_maxNoNodes1D
Maximum number of nodes 1D.

◆ maxNoNodes1D() [2/2]

template<MInt nDim, class SysEqn >
void maia::dg::collector::ElementCollector< nDim, SysEqn >::maxNoNodes1D ( const MInt  maxNoNodesDeg_)

Definition at line 613 of file dgcartesianelementcollector.h.

613 {
614 m_maxNoNodes1D = maxNoNodes1D_;
616}
MInt m_maxNoNodesXD
Maximum number if nodes XD.
MInt ipow(MInt base, MInt exp)
Integer exponent function for non-negative exponents.
Definition: functions.h:317

◆ maxNoNodesXD()

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::maxNoNodesXD ( ) const
inline

Definition at line 178 of file dgcartesianelementcollector.h.

178{ return m_maxNoNodesXD; }

◆ maxPolyDeg() [1/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::maxPolyDeg ( ) const
inline

Definition at line 169 of file dgcartesianelementcollector.h.

169{ return m_maxPolyDeg; }

◆ maxPolyDeg() [2/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::maxPolyDeg ( const MInt  maxPolyDeg_)

Definition at line 605 of file dgcartesianelementcollector.h.

605 {
606 const MInt oldMaxPolyDeg = m_maxPolyDeg;
607 m_maxPolyDeg = maxPolyDeg_;
608 return oldMaxPolyDeg;
609}

◆ nodeCoordinates() [1/2]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::nodeCoordinates ( const MInt  id)

Definition at line 355 of file dgcartesianelementcollector.h.

355 {
356// Prevent accidental compilation without support for SoA layout
357#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
358#error Missing implementation for structure-of-arrays memory layout.
359#endif
360 ENSURE_VALID_ID_ACCESSOR(id);
361 return m_nodeCoordinates[id * nDim * maxNoNodesXD()];
362}

◆ nodeCoordinates() [2/2]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::nodeCoordinates ( const MInt  id) const

Definition at line 365 of file dgcartesianelementcollector.h.

365 {
366// Prevent accidental compilation without support for SoA layout
367#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
368#error Missing implementation for structure-of-arrays memory layout.
369#endif
370 ENSURE_VALID_ID_ACCESSOR(id);
371 return m_nodeCoordinates[id * nDim * maxNoNodesXD()];
372}

◆ nodeVars() [1/2]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::nodeVars ( const MInt  id)

Definition at line 423 of file dgcartesianelementcollector.h.

423 {
424// Prevent accidental compilation without support for SoA layout
425#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
426#error Missing implementation for structure-of-arrays memory layout.
427#endif
428 ENSURE_VALID_ID_ACCESSOR(id);
429 return m_nodeVariables[id * noNodeVars() * maxNoNodesXD()];
430}

◆ nodeVars() [2/2]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::nodeVars ( const MInt  id) const

Definition at line 433 of file dgcartesianelementcollector.h.

433 {
434// Prevent accidental compilation without support for SoA layout
435#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
436#error Missing implementation for structure-of-arrays memory layout.
437#endif
438 ENSURE_VALID_ID_ACCESSOR(id);
439 return m_nodeVariables[id * noNodeVars() * maxNoNodesXD()];
440}

◆ noNodes1D() [1/2]

template<MInt nDim, class SysEqn >
MInt & maia::dg::collector::ElementCollector< nDim, SysEqn >::noNodes1D ( const MInt  id)

Definition at line 298 of file dgcartesianelementcollector.h.

298 {
299// Prevent accidental compilation without support for SoA layout
300#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
301#error Missing implementation for structure-of-arrays memory layout.
302#endif
303 ENSURE_VALID_ID_ACCESSOR(id);
304 return m_noNodes1D[id];
305}

◆ noNodes1D() [2/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::noNodes1D ( const MInt  id) const

Definition at line 309 of file dgcartesianelementcollector.h.

309 {
310// Prevent accidental compilation without support for SoA layout
311#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
312#error Missing implementation for structure-of-arrays memory layout.
313#endif
314 ENSURE_VALID_ID_ACCESSOR(id);
315 return m_noNodes1D[id];
316}

◆ noNodesXD()

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::noNodesXD ( const MInt  id) const

Definition at line 320 of file dgcartesianelementcollector.h.

320 {
321// Prevent accidental compilation without support for SoA layout
322#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
323#error Missing implementation for structure-of-arrays memory layout.
324#endif
325 ENSURE_VALID_ID_ACCESSOR(id);
326 return ipow(m_noNodes1D[id], nDim);
327}

◆ noNodeVars() [1/2]

template<MInt nDim, class SysEqn >
constexpr MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::noNodeVars ( ) const
inlineconstexpr

◆ noNodeVars() [2/2]

template<MInt nDim, class SysEqn >
void maia::dg::collector::ElementCollector< nDim, SysEqn >::noNodeVars ( const MInt  noNodeVars_)
inline

Definition at line 181 of file dgcartesianelementcollector.h.

181{ m_noNodeVars = noNodeVars_; };

◆ noSurfaces()

template<MInt nDim, class SysEqn >
static constexpr MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::noSurfaces ( )
inlinestaticconstexpr

Definition at line 196 of file dgcartesianelementcollector.h.

196{ return 2 * nDim; }

◆ noVars()

template<MInt nDim, class SysEqn >
static constexpr MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::noVars ( )
inlinestaticconstexpr

Return number of nodes in 2D/3D Return number of variables

Definition at line 190 of file dgcartesianelementcollector.h.

190{ return SysEqn::noVars(); }

◆ polyDeg() [1/2]

template<MInt nDim, class SysEqn >
MInt & maia::dg::collector::ElementCollector< nDim, SysEqn >::polyDeg ( const MInt  id)

Definition at line 277 of file dgcartesianelementcollector.h.

277 {
278// Prevent accidental compilation without support for SoA layout
279#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
280#error Missing implementation for structure-of-arrays memory layout.
281#endif
282 ENSURE_VALID_ID_ACCESSOR(id);
283 return m_polyDeg[id];
284}

◆ polyDeg() [2/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::polyDeg ( const MInt  id) const

Definition at line 287 of file dgcartesianelementcollector.h.

287 {
288// Prevent accidental compilation without support for SoA layout
289#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
290#error Missing implementation for structure-of-arrays memory layout.
291#endif
292 ENSURE_VALID_ID_ACCESSOR(id);
293 return m_polyDeg[id];
294}

◆ rawCopyGeneric()

template<MInt nDim, class SysEqn >
template<class Functor , class T >
void maia::dg::collector::ElementCollector< nDim, SysEqn >::rawCopyGeneric ( Functor &&  c,
const T &  source,
const MInt  begin,
const MInt  end,
const MInt  destination 
)
private

Definition at line 559 of file dgcartesianelementcollector.h.

560 {
561// Prevent accidental compilation without support for SoA layout
562#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
563#error Missing implementation for structure-of-arrays memory layout.
564#endif
565
566 const MInt varSize = maxNoNodesXD() * noVars();
567
568 // Cell id
569 copyData(source.m_cellId, m_cellId, c, begin, end, destination);
570
571 // Polynomial degree
572 copyData(source.m_polyDeg, m_polyDeg, c, begin, end, destination);
573
574 // Number of nodes 1D
575 copyData(source.m_noNodes1D, m_noNodes1D, c, begin, end, destination);
576
577 // Surface ids
578 copyData(source.m_surfaceIds, m_surfaceIds, c, begin, end, destination, noSurfaces());
579
580 // Node coordinates
581 copyData(source.m_nodeCoordinates, m_nodeCoordinates, c, begin, end, destination, nDim * maxNoNodesXD());
582
583 // Variables
584 copyData(source.m_variables, m_variables, c, begin, end, destination, varSize);
585
586 // Old variables
587 copyData(source.m_timeIntStorage, m_timeIntStorage, c, begin, end, destination, varSize);
588
589 // Node variables
590 copyData(source.m_nodeVariables, m_nodeVariables, c, begin, end, destination, maxNoNodesXD() * noNodeVars());
591
592 // Right hand side
593 copyData(source.m_rightHandSide, m_rightHandSide, c, begin, end, destination, varSize);
594
595 // External source terms
596 copyData(source.m_externalSource, m_externalSource, c, begin, end, destination, varSize);
597
598 // Inverse jacobian
599 copyData(source.m_invJacobian, m_invJacobian, c, begin, end, destination);
600}
void copyData(const Container_ &source, Container_ &target, Functor &&f, const MInt begin, const MInt end, const MInt dest, const MInt solverSize=1)
Copy [begin, end) range with given solver size from source to dest position of target.
Definition: container.h:138

◆ reset()

template<MInt nDim, class SysEqn >
void maia::dg::collector::ElementCollector< nDim, SysEqn >::reset
private

◆ rightHandSide() [1/2]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::rightHandSide ( const MInt  id)

Definition at line 445 of file dgcartesianelementcollector.h.

445 {
446// Prevent accidental compilation without support for SoA layout
447#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
448#error Missing implementation for structure-of-arrays memory layout.
449#endif
450 ENSURE_VALID_ID_ACCESSOR(id);
451 return m_rightHandSide[id * noVars() * maxNoNodesXD()];
452}

◆ rightHandSide() [2/2]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::rightHandSide ( const MInt  id) const

Definition at line 455 of file dgcartesianelementcollector.h.

455 {
456// Prevent accidental compilation without support for SoA layout
457#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
458#error Missing implementation for structure-of-arrays memory layout.
459#endif
460 ENSURE_VALID_ID_ACCESSOR(id);
461 return m_rightHandSide[id * noVars() * maxNoNodesXD()];
462}

◆ surfaceIds() [1/2]

template<MInt nDim, class SysEqn >
MInt & maia::dg::collector::ElementCollector< nDim, SysEqn >::surfaceIds ( const MInt  id,
const MInt  dir 
)

Definition at line 331 of file dgcartesianelementcollector.h.

331 {
332// Prevent accidental compilation without support for SoA layout
333#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
334#error Missing implementation for structure-of-arrays memory layout.
335#endif
336 ENSURE_VALID_ID_ACCESSOR(id);
337 ENSURE_VALID_SURFACE_ID_ACCESSOR(dir);
338 return m_surfaceIds[id * noSurfaces() + dir];
339}

◆ surfaceIds() [2/2]

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::surfaceIds ( const MInt  id,
const MInt  dir 
) const

Definition at line 342 of file dgcartesianelementcollector.h.

342 {
343// Prevent accidental compilation without support for SoA layout
344#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
345#error Missing implementation for structure-of-arrays memory layout.
346#endif
347 ENSURE_VALID_ID_ACCESSOR(id);
348 ENSURE_VALID_SURFACE_ID_ACCESSOR(dir);
349 return m_surfaceIds[id * noSurfaces() + dir];
350}

◆ timeIntStorage() [1/2]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::timeIntStorage ( const MInt  id)

Definition at line 401 of file dgcartesianelementcollector.h.

401 {
402// Prevent accidental compilation without support for SoA layout
403#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
404#error Missing implementation for structure-of-arrays memory layout.
405#endif
406 ENSURE_VALID_ID_ACCESSOR(id);
407 return m_timeIntStorage[id * noVars() * maxNoNodesXD()];
408}

◆ timeIntStorage() [2/2]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::timeIntStorage ( const MInt  id) const

Definition at line 411 of file dgcartesianelementcollector.h.

411 {
412// Prevent accidental compilation without support for SoA layout
413#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
414#error Missing implementation for structure-of-arrays memory layout.
415#endif
416 ENSURE_VALID_ID_ACCESSOR(id);
417 return m_timeIntStorage[id * noVars() * maxNoNodesXD()];
418}

◆ variables() [1/4]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::variables ( const MInt  id)
inline

Definition at line 154 of file dgcartesianelementcollector.h.

154{ return variables(id, 0); };
MFloat & variables(const MInt id, const MInt pos)
Accessor for variables.

◆ variables() [2/4]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::variables ( const MInt  id) const
inline

Definition at line 156 of file dgcartesianelementcollector.h.

156{ return variables(id, 0); };

◆ variables() [3/4]

template<MInt nDim, class SysEqn >
MFloat & maia::dg::collector::ElementCollector< nDim, SysEqn >::variables ( const MInt  id,
const MInt  pos 
)

Definition at line 377 of file dgcartesianelementcollector.h.

377 {
378// Prevent accidental compilation without support for SoA layout
379#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
380#error Missing implementation for structure-of-arrays memory layout.
381#endif
382 ENSURE_VALID_ID_ACCESSOR(id);
383 ENSURE_CONDITION(pos >= 0 && pos < noVars() * maxNoNodesXD(), "Invalid position.");
384 return m_variables[id * noVars() * maxNoNodesXD() + pos];
385}

◆ variables() [4/4]

template<MInt nDim, class SysEqn >
MFloat maia::dg::collector::ElementCollector< nDim, SysEqn >::variables ( const MInt  id,
const MInt  pos 
) const

Definition at line 388 of file dgcartesianelementcollector.h.

388 {
389// Prevent accidental compilation without support for SoA layout
390#ifdef DGCOLLECTOR_SOA_MEMORY_LAYOUT
391#error Missing implementation for structure-of-arrays memory layout.
392#endif
393 ENSURE_VALID_ID_ACCESSOR(id);
394 ENSURE_CONDITION(pos >= 0 && pos < noVars() * maxNoNodesXD(), "Invalid position.");
395 return m_variables[id * noVars() * maxNoNodesXD() + pos];
396}

Friends And Related Function Documentation

◆ maia::container::Container< ElementCollector< nDim, SysEqn >, Invalid >

template<MInt nDim, class SysEqn >
friend class maia::container::Container< ElementCollector< nDim, SysEqn >, Invalid >
friend

Definition at line 105 of file dgcartesianelementcollector.h.

Member Data Documentation

◆ m_cellId

template<MInt nDim, class SysEqn >
Storage<MInt> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_cellId {}
private

Definition at line 222 of file dgcartesianelementcollector.h.

◆ m_externalSource

template<MInt nDim, class SysEqn >
Storage<MFloat> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_externalSource {}
private

Definition at line 231 of file dgcartesianelementcollector.h.

◆ m_invJacobian

template<MInt nDim, class SysEqn >
Storage<MFloat> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_invJacobian {}
private

Definition at line 232 of file dgcartesianelementcollector.h.

◆ m_maxNoNodes1D

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::m_maxNoNodes1D = -1
private

Definition at line 213 of file dgcartesianelementcollector.h.

◆ m_maxNoNodesXD

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::m_maxNoNodesXD = -1
private

Definition at line 216 of file dgcartesianelementcollector.h.

◆ m_maxPolyDeg

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::m_maxPolyDeg = -1
private

Definition at line 210 of file dgcartesianelementcollector.h.

◆ m_nodeCoordinates

template<MInt nDim, class SysEqn >
Storage<MFloat> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_nodeCoordinates {}
private

Definition at line 226 of file dgcartesianelementcollector.h.

◆ m_nodeVariables

template<MInt nDim, class SysEqn >
Storage<MFloat> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_nodeVariables {}
private

Definition at line 229 of file dgcartesianelementcollector.h.

◆ m_noNodes1D

template<MInt nDim, class SysEqn >
Storage<MInt> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_noNodes1D {}
private

Definition at line 224 of file dgcartesianelementcollector.h.

◆ m_noNodeVars

template<MInt nDim, class SysEqn >
MInt maia::dg::collector::ElementCollector< nDim, SysEqn >::m_noNodeVars = -1
private

Definition at line 219 of file dgcartesianelementcollector.h.

◆ m_polyDeg

template<MInt nDim, class SysEqn >
Storage<MInt> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_polyDeg {}
private

Definition at line 223 of file dgcartesianelementcollector.h.

◆ m_rightHandSide

template<MInt nDim, class SysEqn >
Storage<MFloat> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_rightHandSide {}
private

Definition at line 230 of file dgcartesianelementcollector.h.

◆ m_surfaceIds

template<MInt nDim, class SysEqn >
Storage<MInt> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_surfaceIds {}
private

Definition at line 225 of file dgcartesianelementcollector.h.

◆ m_timeIntStorage

template<MInt nDim, class SysEqn >
Storage<MFloat> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_timeIntStorage {}
private

Definition at line 228 of file dgcartesianelementcollector.h.

◆ m_variables

template<MInt nDim, class SysEqn >
Storage<MFloat> maia::dg::collector::ElementCollector< nDim, SysEqn >::m_variables {}
private

Definition at line 227 of file dgcartesianelementcollector.h.


The documentation for this class was generated from the following file: