Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::Remapper Class Reference

#include <Remapper.hpp>

+ Inheritance diagram for moab::Remapper:
+ Collaboration diagram for moab::Remapper:

Public Types

enum  IntersectionContext {
  DEFAULT = -1 , SourceMesh = 0 , TargetMesh = 1 , OverlapMesh = 2 ,
  CoveringMesh = 3 , SourceMeshWithGhosts = 4 , TargetMeshWithGhosts = 5
}
 

Public Member Functions

 Remapper (moab::Interface *mbInt)
 
virtual ~Remapper ()
 
moab::Interfaceget_interface ()
 
ErrorCode LoadNativeMesh (std::string filename, moab::EntityHandle &meshset, std::vector< int > &metadata, const char *readopts=0)
 

Protected Attributes

Interfacem_interface
 

Detailed Description

Definition at line 38 of file Remapper.hpp.

Member Enumeration Documentation

◆ IntersectionContext

Enumerator
DEFAULT 
SourceMesh 
TargetMesh 
OverlapMesh 
CoveringMesh 
SourceMeshWithGhosts 
TargetMeshWithGhosts 

Definition at line 57 of file Remapper.hpp.

58  {
59  DEFAULT = -1, // default context
60  SourceMesh = 0, // source mesh
61  TargetMesh = 1, // target mesh
62  OverlapMesh = 2, // overlap/intersection mesh
63  CoveringMesh = 3, // source mesh covering target mesh
64  SourceMeshWithGhosts = 4, // mesh with extra ghost layers to compute coverage in high order case or bilin
65  TargetMeshWithGhosts = 5 // mesh with extra ghost layers to impose target data limiting
66  };

Constructor & Destructor Documentation

◆ Remapper()

moab::Remapper::Remapper ( moab::Interface mbInt)
inline

Definition at line 44 of file Remapper.hpp.

44  : m_interface( mbInt )
45 #endif
46  {
47  }

◆ ~Remapper()

virtual moab::Remapper::~Remapper ( )
inlinevirtual

Definition at line 49 of file Remapper.hpp.

50  {
51 #ifdef MOAB_HAVE_MPI
52  m_pcomm = NULL;
53 #endif
54  m_interface = NULL;
55  }

References m_interface.

Member Function Documentation

◆ get_interface()

moab::Interface* moab::Remapper::get_interface ( )
inline

Definition at line 68 of file Remapper.hpp.

69  {
70  return m_interface;
71  }

References m_interface.

Referenced by moab::TempestOnlineMap::TempestOnlineMap().

◆ LoadNativeMesh()

ErrorCode moab::Remapper::LoadNativeMesh ( std::string  filename,
moab::EntityHandle meshset,
std::vector< int > &  metadata,
const char *  readopts = 0 
)
inline

Definition at line 123 of file Remapper.hpp.

127  {
128 #ifdef MOAB_HAVE_MPI
129  std::string opts = "";
130  if( readopts )
131  {
132  if( opts.size() )
133  opts = opts + ";" + std::string( readopts );
134  else
135  opts = std::string( readopts );
136  }
137 
138  if( !m_pcomm->rank() ) std::cout << "Reading file (" << filename << ") with options = [" << opts << "]\n";
139 #else
140  const std::string opts = std::string( ( readopts ? readopts : "" ) );
141  std::cout << "Reading file (" << filename << ") with options = [" << opts << "]\n";
142 #endif
143  moab::ErrorCode rval = m_interface->load_file( filename.c_str(), &meshset, opts.c_str() );MB_CHK_ERR( rval );
144 
145  Tag rectilinearTag;
146  rval = m_interface->tag_get_handle( "ClimateMetadata", rectilinearTag );
147 
148  if( rval != MB_FAILURE && rval != MB_TAG_NOT_FOUND && rval != MB_ALREADY_ALLOCATED &&
149  rectilinearTag != nullptr )
150  {
151  int dimSizes[3];
152  rval = m_interface->tag_get_data( rectilinearTag, &meshset, 1,
153  dimSizes ); // MB_CHK_SET_ERR( rval, "Error geting tag data" );
154  metadata.clear();
155  metadata.push_back( dimSizes[0] );
156  metadata.push_back( dimSizes[1] );
157  metadata.push_back( dimSizes[2] );
158  }
159 
160  return MB_SUCCESS;
161  }

References ErrorCode, moab::Interface::load_file(), m_interface, MB_ALREADY_ALLOCATED, MB_CHK_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().

Referenced by CreateTempestMesh(), and main().

Member Data Documentation

◆ m_interface


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