|
IBAMR
IBAMR version 0.19.
|
#include <ibtk/FEDataManager.h>
Public Member Functions | |
| SubdomainToPatchLevelTranslation (const int max_level_number, const std::set< libMesh::subdomain_id_type > &subdomain_ids, const SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > &input_db) | |
| const int & | operator[] (const libMesh::subdomain_id_type id) const |
| bool | levelHasElements (const int level_number) const |
Private Member Functions | |
| int & | get (const libMesh::subdomain_id_type id) |
Private Attributes | |
| int | d_max_level_number = IBTK::invalid_level_number |
| std::array< int, fixed_array_size > | d_fixed |
| std::map< libMesh::subdomain_id_type, int > | d_map |
Static Private Attributes | |
| static constexpr int | fixed_array_size = 1024 |
Class that can translate libMesh subdomain IDs into patch level numbers.
The primary use of this class is multilevel IBFE - i.e., enabling a finite element mesh to interact with multiple patch levels.
| IBTK::SubdomainToPatchLevelTranslation::SubdomainToPatchLevelTranslation | ( | const int | max_level_number, |
| const std::set< libMesh::subdomain_id_type > & | subdomain_ids, | ||
| const SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > & | input_db | ||
| ) |
Constructor. Takes as argument the maximum level number in the Cartesian grid patch hierarchy, a set of all subdomain ids (including those not on the current processor), and an input database enumerating the level-to-subdomain mapping, e.g.,
Any unspecified subdomain ids will be assigned to the finest patch level. Duplicated assignments are not permitted.
|
inline |
Given a libMesh subdomain id, return the patch level of the Cartesian grid hierarchy on which that subdomain id interacts.
|
inline |
Return whether or not there are any elements on a given patch level.
|
inlineprivate |
like operator[], but returns a mutable reference. Used to set up the object.
|
private |
Maximum level number.
|
staticconstexprprivate |
Size of the fixed-size array.
|
private |
The overwhelming majority of subdomain IDs used with IBAMR come from block IDs set by ExodusII - these are numbered sequentially from zero. However, in principle, a subdomain ID could be any signed 64-bit integer so we cannot use a small fixed length array.
Since we look up element levels a lot optimize for the common case by using a fixed-length array and a map for everything else.
|
private |
The map used for everything else.
1.8.17