#include <NCHelperESMF.hpp>
Inheritance diagram for moab::NCHelperESMF:
Collaboration diagram for moab::NCHelperESMF:Public Member Functions | |
| NCHelperESMF (ReadNC *readNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
Public Member Functions inherited from moab::UcdNCHelper | |
| UcdNCHelper (ReadNC *readNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
| virtual | ~UcdNCHelper () |
Public Member Functions inherited from moab::NCHelper | |
| NCHelper (ReadNC *readNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
| virtual | ~NCHelper () |
| ErrorCode | create_conventional_tags (const std::vector< int > &tstep_nums) |
| Create NC conventional tags. More... | |
| ErrorCode | update_time_tag_vals () |
| Update time tag values if timesteps spread across files. More... | |
Static Public Member Functions | |
| static bool | can_read_file (ReadNC *readNC) |
Static Public Member Functions inherited from moab::NCHelper | |
| static ReadNC::NCFormatType | get_nc_format (ReadNC *readNC, int fileId) |
| Get appropriate format to read the file. More... | |
| static std::string | get_default_ncformat_options (ReadNC::NCFormatType format) |
| Get appropriate format to read the file. More... | |
| static NCHelper * | get_nc_helper (ReadNC *readNC, int fileId, const FileOptions &opts, EntityHandle fileSet) |
| Get appropriate helper instance for ReadNC class. More... | |
Private Member Functions | |
| virtual ErrorCode | init_mesh_vals () |
| Implementation of NCHelper::init_mesh_vals() More... | |
| virtual ErrorCode | create_mesh (Range &faces) |
| Implementation of NCHelper::create_mesh() More... | |
| virtual std::string | get_mesh_type_name () |
| Implementation of NCHelper::get_mesh_type_name() More... | |
| ErrorCode | create_local_vertices (const std::vector< int > &vertices_on_local_cells, EntityHandle &start_vertex) |
| Create local vertices. More... | |
| ErrorCode | create_local_cells (const std::vector< int > &vertices_on_local_cells, const std::vector< int > &num_edges_on_local_cells, EntityHandle start_vertex, Range &faces) |
| Create local cells without padding (cells are divided into groups based on the number of edges) More... | |
| ErrorCode | create_padded_local_cells (const std::vector< int > &vertices_on_local_cells, EntityHandle start_vertex, Range &faces) |
| Create local cells with padding (padded cells will have the same number of edges) More... | |
| virtual ErrorCode | check_existing_mesh () |
| virtual ErrorCode | read_ucd_variables_to_nonset_allocate (std::vector< ReadNC::VarData > &, std::vector< int > &) |
| Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate() More... | |
| virtual ErrorCode | read_ucd_variables_to_nonset (std::vector< ReadNC::VarData > &, std::vector< int > &) |
| Implementation of UcdNCHelper::read_ucd_variables_to_nonset() More... | |
Private Attributes | |
| int | maxEdgesPerCell |
| int | coordDim |
| int | centerCoordsId |
| bool | degrees |
| Range | facesOwned |
Additional Inherited Members | |
Protected Member Functions inherited from moab::UcdNCHelper | |
| template<typename T > | |
| void | kji_to_jik_stride (size_t, size_t nj, size_t nk, void *dest, T *source, Range &localGid) |
| This version takes as input the moab range, from which we actually need just the size of each sequence, for a proper transpose of the data. More... | |
Protected Member Functions inherited from moab::NCHelper | |
| ErrorCode | read_variables_setup (std::vector< std::string > &var_names, std::vector< int > &tstep_nums, std::vector< ReadNC::VarData > &vdatas, std::vector< ReadNC::VarData > &vsetdatas) |
| Separate set and non-set variables (common to scd mesh and ucd mesh) More... | |
| ErrorCode | read_variables_to_set (std::vector< ReadNC::VarData > &vdatas, std::vector< int > &tstep_nums) |
| Read set variables (common to scd mesh and ucd mesh) More... | |
| ErrorCode | read_coordinate (const char *var_name, int lmin, int lmax, std::vector< double > &cvals) |
| ErrorCode | get_tag_to_set (ReadNC::VarData &var_data, int tstep_num, Tag &tagh) |
| ErrorCode | get_tag_to_nonset (ReadNC::VarData &var_data, int tstep_num, Tag &tagh, int num_lev) |
| ErrorCode | create_attrib_string (const std::map< std::string, ReadNC::AttData > &attMap, std::string &attString, std::vector< int > &attLen) |
| Create a character string attString of attMap. with '\0' terminating each attribute name, ';' separating the data type and value, and ';' separating one name/data type/value from the next'. attLen stores the end position for each name/data type/ value. More... | |
| ErrorCode | create_dummy_variables () |
| For a dimension that does not have a corresponding coordinate variable (e.g. ncol for HOMME), create a dummy variable with a sparse tag to store the dimension length. More... | |
Protected Attributes inherited from moab::UcdNCHelper | |
| int | nCells |
| Dimensions of global grid in file. More... | |
| int | nEdges |
| int | nVertices |
| int | nLocalCells |
| Dimensions of my local part of grid. More... | |
| int | nLocalEdges |
| int | nLocalVertices |
| std::vector< double > | xVertVals |
| Coordinate values for vertices. More... | |
| std::vector< double > | yVertVals |
| std::vector< double > | zVertVals |
| int | cDim |
| Dimension numbers for nCells, nEdges and nVertices. More... | |
| int | eDim |
| int | vDim |
| Range | localGidCells |
| Local global ID for cells, edges and vertices. More... | |
| Range | localGidEdges |
| Range | localGidVerts |
Protected Attributes inherited from moab::NCHelper | |
| ReadNC * | _readNC |
| Allow NCHelper to directly access members of ReadNC. More... | |
| int | _fileId |
| Cache some information from ReadNC. More... | |
| const FileOptions & | _opts |
| EntityHandle | _fileSet |
| int | nTimeSteps |
| Dimensions of time and level. More... | |
| int | nLevels |
| std::vector< double > | tVals |
| Values for time and level. More... | |
| std::vector< double > | levVals |
| int | tDim |
| Dimension numbers for time and level. More... | |
| int | levDim |
| std::set< std::string > | ignoredVarNames |
| Ignored variables. More... | |
| std::set< std::string > | dummyVarNames |
| Dummy variables. More... | |
Definition at line 18 of file NCHelperESMF.hpp.
| moab::NCHelperESMF::NCHelperESMF | ( | ReadNC * | readNC, |
| int | fileId, | ||
| const FileOptions & | opts, | ||
| EntityHandle | fileSet | ||
| ) |
Definition at line 24 of file NCHelperESMF.cpp.
|
static |
Definition at line 30 of file NCHelperESMF.cpp.
References moab::ReadNC::dimNames.
Referenced by moab::NCHelper::get_nc_format().
|
inlineprivatevirtual |
|
private |
Create local cells without padding (cells are divided into groups based on the number of edges)
Definition at line 627 of file NCHelperESMF.cpp.
References moab::NCHelper::_fileSet, moab::NCHelper::_readNC, moab::Interface::add_entities(), moab::Range::begin(), moab::DEFAULT_MAX_EDGES_PER_CELL, moab::Range::end(), moab::ReadUtilIface::get_element_connect(), moab::Range::index(), moab::Range::insert(), moab::UcdNCHelper::localGidCells, moab::UcdNCHelper::localGidVerts, maxEdgesPerCell, MB_CHK_SET_ERR, MB_SUCCESS, moab::ReadNC::mbImpl, MBPOLYGON, MBQUAD, MBTRI, moab::ReadNC::mGlobalIdTag, moab::UcdNCHelper::nLocalCells, moab::ReadNC::readMeshIface, and moab::Interface::tag_iterate().
Referenced by create_mesh().
|
private |
Create local vertices.
Definition at line 504 of file NCHelperESMF.cpp.
References moab::NCHelper::_fileId, moab::NCHelper::_fileSet, moab::NCHelper::_readNC, moab::Interface::add_entities(), moab::Range::begin(), coordDim, moab::ReadNC::dbgOut, degrees, moab::Range::end(), moab::ReadUtilIface::get_node_coords(), moab::UcdNCHelper::localGidVerts, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, moab::ReadNC::mbImpl, moab::ReadNC::mGlobalIdTag, moab::ReadNC::mpFileIdTag, NCDF_SIZE, NCFUNC, NCFUNCAG, moab::UcdNCHelper::nLocalVertices, moab::Range::pair_begin(), moab::Range::pair_end(), moab::pideg, moab::Range::psize(), moab::ReadNC::readMeshIface, moab::Range::size(), moab::Interface::tag_get_bytes(), moab::Interface::tag_iterate(), and moab::DebugOutput::tprintf().
Referenced by create_mesh().
Implementation of NCHelper::create_mesh()
Implements moab::NCHelper.
Definition at line 136 of file NCHelperESMF.cpp.
References moab::NCHelper::_fileId, moab::NCHelper::_readNC, create_local_cells(), create_local_vertices(), create_padded_local_cells(), moab::ReadNC::dbgOut, moab::Range::insert(), moab::ReadNC::isParallel, moab::UcdNCHelper::localGidCells, maxEdgesPerCell, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, NCDF_SIZE, moab::UcdNCHelper::nCells, NCFUNC, NCFUNCAG, moab::UcdNCHelper::nLocalCells, moab::ReadNC::noMixedElements, moab::Range::pair_begin(), moab::Range::pair_end(), moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), moab::ProcConfig::proc_size(), moab::Range::psize(), moab::Range::size(), moab::DebugOutput::tprintf(), and moab::ReadNC::trivialPartitionShift.
|
private |
Create local cells with padding (padded cells will have the same number of edges)
Definition at line 706 of file NCHelperESMF.cpp.
References moab::NCHelper::_fileSet, moab::NCHelper::_readNC, moab::Interface::add_entities(), moab::Range::begin(), moab::Range::end(), moab::ReadUtilIface::get_element_connect(), moab::Range::index(), moab::Range::insert(), moab::UcdNCHelper::localGidCells, moab::UcdNCHelper::localGidVerts, maxEdgesPerCell, MB_CHK_SET_ERR, MB_SUCCESS, moab::ReadNC::mbImpl, MBPOLYGON, moab::ReadNC::mGlobalIdTag, moab::UcdNCHelper::nLocalCells, moab::ReadNC::readMeshIface, and moab::Interface::tag_iterate().
Referenced by create_mesh().
|
inlineprivatevirtual |
Implementation of NCHelper::get_mesh_type_name()
Implements moab::NCHelper.
Definition at line 31 of file NCHelperESMF.hpp.
|
privatevirtual |
Implementation of NCHelper::init_mesh_vals()
Implements moab::NCHelper.
Definition at line 44 of file NCHelperESMF.cpp.
References moab::NCHelper::_fileId, moab::NCHelper::_readNC, moab::UcdNCHelper::cDim, centerCoordsId, coordDim, moab::NCHelper::create_dummy_variables(), moab::DEFAULT_MAX_EDGES_PER_CELL, degrees, moab::ReadNC::dimLens, moab::ReadNC::dimNames, maxEdgesPerCell, MB_CHK_SET_ERR, MB_INVALID_SIZE, MB_SET_ERR, MB_SUCCESS, moab::UcdNCHelper::nCells, NCFUNC, moab::UcdNCHelper::nVertices, moab::ReadNC::VarData::varAtts, moab::ReadNC::varInfo, and moab::UcdNCHelper::vDim.
|
inlineprivatevirtual |
Implementation of UcdNCHelper::read_ucd_variables_to_nonset()
Implements moab::UcdNCHelper.
Definition at line 77 of file NCHelperESMF.hpp.
References MB_SUCCESS.
|
inlineprivatevirtual |
Implementation of UcdNCHelper::read_ucd_variables_to_nonset_allocate()
Implements moab::UcdNCHelper.
Definition at line 62 of file NCHelperESMF.hpp.
References MB_SUCCESS.
|
private |
Definition at line 87 of file NCHelperESMF.hpp.
Referenced by init_mesh_vals().
|
private |
Definition at line 86 of file NCHelperESMF.hpp.
Referenced by create_local_vertices(), and init_mesh_vals().
|
private |
Definition at line 88 of file NCHelperESMF.hpp.
Referenced by create_local_vertices(), and init_mesh_vals().
|
private |
Definition at line 89 of file NCHelperESMF.hpp.
|
private |
Definition at line 85 of file NCHelperESMF.hpp.
Referenced by create_local_cells(), create_mesh(), create_padded_local_cells(), and init_mesh_vals().