#include <TempestRemapper.hpp>
Inheritance diagram for moab::TempestRemapper:
Collaboration diagram for moab::TempestRemapper:Public Types | |
| enum | TempestMeshType { DEFAULT = -1 , CS = 0 , RLL = 1 , ICO = 2 , ICOD = 3 , OVERLAP_FILES = 4 , OVERLAP_MEMORY = 5 , OVERLAP_MOAB = 6 } |
Public Types inherited from moab::Remapper | |
| 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 | 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... | |
| void | SetAreaMethod (IntxAreaUtils::AreaMethod method) |
| Validate the GLOBAL_ID tags on the source and target meshes. More... | |
| IntxAreaUtils::AreaMethod | GetAreaMethod () const |
| Formula currently used for spherical area computations. More... | |
| void | SetRegionalMesh (bool regional) |
| Declare that the source and/or target mesh is regionally refined, so their domains need not coincide. More... | |
| bool | IsRegionalMesh () const |
| Whether the meshes have been declared regionally refined; see SetRegionalMesh(). More... | |
| moab::ErrorCode | ValidateGlobalIds (bool throw_error=true) |
| 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... | |
Public Member Functions inherited from moab::Remapper | |
| 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 | |
| moab::ErrorCode | validate_global_ids_private (moab::EntityHandle mesh_set, int dimension, const char *mesh_name, std::string &error_message) |
| Helper for ValidateGlobalIds: check one mesh set at one dimension. More... | |
| ErrorCode | ConvertAllMeshesToTempest () |
| Convert all MOAB meshes to TempestRemap format. More... | |
| moab::ErrorCode | ConvertOverlapMeshSourceOrdered () |
| Convert overlap mesh to source-ordered 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... | |
Friends | |
| class | TempestOnlineMap |
Additional Inherited Members | |
Protected Attributes inherited from moab::Remapper | |
| Interface * | m_interface |
Definition at line 43 of file TempestRemapper.hpp.
| Enumerator | |
|---|---|
| DEFAULT | |
| CS | |
| RLL | |
| ICO | |
| ICOD | |
| OVERLAP_FILES | |
| OVERLAP_MEMORY | |
| OVERLAP_MOAB | |
Definition at line 64 of file TempestRemapper.hpp.
|
inline |
Definition at line 50 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 1038 of file TempestRemapper.cpp.
References ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Remapper::m_interface, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::size(), 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 1445 of file TempestRemapper.cpp.
References AugmentOverlapSet(), moab::Range::begin(), ConvertOverlapMeshSourceOrdered(), moab::AEntityFactory::create_vert_elem_adjacencies(), dbgprint, moab::Range::end(), moab::Range::erase(), 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_area_method, 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, 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 1362 of file TempestRemapper.cpp.
References ConvertAllMeshesToTempest(), moab::Interface::create_meshset(), moab::Intx2Mesh::FindMaxEdges(), is_parallel, m_area_method, 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_set, moab::Intx2Mesh::max_edges_1, moab::Intx2Mesh::max_edges_2, max_source_edges, max_target_edges, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbintx, MESHSET_SET, 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::tolerance, ValidateGlobalIds(), 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 642 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::compactness(), constructEdgeMap, moab::Range::end(), 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 252 of file TempestRemapper.cpp.
References moab::Interface::add_entities(), moab::Range::clear(), moab::Interface::create_element(), dbgprint, 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 564 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 590 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(), anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB(), 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 799 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), iface, moab::index, 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, offlineWorkflow, 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 223 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 anonymous_namespace{mbtempest.cpp}::convertAndWriteMOABMesh(), and 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 1070 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 1093 of file TempestRemapper.cpp.
References moab::Range::begin(), moab::Range::end(), moab::Interface::get_coords(), moab::Range::insert(), moab::Remapper::m_interface, MB_CHK_SET_ERR, MB_INVALID_SIZE, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by GenerateCSMeshMetadata(), and main().
|
inline |
Formula currently used for spherical area computations.
Definition at line 176 of file TempestRemapper.hpp.
References m_area_method.
|
inline |
Get the covering mesh (TempestRemap) object.
Definition at line 834 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 839 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 2252 of file TempestRemapper.cpp.
References moab::Remapper::CoveringMesh, 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 601 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 anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB(), main(), and moab::TempestOnlineMap::TempestOnlineMap().
|
inline |
Get the mesh element entities corresponding to the intersection context.
| ctx | Intersection context |
Definition at line 711 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 729 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 675 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 anonymous_namespace{mbtempest.cpp}::convertAndWriteMOABMesh(), anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB(), and main().
|
inline |
Const overload. Get the MOAB mesh set corresponding to the intersection context.
| ctx | Intersection context |
Definition at line 693 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 818 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 747 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 763 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 760 of file TempestRemapper.cpp.
References moab::Range::clear(), 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 54 of file TempestRemapper.cpp.
References moab::Interface::create_meshset(), 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().
|
inline |
Whether the meshes have been declared regionally refined; see SetRegionalMesh().
Definition at line 200 of file TempestRemapper.hpp.
References rrmgrids.
|
inline |
Reconstruct mesh, used now only for IO; need a better solution maybe.
| ctx | Intersection context |
| meshSet | MOAB mesh set handle |
Definition at line 649 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 |
Validate the GLOBAL_ID tags on the source and target meshes.
The remapping machinery identifies entities across MPI ranks solely by their GLOBAL_ID: the coverage migration packs vertex ids into tuple lists and resolves them on the receiving rank, and the map writer indexes rows/columns by element id. A missing tag reads back as the dense-tag default of -1 (see Core::globalId_tag), which is silently accepted and produces collapsed cells or a corrupt map far from the actual cause.
This checks, collectively, that every vertex and every element of both meshes has a strictly positive id, and that ids are locally unique. It is intended to run before any expensive operation so that a bad mesh fails immediately with a descriptive message.
| throw_error | If true (default) return MB_FAILURE on the first problem found; if false only report the diagnosis and continue. |
Select the formula used for all spherical area computations driven by this remapper: the intersection kernel, the covering-set construction and the overlap-orientation fixups.
Offline drivers (mbtempest) should call this so that a single choice applies uniformly; online users get IntxAreaUtils::DEFAULT_AREA_METHOD, which is the adaptive Van Oosterom-Strackee formula.
Must be called before ConstructCoveringSet()/ComputeOverlapMesh() to take effect.
Definition at line 170 of file TempestRemapper.hpp.
References m_area_method.
Referenced by main().
|
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 619 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 anonymous_namespace{mbtempest.cpp}::convertAndWriteMOABMesh().
| 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 1008 of file TempestRemapper.cpp.
References moab::Remapper::CoveringMesh, 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 779 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 anonymous_namespace{mbtempest.cpp}::handleOverlapMOAB().
|
inline |
Declare that the source and/or target mesh is regionally refined, so their domains need not coincide.
With this set, a source or target cell may be only partially covered by the other mesh (or not covered at all). The overlap-based area correction then treats the accumulated overlap area as authoritative for partially covered cells, rather than requiring it to agree with the geometric area to 1e-10. Without it a partially covered cell keeps its full geometric area while receiving only part of the overlap, which drives its map row sum below one.
Must be set before GenerateRemappingWeights() to take effect.
Definition at line 194 of file TempestRemapper.hpp.
References rrmgrids.
Referenced by main().
|
private |
Helper for ValidateGlobalIds: check one mesh set at one dimension.
Definition at line 1250 of file TempestRemapper.cpp.
References moab::Range::empty(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), moab::Remapper::m_interface, MB_CHK_ERR, MB_SUCCESS, moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by ValidateGlobalIds().
| ErrorCode moab::TempestRemapper::ValidateGlobalIds | ( | bool | throw_error = true | ) |
Definition at line 1304 of file TempestRemapper.cpp.
References is_parallel, is_root, m_source_set, m_target_set, MB_SET_ERR, MB_SUCCESS, rank, and validate_global_ids_private().
Referenced by ConstructCoveringSet().
| 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 968 of file TempestRemapper.cpp.
References MB_SUCCESS.
|
friend |
Definition at line 76 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 471 of file TempestRemapper.hpp.
Referenced by convert_mesh_to_tempest_private(), and main().
|
private |
Definition at line 594 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertOverlapMeshSourceOrdered(), initialize(), moab::TempestOnlineMap::TempestOnlineMap(), and ValidateGlobalIds().
|
private |
Definition at line 595 of file TempestRemapper.hpp.
Referenced by convert_tempest_mesh_private(), ConvertMeshToTempest(), ConvertTempestMesh(), initialize(), moab::TempestOnlineMap::TempestOnlineMap(), and ValidateGlobalIds().
|
private |
Definition at line 591 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), GetAreaMethod(), and SetAreaMethod().
|
private |
Definition at line 586 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConstructCoveringSet(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), GetCoveringMesh(), GetMesh(), initialize(), and SetMesh().
|
private |
Definition at line 588 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), GetMeshEntities(), and SetMeshSet().
|
private |
Definition at line 587 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertMeshToTempest(), GetCoveringSet(), GetMeshSet(), and SetMeshSet().
|
private |
Definition at line 589 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), and GetMeshVertices().
|
private |
Definition at line 576 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetMesh(), initialize(), and SetMesh().
|
private |
Definition at line 578 of file TempestRemapper.hpp.
Referenced by clear(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), and GetMeshEntities().
|
private |
Definition at line 579 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetMeshSet(), and initialize().
|
private |
Definition at line 577 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), and SetMeshType().
|
private |
Definition at line 580 of file TempestRemapper.hpp.
|
private |
Definition at line 556 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMesh(), initialize(), ResetMeshSet(), and SetMesh().
|
private |
Definition at line 558 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), GetMeshEntities(), ResetMeshSet(), and SetMeshSet().
|
private |
Definition at line 563 of file TempestRemapper.hpp.
Referenced by SetMeshType().
|
private |
Definition at line 560 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMeshSet(), initialize(), ResetMeshSet(), SetMeshSet(), and ValidateGlobalIds().
|
private |
Definition at line 557 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), and SetMeshType().
|
private |
Definition at line 559 of file TempestRemapper.hpp.
Referenced by clear(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), GetMeshVertices(), and ResetMeshSet().
|
private |
Definition at line 566 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertAllMeshesToTempest(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMesh(), initialize(), and SetMesh().
|
private |
Definition at line 568 of file TempestRemapper.hpp.
Referenced by clear(), ConvertMeshToTempest(), ConvertOverlapMeshSourceOrdered(), ConvertTempestMesh(), GetIMasks(), GetMeshEntities(), and SetMeshSet().
|
private |
Definition at line 573 of file TempestRemapper.hpp.
Referenced by SetMeshType().
|
private |
Definition at line 570 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), ConvertMeshToTempest(), ConvertTempestMesh(), GetMeshSet(), initialize(), SetMeshSet(), and ValidateGlobalIds().
|
private |
Definition at line 567 of file TempestRemapper.hpp.
Referenced by ConvertTempestMesh(), GetMeshType(), and SetMeshType().
|
private |
Definition at line 569 of file TempestRemapper.hpp.
Referenced by clear(), ConvertMeshToTempest(), ConvertTempestMesh(), GetIMasks(), and GetMeshVertices().
|
private |
Definition at line 561 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet().
|
private |
Definition at line 571 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet().
|
private |
Definition at line 583 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 463 of file TempestRemapper.hpp.
Referenced by 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 456 of file TempestRemapper.hpp.
Referenced by convert_mesh_to_tempest_private(), and ConvertOverlapMeshSourceOrdered().
|
private |
Definition at line 562 of file TempestRemapper.hpp.
Referenced by clear(), ConvertMeshToTempest(), GetIMasks(), and initialize().
|
private |
Definition at line 572 of file TempestRemapper.hpp.
Referenced by clear(), ComputeOverlapMesh(), ConvertMeshToTempest(), GetIMasks(), and initialize().
|
private |
Definition at line 596 of file TempestRemapper.hpp.
Referenced by ComputeOverlapMesh(), ConstructCoveringSet(), convert_tempest_mesh_private(), ConvertMeshToTempest(), initialize(), moab::TempestOnlineMap::TempestOnlineMap(), and ValidateGlobalIds().
|
private |
Definition at line 593 of file TempestRemapper.hpp.
Referenced by ConstructCoveringSet(), IsRegionalMesh(), and SetRegionalMesh().
|
private |
Definition at line 597 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 479 of file TempestRemapper.hpp.
Referenced by convert_tempest_mesh_private(), ConvertMeshToTempest(), and ConvertTempestMesh().