#include <TempestRemapper.hpp>
Public Types | |
enum | TempestMeshType { DEFAULT = -1 , CS = 0 , RLL = 1 , ICO = 2 , ICOD = 3 , OVERLAP_FILES = 4 , OVERLAP_MEMORY = 5 , OVERLAP_MOAB = 6 } |
![]() | |
enum | IntersectionContext { DEFAULT = -1 , SourceMesh = 0 , TargetMesh = 1 , OverlapMesh = 2 , CoveringMesh = 3 } |
Public Member Functions | |
TempestRemapper (moab::Interface *mbInt, bool offlineMode=false) | |
virtual | ~TempestRemapper () |
virtual ErrorCode | initialize (bool initialize_fsets=true) |
Initialize the TempestRemapper object internal data structures including the mesh sets and TempestRemap mesh references. More... | |
virtual ErrorCode | clear () |
Deallocate and clear any memory initialized in the TempestRemapper object. More... | |
moab::ErrorCode | GenerateMesh (Remapper::IntersectionContext ctx, TempestMeshType type) |
Generate a mesh in memory of given type (CS/RLL/ICO/MPAS(structured)) and store it under the context specified by the user. More... | |
moab::ErrorCode | LoadMesh (Remapper::IntersectionContext ctx, std::string inputFilename, TempestMeshType type) |
Load a mesh from disk of given type and store it under the context specified by the user. More... | |
moab::ErrorCode | ConstructCoveringSet (double tolerance=1e-8, double radius_src=1.0, double radius_tgt=1.0, double boxeps=0.1, bool regional_mesh=false, bool gnomonic=true, int nb_ghost_layers=0) |
Construct a source covering mesh such that it completely encompasses the target grid in parallel. This operation is critical to ensure that the parallel advancing-front intersection algorithm can compute the intersection mesh only locally without any process communication. More... | |
moab::ErrorCode | ComputeOverlapMesh (bool kdtree_search=true, bool use_tempest=false) |
Compute the intersection mesh between the source and target grids that have been instantiated in the Remapper. This function invokes the parallel advancing-front intersection algorithm internally for spherical meshes and can handle arbitrary unstructured grids (CS, RLL, ICO, MPAS) with and without holes. More... | |
moab::ErrorCode | ConvertTempestMesh (Remapper::IntersectionContext ctx) |
Convert the TempestRemap mesh object to a corresponding MOAB mesh representation according to the intersection context. More... | |
moab::ErrorCode | ConvertMeshToTempest (Remapper::IntersectionContext ctx) |
Convert the MOAB mesh representation to a corresponding TempestRemap mesh object according to the intersection context. More... | |
Mesh * | GetMesh (Remapper::IntersectionContext ctx) |
Get the TempestRemap mesh object according to the intersection context. More... | |
void | SetMesh (Remapper::IntersectionContext ctx, Mesh *mesh, bool overwrite=true) |
Set the TempestRemap mesh object according to the intersection context. More... | |
void | SetMeshSet (Remapper::IntersectionContext ctx, moab::EntityHandle mset, moab::Range *entities=nullptr) |
Set the mesh set according to the intersection context. More... | |
Mesh * | GetCoveringMesh () |
Get the covering mesh (TempestRemap) object. More... | |
moab::EntityHandle & | GetMeshSet (Remapper::IntersectionContext ctx) |
Get the MOAB mesh set corresponding to the intersection context. More... | |
moab::EntityHandle | GetMeshSet (Remapper::IntersectionContext ctx) const |
Const overload. Get the MOAB mesh set corresponding to the intersection context. More... | |
moab::Range & | GetMeshEntities (Remapper::IntersectionContext ctx) |
Get the mesh element entities corresponding to the intersection context. More... | |
const moab::Range & | GetMeshEntities (Remapper::IntersectionContext ctx) const |
Const overload. Get the mesh element entities corresponding to the intersection context. More... | |
moab::Range & | GetMeshVertices (Remapper::IntersectionContext ctx) |
Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes. More... | |
const moab::Range & | GetMeshVertices (Remapper::IntersectionContext ctx) const |
Const overload. Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes. More... | |
moab::EntityHandle & | GetCoveringSet () |
Get access to the underlying source covering set if available. Else return the source set. More... | |
void | SetMeshType (Remapper::IntersectionContext ctx, const std::vector< int > &metadata) |
Set the mesh type corresponding to the intersection context. More... | |
void | ResetMeshSet (Remapper::IntersectionContext ctx, moab::EntityHandle meshSet) |
Reconstruct mesh, used now only for IO; need a better solution maybe. More... | |
TempestMeshType | GetMeshType (Remapper::IntersectionContext ctx) const |
Get the mesh type corresponding to the intersection context. More... | |
moab::ErrorCode | WriteTempestIntersectionMesh (std::string strOutputFileName, const bool fAllParallel, const bool fInputConcave, const bool fOutputConcave) |
Gather the overlap mesh and associated source/target data and write it out to disk using the TempestRemap output interface. This information can then be used with the "GenerateOfflineMap" tool in TempestRemap as needed. More... | |
moab::ErrorCode | GenerateCSMeshMetadata (const int ntot_elements, moab::Range &entities, moab::Range *secondary_entities, const std::string &dofTagName, int nP) |
Generate the necessary metadata and specifically the GLL node numbering for DoFs for a CS mesh. This negates the need for running external code like HOMME to output the numbering needed for computing maps. The functionality is used through the mbconvert tool to compute processor-invariant Global DoF IDs at GLL nodes. More... | |
moab::ErrorCode | GenerateMeshMetadata (Mesh &mesh, const int ntot_elements, moab::Range &entities, moab::Range *secondary_entities, const std::string dofTagName, int nP) |
Generate the necessary metadata for DoF node numbering in a given mesh. Currently, only the functionality to generate numbering on CS grids is supported. More... | |
moab::ErrorCode | GetOverlapAugmentedEntities (moab::Range &sharedGhostEntities) |
Get all the ghosted overlap entities that were accumulated to enable conservation in parallel. More... | |
moab::ErrorCode | assign_vertex_element_IDs (Tag idtag, EntityHandle this_set, const int dimension=2, const int start_id=1) |
Internal method to assign vertex and element global IDs if one does not exist already. More... | |
ErrorCode | GetIMasks (Remapper::IntersectionContext ctx, std::vector< int > &masks) |
Get the masks that could have been defined. More... | |
![]() | |
Remapper (moab::Interface *mbInt) | |
virtual | ~Remapper () |
moab::Interface * | get_interface () |
ErrorCode | LoadNativeMesh (std::string filename, moab::EntityHandle &meshset, std::vector< int > &metadata, const char *readopts=0) |
Public Attributes | |
const bool | offlineWorkflow |
Flag indicating whether the workflow is in offline mode. More... | |
bool | meshValidate |
Flag to enable mesh validation after loading from file. More... | |
bool | constructEdgeMap |
Flag to construct the edge map within the TempestRemap data structures. More... | |
Static Public Attributes | |
static const bool | verbose = true |
Global verbosity flag. More... | |
Private Member Functions | |
ErrorCode | ConvertAllMeshesToTempest () |
Convert all MOAB meshes to TempestRemap format. More... | |
moab::ErrorCode | ConvertOverlapMeshSourceOrdered () |
Convert overlap mesh to source-ordered format. More... | |
moab::ErrorCode | load_tempest_mesh_private (std::string inputFilename, Mesh **tempest_mesh) |
Load a mesh from disk in TempestRemap format. More... | |
moab::ErrorCode | convert_mesh_to_tempest_private (Mesh *mesh, moab::EntityHandle meshset, moab::Range &entities, moab::Range *pverts) |
Convert a MOAB mesh to TempestRemap format. More... | |
moab::ErrorCode | convert_tempest_mesh_private (TempestMeshType type, Mesh *mesh, moab::EntityHandle &meshset, moab::Range &entities, moab::Range *vertices) |
Convert a TempestRemap mesh to MOAB format. More... | |
moab::ErrorCode | AugmentOverlapSet () |
Augment overlap mesh with ghosted entities. More... | |
Private Attributes | |
Mesh * | m_source |
TempestMeshType | m_source_type |
moab::Range | m_source_entities |
moab::Range | m_source_vertices |
moab::EntityHandle | m_source_set |
int | max_source_edges |
bool | point_cloud_source |
std::vector< int > | m_source_metadata |
Mesh * | m_target |
TempestMeshType | m_target_type |
moab::Range | m_target_entities |
moab::Range | m_target_vertices |
moab::EntityHandle | m_target_set |
int | max_target_edges |
bool | point_cloud_target |
std::vector< int > | m_target_metadata |
Mesh * | m_overlap |
TempestMeshType | m_overlap_type |
moab::Range | m_overlap_entities |
moab::EntityHandle | m_overlap_set |
std::vector< std::pair< int, int > > | m_sorted_overlap_order |
moab::Intx2MeshOnSphere * | mbintx |
Mesh * | m_covering_source |
moab::EntityHandle | m_covering_source_set |
moab::Range | m_covering_source_entities |
moab::Range | m_covering_source_vertices |
IntxAreaUtils::AreaMethod | m_area_method |
bool | rrmgrids |
bool | is_parallel |
bool | is_root |
int | rank |
int | size |
Friends | |
class | TempestOnlineMap |
Additional Inherited Members | |
![]() | |
Interface * | m_interface |
Definition at line 36 of file TempestRemapper.hpp.
Enumerator | |
---|---|
DEFAULT | |
CS | |
RLL | |
ICO | |
ICOD | |
OVERLAP_FILES | |
OVERLAP_MEMORY | |
OVERLAP_MOAB |
Definition at line 54 of file TempestRemapper.hpp.
|
inline |
Definition at line 43 of file TempestRemapper.hpp.
|
virtual |
Definition at line 101 of file TempestRemapper.cpp.
References clear().
ErrorCode moab::TempestRemapper::assign_vertex_element_IDs | ( | Tag | idtag, |
EntityHandle | this_set, | ||
const int | dimension = 2 , |
||
const int | start_id = 1 |
||
) |
Internal method to assign vertex and element global IDs if one does not exist already.
idtag | Tag for the global IDs |
this_set | MOAB entity handle of the mesh set |
dimension | Dimension of the mesh (default: 2) |
start_id | Starting ID (default: 1) |
Definition at line 1000 of file TempestRemapper.cpp.
References entities, ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Remapper::m_interface, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, and moab::Interface::tag_set_data().
Referenced by main().
|
private |
Augment overlap mesh with ghosted entities.
Adds ghosted entities to the overlap mesh to ensure conservation in parallel operations.
Referenced by ComputeOverlapMesh().
|
virtual |
Deallocate and clear any memory initialized in the TempestRemapper object.
Definition at line 106 of file TempestRemapper.cpp.
References moab::Range::clear(), m_covering_source, m_covering_source_entities, m_covering_source_vertices, m_overlap, m_overlap_entities, m_source, m_source_entities, m_source_vertices, m_target, m_target_entities, m_target_vertices, MB_SUCCESS, point_cloud_source, point_cloud_target, and size.
Referenced by main(), and ~TempestRemapper().
ErrorCode moab::TempestRemapper::ComputeOverlapMesh | ( | bool | kdtree_search = true , |
bool | use_tempest = false |
||
) |
Compute the intersection mesh between the source and target grids that have been instantiated in the Remapper. This function invokes the parallel advancing-front intersection algorithm internally for spherical meshes and can handle arbitrary unstructured grids (CS, RLL, ICO, MPAS) with and without holes.
kdtree_search | Flag to enable k-d tree search (default: true) |
use_tempest | Flag to use TempestRemap (default: false) |
Definition at line 1360 of file TempestRemapper.cpp.
References AugmentOverlapSet(), moab::Range::begin(), ConvertOverlapMeshSourceOrdered(), moab::AEntityFactory::create_vert_elem_adjacencies(), dbgprint, moab::Range::end(), moab::Range::erase(), ErrorCode, moab::Skinner::find_skin(), moab::IntxUtils::fix_degenerate_quads(), moab::AEntityFactory::get_adjacencies(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), moab::Range::insert(), moab::Intx2Mesh::intersect_meshes(), moab::Intx2Mesh::intersect_meshes_kdtree(), is_parallel, m_covering_source, m_covering_source_set, moab::Remapper::m_interface, m_overlap, m_overlap_set, m_target, m_target_set, mb, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbintx, moab::AEntityFactory::notify_create_entity(), point_cloud_target, moab::IntxAreaUtils::positive_orientation(), rank, rrmgrids, moab::DebugOutput::set_prefix(), moab::Range::size(), size, moab::subtract(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::AEntityFactory::vert_elem_adjacencies(), and moab::Interface::write_mesh().
Referenced by main().
ErrorCode moab::TempestRemapper::ConstructCoveringSet | ( | double | tolerance = 1e-8 , |
double | radius_src = 1.0 , |
||
double | radius_tgt = 1.0 , |
||
double | boxeps = 0.1 , |
||
bool | regional_mesh = false , |
||
bool | gnomonic = true , |
||
int | nb_ghost_layers = 0 |
||
) |
Construct a source covering mesh such that it completely encompasses the target grid in parallel. This operation is critical to ensure that the parallel advancing-front intersection algorithm can compute the intersection mesh only locally without any process communication.
tolerance | Tolerance for the covering mesh construction (default: 1e-8) |
radius_src | Radius of the source mesh (default: 1.0) |
radius_tgt | Radius of the target mesh (default: 1.0) |
boxeps | Box epsilon value (default: 0.1) |
regional_mesh | Flag to indicate if the mesh is regional (default: false) |
gnomonic | Flag to indicate if the mesh is gnomonic (default: true) |
nb_ghost_layers | Number of ghost layers (default: 0) |
Definition at line 1212 of file TempestRemapper.cpp.
References moab::Interface::add_entities(), moab::AdaptiveKDTree::build_tree(), ConvertAllMeshesToTempest(), moab::Interface::create_meshset(), ErrorCode, moab::Intx2Mesh::FindMaxEdges(), moab::IntxAreaUtils::GaussQuadrature, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Range::insert(), is_parallel, m_covering_source, m_covering_source_entities, m_covering_source_set, m_covering_source_vertices, moab::Remapper::m_interface, m_source, m_source_entities, m_source_set, m_source_vertices, m_target_entities, m_target_set, moab::Intx2Mesh::max_edges_1, moab::Intx2Mesh::max_edges_2, max_source_edges, max_target_edges, MB_CHK_ERR, MB_CHK_SET_ERR, mbintx, MESHSET_SET, moab::AdaptiveKDTree::point_search(), rank, rrmgrids, moab::Intx2Mesh::set_box_error(), moab::Intx2Mesh::set_error_tolerance(), moab::Intx2MeshOnSphere::set_radius_destination_mesh(), moab::Intx2MeshOnSphere::set_radius_source_mesh(), moab::Range::size(), moab::tolerance, and moab::Interface::write_file().
Referenced by main().
|
private |
Convert a MOAB mesh to TempestRemap format.
mesh | Target TempestRemap mesh pointer |
meshset | MOAB mesh set to convert |
entities | Range of entities to convert |
pverts | Optional pointer to vertex range |
Definition at line 623 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::compactness(), constructEdgeMap, moab::Range::end(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), iface, moab::Range::index(), moab::Remapper::m_interface, MB_CHK_ERR, MB_SUCCESS, offlineWorkflow, moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by ConvertMeshToTempest(), and ResetMeshSet().
|
private |
Convert a TempestRemap mesh to MOAB format.
type | Type of the TempestRemap mesh |
mesh | Source TempestRemap mesh |
meshset | Target MOAB mesh set |
entities | Range to store converted entities |
vertices | Optional range to store vertices |
Definition at line 255 of file TempestRemapper.cpp.
References moab::Interface::add_entities(), moab::Interface::create_element(), dbgprint, entities, ErrorCode, moab::Interface::globalId_tag(), iface, is_root, moab::Remapper::m_interface, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, MBPOLYGON, MBQUAD, MBTRI, moab::Interface::query_interface(), rank, moab::DebugOutput::set_prefix(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and verbose.
Referenced by ConvertTempestMesh().
|
private |
Convert all MOAB meshes to TempestRemap format.
Utility method primarily used in online workflows to convert all meshes to TempestRemap format.
Definition at line 545 of file TempestRemapper.cpp.
References ConvertMeshToTempest(), moab::Remapper::CoveringMesh, m_covering_source, m_source, m_target, MB_CHK_SET_ERR, MB_SUCCESS, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by ConstructCoveringSet().
ErrorCode moab::TempestRemapper::ConvertMeshToTempest | ( | Remapper::IntersectionContext | ctx | ) |
Convert the MOAB mesh representation to a corresponding TempestRemap mesh object according to the intersection context.
ctx | Intersection context |
Definition at line 571 of file TempestRemapper.cpp.
References convert_mesh_to_tempest_private(), ConvertOverlapMeshSourceOrdered(), moab::Remapper::CoveringMesh, dbgprint, is_root, m_covering_source, m_covering_source_entities, m_covering_source_set, m_covering_source_vertices, m_overlap, m_source, m_source_entities, m_source_set, m_source_vertices, m_target, m_target_entities, m_target_set, m_target_vertices, MB_CHK_SET_ERR, MB_SUCCESS, moab::Remapper::OverlapMesh, point_cloud_source, point_cloud_target, rank, moab::DebugOutput::set_prefix(), moab::Range::size(), moab::Remapper::SourceMesh, moab::Remapper::TargetMesh, and verbose.
Referenced by ConvertAllMeshesToTempest(), CreateTempestMesh(), and main().
|
private |
Convert overlap mesh to source-ordered format.
Transforms the overlap mesh into a source-ordered format compatible with TempestRemap.
Definition at line 783 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), iface, moab::IntPairComparator(), is_parallel, m_covering_source_entities, moab::Remapper::m_interface, m_overlap, m_overlap_entities, m_overlap_set, m_target_entities, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::size(), moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by ComputeOverlapMesh(), and ConvertMeshToTempest().
ErrorCode moab::TempestRemapper::ConvertTempestMesh | ( | Remapper::IntersectionContext | ctx | ) |
Convert the TempestRemap mesh object to a corresponding MOAB mesh representation according to the intersection context.
ctx | Intersection context |
Definition at line 226 of file TempestRemapper.cpp.
References convert_tempest_mesh_private(), moab::Remapper::DEFAULT, is_root, m_overlap, m_overlap_entities, m_overlap_set, m_overlap_type, m_source, m_source_entities, m_source_set, m_source_type, m_source_vertices, m_target, m_target_entities, m_target_set, m_target_type, m_target_vertices, MB_CHK_SET_ERR, moab::Remapper::SourceMesh, moab::Remapper::TargetMesh, and verbose.
Referenced by main().
ErrorCode moab::TempestRemapper::GenerateCSMeshMetadata | ( | const int | ntot_elements, |
moab::Range & | entities, | ||
moab::Range * | secondary_entities, | ||
const std::string & | dofTagName, | ||
int | nP | ||
) |
Generate the necessary metadata and specifically the GLL node numbering for DoFs for a CS mesh. This negates the need for running external code like HOMME to output the numbering needed for computing maps. The functionality is used through the mbconvert
tool to compute processor-invariant Global DoF IDs at GLL nodes.
ntot_elements | Total number of elements |
entities | MOAB range of entities |
secondary_entities | MOAB range of secondary entities (optional) |
dofTagName | Name of the DoF tag |
nP | Number of points |
Definition at line 1032 of file TempestRemapper.cpp.
References GenerateMeshMetadata(), MB_CHK_SET_ERR, MB_INVALID_SIZE, and MB_SUCCESS.
moab::ErrorCode moab::TempestRemapper::GenerateMesh | ( | Remapper::IntersectionContext | ctx, |
TempestMeshType | type | ||
) |
Generate a mesh in memory of given type (CS/RLL/ICO/MPAS(structured)) and store it under the context specified by the user.
ctx | Intersection context |
type | Type of mesh to generate |
ErrorCode moab::TempestRemapper::GenerateMeshMetadata | ( | Mesh & | mesh, |
const int | ntot_elements, | ||
moab::Range & | entities, | ||
moab::Range * | secondary_entities, | ||
const std::string | dofTagName, | ||
int | nP | ||
) |
Generate the necessary metadata for DoF node numbering in a given mesh. Currently, only the functionality to generate numbering on CS grids is supported.
mesh | Mesh object |
ntot_elements | Total number of elements |
entities | MOAB range of entities |
secondary_entities | MOAB range of secondary entities (optional) |
dofTagName | Name of the DoF tag |
nP | Number of points |
Definition at line 1055 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::end(), entities, ErrorCode, moab::Interface::get_coords(), moab::Remapper::m_interface, MB_CHK_SET_ERR, MB_INVALID_SIZE, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by GenerateCSMeshMetadata(), and main().
|
inline |
Get the covering mesh (TempestRemap) object.
Definition at line 746 of file TempestRemapper.hpp.
References m_covering_source.
Referenced by moab::TempestOnlineMap::TempestOnlineMap().
|
inline |
Get access to the underlying source covering set if available. Else return the source set.
Definition at line 751 of file TempestRemapper.hpp.
References m_covering_source_set.
ErrorCode moab::TempestRemapper::GetIMasks | ( | Remapper::IntersectionContext | ctx, |
std::vector< int > & | masks | ||
) |
Get the masks that could have been defined.
ctx | Intersection context |
masks | Vector of masks |
Definition at line 2167 of file TempestRemapper.cpp.
References moab::Remapper::CoveringMesh, ErrorCode, moab::Remapper::m_interface, m_source_entities, m_source_vertices, m_target_entities, m_target_vertices, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::Remapper::OverlapMesh, point_cloud_source, point_cloud_target, moab::Range::size(), moab::Remapper::SourceMesh, moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::Remapper::TargetMesh.
|
inline |
Get the TempestRemap mesh object according to the intersection context.
ctx | Intersection context |
Definition at line 513 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source, m_overlap, m_source, m_target, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by CreateTempestMesh(), main(), and moab::TempestOnlineMap::TempestOnlineMap().
|
inline |
Get the mesh element entities corresponding to the intersection context.
ctx | Intersection context |
Definition at line 623 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_entities, m_overlap_entities, m_source_entities, m_target_entities, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by main().
|
inline |
Const overload. Get the mesh element entities corresponding to the intersection context.
ctx | Intersection context |
Definition at line 641 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_entities, m_overlap_entities, m_source_entities, m_target_entities, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Get the MOAB mesh set corresponding to the intersection context.
ctx | Intersection context |
Definition at line 587 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_set, m_overlap_set, m_source_set, m_target_set, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by CreateTempestMesh(), and main().
|
inline |
Const overload. Get the MOAB mesh set corresponding to the intersection context.
ctx | Intersection context |
Definition at line 605 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_set, m_overlap_set, m_source_set, m_target_set, MB_SET_ERR_RET_VAL, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Get the mesh type corresponding to the intersection context.
ctx | Intersection context |
Definition at line 730 of file TempestRemapper.hpp.
References moab::Remapper::DEFAULT, DEFAULT, m_overlap_type, m_source_type, m_target_type, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes.
ctx | Intersection context |
Definition at line 659 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_vertices, m_source_vertices, m_target_vertices, MB_SET_ERR_RET_VAL, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by main().
|
inline |
Const overload. Get the mesh vertices corresponding to the intersection context. Useful for point-cloud meshes.
ctx | Intersection context |
Definition at line 675 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source_vertices, m_source_vertices, m_target_vertices, MB_SET_ERR_RET_VAL, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
moab::ErrorCode moab::TempestRemapper::GetOverlapAugmentedEntities | ( | moab::Range & | sharedGhostEntities | ) |
Get all the ghosted overlap entities that were accumulated to enable conservation in parallel.
sharedGhostEntities | MOAB range of ghosted overlap entities |
Definition at line 743 of file TempestRemapper.cpp.
References moab::Range::clear(), ErrorCode, moab::Range::insert(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::merge(), moab::Range::size(), and moab::subtract().
Referenced by main().
|
virtual |
Initialize the TempestRemapper object internal data structures including the mesh sets and TempestRemap mesh references.
initialize_fsets | Flag to initialize the mesh sets (default: true) |
Definition at line 53 of file TempestRemapper.cpp.
References moab::Interface::create_meshset(), ErrorCode, is_parallel, is_root, m_covering_source, moab::Remapper::m_interface, m_overlap, m_overlap_set, m_source, m_source_set, m_target, m_target_set, MB_CHK_SET_ERR, MB_SUCCESS, MESHSET_SET, point_cloud_source, point_cloud_target, rank, and size.
Referenced by main().
|
private |
Load a mesh from disk in TempestRemap format.
inputFilename | Path to the input mesh file |
tempest_mesh | Pointer to store the loaded TempestRemap mesh |
Definition at line 177 of file TempestRemapper.cpp.
References constructEdgeMap, moab::error(), is_root, MB_SUCCESS, meshValidate, and verbose.
Referenced by LoadMesh().
ErrorCode moab::TempestRemapper::LoadMesh | ( | Remapper::IntersectionContext | ctx, |
std::string | inputFilename, | ||
TempestMeshType | type | ||
) |
Load a mesh from disk of given type and store it under the context specified by the user.
ctx | Intersection context |
inputFilename | File name of the mesh to load |
type | Type of mesh to load |
Definition at line 152 of file TempestRemapper.cpp.
References moab::Remapper::DEFAULT, load_tempest_mesh_private(), m_overlap, m_overlap_type, m_source, m_source_type, m_target, m_target_type, MB_CHK_SET_ERR, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by CreateTempestMesh(), and main().
|
inline |
Reconstruct mesh, used now only for IO; need a better solution maybe.
ctx | Intersection context |
meshSet | MOAB mesh set handle |
Definition at line 561 of file TempestRemapper.hpp.
References convert_mesh_to_tempest_private(), moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_source, m_source_entities, m_source_set, m_source_vertices, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Set the TempestRemap mesh object according to the intersection context.
ctx | Intersection context |
mesh | Pointer to the TempestRemap mesh object |
overwrite | Flag to overwrite the existing mesh (default: true) |
Definition at line 531 of file TempestRemapper.hpp.
References moab::Remapper::CoveringMesh, moab::Remapper::DEFAULT, m_covering_source, m_overlap, m_source, m_target, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by CreateTempestMesh().
void moab::TempestRemapper::SetMeshSet | ( | Remapper::IntersectionContext | ctx, |
moab::EntityHandle | mset, | ||
moab::Range * | entities = nullptr |
||
) |
Set the mesh set according to the intersection context.
ctx | Intersection context |
mset | MOAB mesh set handle |
entities | MOAB range of entities (optional) |
Definition at line 970 of file TempestRemapper.cpp.
References moab::Remapper::CoveringMesh, entities, m_covering_source_entities, m_covering_source_set, m_source_entities, m_source_set, m_target_entities, m_target_set, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
inline |
Set the mesh type corresponding to the intersection context.
ctx | Intersection context |
metadata | Vector of mesh type metadata |
Definition at line 691 of file TempestRemapper.hpp.
References m_overlap_type, m_source_metadata, m_source_type, m_target_metadata, m_target_type, OVERLAP_FILES, moab::Remapper::OverlapMesh, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by CreateTempestMesh().
moab::ErrorCode moab::TempestRemapper::WriteTempestIntersectionMesh | ( | std::string | strOutputFileName, |
const bool | fAllParallel, | ||
const bool | fInputConcave, | ||
const bool | fOutputConcave | ||
) |
Gather the overlap mesh and associated source/target data and write it out to disk using the TempestRemap output interface. This information can then be used with the "GenerateOfflineMap" tool in TempestRemap as needed.
strOutputFileName | Output file name |
fAllParallel | Flag to write all parallel data (default: false) |
fInputConcave | Flag to indicate if the input mesh is concave (default: false) |
fOutputConcave | Flag to indicate if the output mesh is concave (default: false) |
Definition at line 934 of file TempestRemapper.cpp.
References MB_SUCCESS, and size.
|
friend |
Definition at line 66 of file TempestRemapper.hpp.
bool moab::TempestRemapper::constructEdgeMap |
Flag to construct the edge map within the TempestRemap data structures.
If set to true, the edge map will be constructed within the TempestRemap data structures.
Definition at line 382 of file TempestRemapper.hpp.
Referenced by convert_mesh_to_tempest_private(), load_tempest_mesh_private(), and main().
|
private |
Definition at line 508 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertOverlapMeshSourceOrdered(), initialize(), and moab::TempestOnlineMap::TempestOnlineMap().
|
private |
Definition at line 508 of file TempestRemapper.hpp.
Referenced by convert_tempest_mesh_private(), ConvertMeshToTempest(), ConvertTempestMesh(), initialize(), load_tempest_mesh_private(), and moab::TempestOnlineMap::TempestOnlineMap().
|
private |
Definition at line 505 of file TempestRemapper.hpp.
|
private |
Definition at line 496 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConstructCoveringSet(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), GetCoveringMesh(), GetMesh(), initialize(), and SetMesh().
|
private |
Definition at line 498 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), GetMeshEntities(), and SetMeshSet().
|
private |
Definition at line 497 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertMeshToTempest(), GetCoveringSet(), GetMeshSet(), and SetMeshSet().
|
private |
Definition at line 499 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), and GetMeshVertices().
|
private |
Definition at line 486 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetMesh(), initialize(), LoadMesh(), and SetMesh().
|
private |
Definition at line 488 of file TempestRemapper.hpp.
Referenced by clear(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), and GetMeshEntities().
|
private |
Definition at line 489 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetMeshSet(), and initialize().
|
private |
Definition at line 487 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), LoadMesh(), and SetMeshType().
|
private |
Definition at line 490 of file TempestRemapper.hpp.
|
private |
Definition at line 466 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMesh(), initialize(), LoadMesh(), ResetMeshSet(), and SetMesh().
|
private |
Definition at line 468 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), GetMeshEntities(), ResetMeshSet(), and SetMeshSet().
|
private |
Definition at line 473 of file TempestRemapper.hpp.
Referenced by SetMeshType().
|
private |
Definition at line 470 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMeshSet(), initialize(), ResetMeshSet(), and SetMeshSet().
|
private |
Definition at line 467 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), LoadMesh(), and SetMeshType().
|
private |
Definition at line 469 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), GetMeshVertices(), and ResetMeshSet().
|
private |
Definition at line 476 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMesh(), initialize(), LoadMesh(), and SetMesh().
|
private |
Definition at line 478 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetIMasks(), GetMeshEntities(), and SetMeshSet().
|
private |
Definition at line 483 of file TempestRemapper.hpp.
Referenced by SetMeshType().
|
private |
Definition at line 480 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMeshSet(), initialize(), and SetMeshSet().
|
private |
Definition at line 477 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), LoadMesh(), and SetMeshType().
|
private |
Definition at line 479 of file TempestRemapper.hpp.
Referenced by clear(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), and GetMeshVertices().
|
private |
Definition at line 471 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet().
|
private |
Definition at line 481 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet().
|
private |
Definition at line 493 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), and ConstructCoveringSet().
bool moab::TempestRemapper::meshValidate |
Flag to enable mesh validation after loading from file.
If set to true, the mesh will be validated after it is loaded from a file.
Definition at line 374 of file TempestRemapper.hpp.
Referenced by load_tempest_mesh_private(), and main().
const bool moab::TempestRemapper::offlineWorkflow |
Flag indicating whether the workflow is in offline mode.
This flag is used to determine the context of the workflow, specifically whether it is running in an offline mode (mbtempest).
Definition at line 367 of file TempestRemapper.hpp.
Referenced by convert_mesh_to_tempest_private().
|
private |
Definition at line 472 of file TempestRemapper.hpp.
Referenced by clear(), ConvertMeshToTempest(), GetIMasks(), and initialize().
|
private |
Definition at line 482 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertMeshToTempest(), GetIMasks(), and initialize().
|
private |
Definition at line 509 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), convert_tempest_mesh_private(), ConvertMeshToTempest(), initialize(), and moab::TempestOnlineMap::TempestOnlineMap().
|
private |
Definition at line 507 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), and ConstructCoveringSet().
|
private |
Definition at line 509 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), initialize(), and moab::TempestOnlineMap::TempestOnlineMap().
|
static |
Global verbosity flag.
This flag controls the verbosity of the output. If set to true, more detailed output will be generated.
Definition at line 390 of file TempestRemapper.hpp.
Referenced by convert_tempest_mesh_private(), ConvertMeshToTempest(), ConvertTempestMesh(), and load_tempest_mesh_private().