Child helper class for scd mesh, e.g. CAM_EL or CAM_FV. More...
#include <NCHelper.hpp>
Public Member Functions | |
ScdNCHelper (ReadNC *readNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
virtual | ~ScdNCHelper () |
Public Member Functions inherited from moab::NCHelper | |
NCHelper (ReadNC *readNC, int fileId, const FileOptions &opts, EntityHandle fileSet) | |
virtual | ~NCHelper () |
virtual ErrorCode | init_mesh_vals ()=0 |
Interfaces to be implemented in child classes. More... | |
virtual std::string | get_mesh_type_name ()=0 |
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... | |
Protected Attributes | |
int | gDims [6] |
Dimensions of global grid in file. More... | |
int | lDims [6] |
Dimensions of my local part of grid. More... | |
int | gCDims [6] |
Center dimensions of global grid in file. More... | |
int | lCDims [6] |
Center dimensions of my local part of grid. More... | |
std::vector< double > | ilVals |
Values for i/j. More... | |
std::vector< double > | jlVals |
std::vector< double > | ilCVals |
Center values for i/j. More... | |
std::vector< double > | jlCVals |
int | iDim |
Dimension numbers for i/j. More... | |
int | jDim |
int | iCDim |
Center dimension numbers for i/j. More... | |
int | jCDim |
int | locallyPeriodic [3] |
Whether mesh is locally periodic in i or j or k. More... | |
int | globallyPeriodic [3] |
Whether mesh is globally periodic in i or j or k. More... | |
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... | |
Private Member Functions | |
virtual ErrorCode | check_existing_mesh () |
Implementation of NCHelper::check_existing_mesh() More... | |
virtual ErrorCode | create_mesh (Range &faces) |
Implementation of NCHelper::create_mesh() More... | |
virtual ErrorCode | read_variables (std::vector< std::string > &var_names, std::vector< int > &tstep_nums) |
Implementation of NCHelper::read_variables() More... | |
ErrorCode | read_scd_variables_to_nonset_allocate (std::vector< ReadNC::VarData > &vdatas, std::vector< int > &tstep_nums) |
Read non-set variables for scd mesh. More... | |
ErrorCode | read_scd_variables_to_nonset (std::vector< ReadNC::VarData > &vdatas, std::vector< int > &tstep_nums) |
ErrorCode | create_quad_coordinate_tag () |
Create COORDS tag for quads coordinate. More... | |
template<typename T > | |
void | kji_to_jik (size_t ni, size_t nj, size_t nk, void *dest, T *source) |
Additional Inherited Members | |
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... | |
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... | |
Child helper class for scd mesh, e.g. CAM_EL or CAM_FV.
Definition at line 130 of file NCHelper.hpp.
|
inline |
Definition at line 133 of file NCHelper.hpp.
References gCDims, gDims, globallyPeriodic, lCDims, lDims, and locallyPeriodic.
|
inlinevirtual |
Definition at line 147 of file NCHelper.hpp.
|
privatevirtual |
Implementation of NCHelper::check_existing_mesh()
Implements moab::NCHelper.
Definition at line 961 of file NCHelper.cpp.
References moab::NCHelper::_fileSet, moab::NCHelper::_readNC, ErrorCode, moab::Interface::get_number_entities_by_dimension(), lCDims, MB_CHK_SET_ERR, MB_SUCCESS, and moab::ReadNC::mbImpl.
Implementation of NCHelper::create_mesh()
Implements moab::NCHelper.
Reimplemented in moab::NCHelperScrip, and moab::NCHelperDomain.
Definition at line 998 of file NCHelper.cpp.
References moab::NCHelper::_fileSet, moab::NCHelper::_readNC, moab::Interface::add_entities(), moab::Range::begin(), moab::ScdBox::boundary_complete(), moab::ScdBox::box_set(), moab::ScdInterface::construct_box(), create_quad_coordinate_tag(), moab::ReadNC::dbgOut, moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::ScdBox::get_coordinate_arrays(), moab::DebugOutput::get_verbosity(), ilVals, moab::Range::insert(), jlVals, lDims, moab::NCHelper::levVals, moab::Interface::list_entities(), locallyPeriodic, MB_CHK_SET_ERR, MB_SUCCESS, moab::ReadNC::mbImpl, moab::ReadNC::mGlobalIdTag, moab::ReadNC::mpFileIdTag, moab::ScdBox::num_elements(), moab::ScdBox::num_vertices(), moab::ReadNC::parData, moab::ReadNC::scdi, moab::ScdBox::start_element(), moab::ScdBox::start_vertex(), moab::Interface::tag_get_data(), moab::Interface::tag_iterate(), moab::DebugOutput::tprintf(), and moab::Interface::UNION.
|
private |
Create COORDS tag for quads coordinate.
Definition at line 1352 of file NCHelper.cpp.
References moab::NCHelper::_fileSet, moab::NCHelper::_readNC, moab::Range::begin(), moab::Range::end(), ErrorCode, moab::ParallelComm::filter_pstatus(), moab::Interface::get_entities_by_type(), ilCVals, moab::ReadNC::isParallel, jlCVals, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, moab::ReadNC::mbImpl, MBQUAD, PSTATUS_NOT, PSTATUS_NOT_OWNED, moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_iterate().
Referenced by create_mesh().
|
inlineprivate |
|
private |
Definition at line 1238 of file NCHelper.cpp.
References moab::NCHelper::_fileId, moab::NCHelper::_readNC, moab::ReadNC::dbgOut, ErrorCode, moab::DebugOutput::get_verbosity(), kji_to_jik(), MB_CHK_SET_ERR, MB_SET_ERR, NCFUNCAG, moab::DebugOutput::printf(), read_scd_variables_to_nonset_allocate(), and moab::DebugOutput::tprintf().
Referenced by read_variables().
|
private |
Read non-set variables for scd mesh.
Definition at line 1120 of file NCHelper.cpp.
References moab::NCHelper::_fileSet, moab::NCHelper::_readNC, moab::Range::begin(), moab::ReadNC::dbgOut, moab::ReadNC::dimLens, moab::Range::end(), moab::ReadNC::ENTLOCEDGE, moab::ReadNC::ENTLOCEWEDGE, moab::ReadNC::ENTLOCFACE, moab::ReadNC::ENTLOCNSEDGE, moab::ReadNC::ENTLOCVERT, ErrorCode, moab::ParallelComm::filter_pstatus(), moab::Interface::get_entities_by_dimension(), moab::NCHelper::get_tag_to_nonset(), moab::ReadNC::isParallel, lCDims, lDims, MB_CHK_SET_ERR, MB_INDEX_OUT_OF_RANGE, MB_NOT_IMPLEMENTED, MB_SET_ERR, MB_SET_GLB_ERR, moab::ReadNC::mbImpl, moab::Range::psize(), PSTATUS_NOT, PSTATUS_NOT_OWNED, moab::Range::size(), moab::Interface::tag_iterate(), moab::NCHelper::tDim, and moab::DebugOutput::tprintf().
Referenced by read_scd_variables_to_nonset().
|
privatevirtual |
Implementation of NCHelper::read_variables()
Implements moab::NCHelper.
Definition at line 1100 of file NCHelper.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, read_scd_variables_to_nonset(), moab::NCHelper::read_variables_setup(), and moab::NCHelper::read_variables_to_set().
|
protected |
Center dimensions of global grid in file.
Definition at line 184 of file NCHelper.hpp.
Referenced by moab::NCHelperEuler::init_mesh_vals(), moab::NCHelperFV::init_mesh_vals(), and ScdNCHelper().
|
protected |
Dimensions of global grid in file.
Definition at line 178 of file NCHelper.hpp.
Referenced by moab::NCHelperDomain::create_mesh(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), moab::NCHelperFV::init_mesh_vals(), and ScdNCHelper().
|
protected |
Whether mesh is globally periodic in i or j or k.
Definition at line 205 of file NCHelper.hpp.
Referenced by moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), moab::NCHelperFV::init_mesh_vals(), and ScdNCHelper().
|
protected |
Center dimension numbers for i/j.
Definition at line 199 of file NCHelper.hpp.
Referenced by moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Dimension numbers for i/j.
Definition at line 196 of file NCHelper.hpp.
Referenced by moab::NCHelperDomain::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Center values for i/j.
Definition at line 193 of file NCHelper.hpp.
Referenced by create_quad_coordinate_tag(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Values for i/j.
Definition at line 190 of file NCHelper.hpp.
Referenced by create_mesh(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Definition at line 199 of file NCHelper.hpp.
Referenced by moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Definition at line 196 of file NCHelper.hpp.
Referenced by moab::NCHelperDomain::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Definition at line 193 of file NCHelper.hpp.
Referenced by create_quad_coordinate_tag(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Definition at line 190 of file NCHelper.hpp.
Referenced by create_mesh(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
protected |
Center dimensions of my local part of grid.
Definition at line 187 of file NCHelper.hpp.
Referenced by check_existing_mesh(), moab::NCHelperDomain::create_mesh(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), moab::NCHelperFV::init_mesh_vals(), read_scd_variables_to_nonset_allocate(), and ScdNCHelper().
|
protected |
Dimensions of my local part of grid.
Definition at line 181 of file NCHelper.hpp.
Referenced by create_mesh(), moab::NCHelperDomain::create_mesh(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), moab::NCHelperFV::init_mesh_vals(), read_scd_variables_to_nonset_allocate(), and ScdNCHelper().
|
protected |
Whether mesh is locally periodic in i or j or k.
Definition at line 202 of file NCHelper.hpp.
Referenced by create_mesh(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), moab::NCHelperFV::init_mesh_vals(), and ScdNCHelper().