MAIA bb96820c
Multiphysics at AIA
|
#include <cartesiangridproxy.h>
Public Types | |
using | Tree = maia::grid::tree::Tree< nDim > |
using | Cell = maia::grid::tree::Cell |
Public Member Functions | |
TreeProxy (const MInt solverId_, Tree &tree_) | |
Constructor does nothing but pass arguments to members. More... | |
MInt | solver2grid (const MInt id) const |
Convert solver cell id to grid cell id. More... | |
MInt | grid2solver (const MInt id) const |
Convert grid cell id to solver cell id (+1 in size is to map "-1" to "-1") More... | |
void | setSolver2grid (const MInt solverId, const MInt treeId) |
void | setGrid2solver (const MInt treeId, const MInt solverId) |
void | swapSolverIds (const MInt id0, const MInt id1) |
void | swapGridIds (const MInt id0, const MInt id1) |
MInt | size () const |
Return tree size (= number of cells) More... | |
MInt | parent (const MInt id) const |
Accessor for parent node. More... | |
MBool | hasParent (const MInt id) const |
Return whether node has parent. More... | |
MInt | child (const MInt id, const MInt pos) const |
Accessor for child node. More... | |
MBool | hasChild (const MInt id, const MInt pos) const |
Return whether node has child at given position. More... | |
MBool | hasChildren (const MInt id) const |
Return whether node has any children. More... | |
MInt | noChildren (const MInt id) const |
Return number of children of given node. More... | |
MBool | isLeafCell (const MInt id) const |
Accessor for isLeafCell. More... | |
MInt | neighbor (const MInt id, const MInt dir) const |
Accessor for neighbor node. More... | |
MBool | hasNeighbor (const MInt id, const MInt dir) const |
Return whether node has same-level neighbor in given direction. More... | |
MBool | hasAnyNeighbor (const MInt id, const MInt dir) const |
Return whether node or its parent has neighbor in given direction. More... | |
MLong | globalId (const MInt id) const |
Accessor for global id. More... | |
MInt | localId (const MLong id) const |
Accesor for local id. More... | |
MInt | cutOff (const MInt id) const |
Accessor for cutOff dir. More... | |
MInt | level (const MInt id) const |
Accessor for level. More... | |
const MFloat & | coordinate (const MInt id, const MInt dir) const |
Accessor for coordinates. More... | |
MFloat | weight (const MInt id) const |
Accessor for weight (const version). More... | |
MBool | hasProperty (const MInt id, const Cell p) const |
Accessor for properties. More... | |
Static Public Member Functions | |
static constexpr MInt | noChildrenPerNode () |
Return maximum number of children per node. More... | |
static constexpr MInt | noNeighborsPerNode () |
Return maximum number of same-level neighbors per node. More... | |
static constexpr MInt | oppositeNeighborDir (const MInt dir) |
Return opposite direction for given neighbor direction. More... | |
static constexpr MInt | noProperties () |
Return number of properties defined for each node. More... | |
Private Member Functions | |
MInt | solverId () const |
Return solver id. More... | |
void | update (const Proxy< nDim > &NotUsed(gridProxy_)) |
Default implementation does nothing as everything relevant is set by grid proxy class. More... | |
void | createGlobalToLocalIdMapping () |
Create global to local id mapping. More... | |
Private Attributes | |
Tree & | m_tree |
Reference to actual grid tree. More... | |
const MInt | m_solverId = -1 |
Solver id. More... | |
std::vector< MInt > | m_solver2grid |
std::vector< MInt > | m_grid2solver |
std::vector< MLong > | m_globalIds |
std::map< MLong, MInt > | m_globalToLocalId {} |
std::vector< MInt > | m_isCutOffCell |
Friends | |
template<MInt nDim_> | |
class | maia::grid::Proxy |
Class that acts like the original grid tree but only for a single solver
Definition at line 396 of file cartesiangridproxy.h.
using maia::grid::tree::TreeProxy< nDim >::Cell = maia::grid::tree::Cell |
Definition at line 406 of file cartesiangridproxy.h.
using maia::grid::tree::TreeProxy< nDim >::Tree = maia::grid::tree::Tree<nDim> |
Definition at line 405 of file cartesiangridproxy.h.
|
inline |
Definition at line 409 of file cartesiangridproxy.h.
MInt maia::grid::tree::TreeProxy< nDim >::child | ( | const MInt | id, |
const MInt | pos | ||
) | const |
Definition at line 555 of file cartesiangridproxy.h.
const MFloat & maia::grid::tree::TreeProxy< nDim >::coordinate | ( | const MInt | id, |
const MInt | dir | ||
) | const |
Definition at line 631 of file cartesiangridproxy.h.
|
private |
Create the mapping from global to local cell ids.
Definition at line 687 of file cartesiangridproxy.h.
MInt maia::grid::tree::TreeProxy< nDim >::cutOff | ( | const MInt | id | ) | const |
Definition at line 618 of file cartesiangridproxy.h.
MLong maia::grid::tree::TreeProxy< nDim >::globalId | ( | const MInt | id | ) | const |
Definition at line 612 of file cartesiangridproxy.h.
|
inline |
Definition at line 425 of file cartesiangridproxy.h.
MBool maia::grid::tree::TreeProxy< nDim >::hasAnyNeighbor | ( | const MInt | id, |
const MInt | dir | ||
) | const |
Definition at line 605 of file cartesiangridproxy.h.
MBool maia::grid::tree::TreeProxy< nDim >::hasChild | ( | const MInt | id, |
const MInt | pos | ||
) | const |
Definition at line 562 of file cartesiangridproxy.h.
MBool maia::grid::tree::TreeProxy< nDim >::hasChildren | ( | const MInt | id | ) | const |
Definition at line 569 of file cartesiangridproxy.h.
MBool maia::grid::tree::TreeProxy< nDim >::hasNeighbor | ( | const MInt | id, |
const MInt | dir | ||
) | const |
Definition at line 600 of file cartesiangridproxy.h.
MBool maia::grid::tree::TreeProxy< nDim >::hasParent | ( | const MInt | id | ) | const |
Definition at line 548 of file cartesiangridproxy.h.
MBool maia::grid::tree::TreeProxy< nDim >::hasProperty | ( | const MInt | id, |
const Cell | p | ||
) | const |
Definition at line 669 of file cartesiangridproxy.h.
MBool maia::grid::tree::TreeProxy< nDim >::isLeafCell | ( | const MInt | id | ) | const |
Definition at line 586 of file cartesiangridproxy.h.
MInt maia::grid::tree::TreeProxy< nDim >::level | ( | const MInt | id | ) | const |
Definition at line 624 of file cartesiangridproxy.h.
MInt maia::grid::tree::TreeProxy< nDim >::localId | ( | const MLong | id | ) | const |
Definition at line 710 of file cartesiangridproxy.h.
MInt maia::grid::tree::TreeProxy< nDim >::neighbor | ( | const MInt | id, |
const MInt | dir | ||
) | const |
Definition at line 593 of file cartesiangridproxy.h.
MInt maia::grid::tree::TreeProxy< nDim >::noChildren | ( | const MInt | id | ) | const |
Definition at line 576 of file cartesiangridproxy.h.
|
inlinestaticconstexpr |
Definition at line 503 of file cartesiangridproxy.h.
|
inlinestaticconstexpr |
Definition at line 505 of file cartesiangridproxy.h.
|
inlinestaticconstexpr |
Definition at line 511 of file cartesiangridproxy.h.
|
inlinestaticconstexpr |
Definition at line 508 of file cartesiangridproxy.h.
MInt maia::grid::tree::TreeProxy< nDim >::parent | ( | const MInt | id | ) | const |
Definition at line 541 of file cartesiangridproxy.h.
|
inline |
Definition at line 438 of file cartesiangridproxy.h.
|
inline |
Definition at line 433 of file cartesiangridproxy.h.
|
inline |
Definition at line 466 of file cartesiangridproxy.h.
|
inline |
Definition at line 417 of file cartesiangridproxy.h.
|
inlineprivate |
Definition at line 515 of file cartesiangridproxy.h.
|
inline |
Definition at line 454 of file cartesiangridproxy.h.
|
inline |
Definition at line 444 of file cartesiangridproxy.h.
|
inlineprivate |
Definition at line 518 of file cartesiangridproxy.h.
MFloat maia::grid::tree::TreeProxy< nDim >::weight | ( | const MInt | id | ) | const |
Definition at line 642 of file cartesiangridproxy.h.
Definition at line 401 of file cartesiangridproxy.h.
|
private |
Definition at line 533 of file cartesiangridproxy.h.
|
private |
Definition at line 534 of file cartesiangridproxy.h.
|
private |
Definition at line 532 of file cartesiangridproxy.h.
|
private |
Definition at line 535 of file cartesiangridproxy.h.
|
private |
Definition at line 531 of file cartesiangridproxy.h.
|
private |
Definition at line 528 of file cartesiangridproxy.h.
|
private |
Definition at line 525 of file cartesiangridproxy.h.