An offline map between two Meshes. More...
#include <TempestOnlineMap.hpp>
Inheritance diagram for moab::TempestOnlineMap:
Collaboration diagram for moab::TempestOnlineMap:Public Types | |
| enum | DiscretizationType { DiscretizationType_FV = 0 , DiscretizationType_CGLL = 1 , DiscretizationType_DGLL = 2 , DiscretizationType_PCLOUD = 3 } |
| enum | CAASType { CAAS_NONE = 0 , CAAS_GLOBAL = 1 , CAAS_LOCAL = 2 , CAAS_LOCAL_ADJACENT = 3 , CAAS_QLT = 4 } |
| typedef double(* | sample_function) (double, double) |
Public Member Functions | |||||
| TempestOnlineMap (moab::TempestRemapper *remapper) | |||||
| Generate the metadata associated with the offline map. More... | |||||
| virtual | ~TempestOnlineMap () | ||||
| Define a virtual destructor. More... | |||||
| moab::ErrorCode | GenerateRemappingWeights (std::string strInputType, std::string strOutputType, const GenerateOfflineMapAlgorithmOptions &mapOptions, const std::string &srcDofTagName="GLOBAL_ID", const std::string &tgtDofTagName="GLOBAL_ID") | ||||
| Generate the offline map, given the source and target mesh and discretization details. This method generates the mapping between the two meshes based on the overlap and stores the result in the SparseMatrix. More... | |||||
| moab::ErrorCode | ReadParallelMap (const char *strSource, const std::vector< int > &tgt_dof_ids, int arearead, std::vector< double > &areaA, int &nA, std::vector< double > &areaB, int &nB) | ||||
| Generate the metadata associated with the offline map. More... | |||||
| moab::ErrorCode | WriteParallelMap (const std::string &strTarget, const std::map< std::string, std::string > &attrMap) | ||||
| Write the TempestOnlineMap to a parallel NetCDF file. More... | |||||
| virtual int | IsConsistent (double dTolerance) | ||||
| Determine if the map is first-order accurate. More... | |||||
| virtual int | IsConservative (double dTolerance) | ||||
| Determine if the map is conservative. More... | |||||
| virtual int | IsMonotone (double dTolerance) | ||||
| Determine if the map is monotone. More... | |||||
| const DataArray1D< double > & | GetGlobalSourceAreas () const | ||||
| If we computed the reduction, get the vector representing the source areas for all entities in the mesh More... | |||||
| const DataArray1D< double > & | GetGlobalTargetAreas () const | ||||
| If we computed the reduction, get the vector representing the target areas for all entities in the mesh More... | |||||
| void | PrintMapStatistics () | ||||
| Print information and metadata about the remapping weights. More... | |||||
| moab::ErrorCode | SetDOFmapTags (const std::string srcDofTagName, const std::string tgtDofTagName) | ||||
Store the tag names associated with global DoF ids for source and target meshes to be used for mapping.
| |||||
| moab::ErrorCode | SetDOFmapAssociation (DiscretizationType srcType, int srcOrder, bool isSrcContinuous, DataArray3D< int > *srcdataGLLNodes, DataArray3D< int > *srcdataGLLNodesSrc, DiscretizationType destType, int destOrder, bool isTgtContinuous, DataArray3D< int > *tgtdataGLLNodes) | ||||
| std::pair< double, double > | ApplyBoundsLimiting (std::vector< double > &dataInDouble, std::vector< double > &dataOutDouble, CAASType caasType=CAAS_GLOBAL, int caasIteration=0, double mismatch=0.0) | ||||
| void | ComputeAdjacencyRelations (std::vector< std::unordered_set< int > > &vecAdjFaces, int nrings, const Range &entities, bool useMOABAdjacencies=true, Mesh *trMesh=nullptr) | ||||
| int | GetSourceGlobalNDofs () | ||||
| Get the number of total Degrees-Of-Freedom defined on the source mesh. More... | |||||
| int | GetDestinationGlobalNDofs () | ||||
| Get the number of total Degrees-Of-Freedom defined on the destination mesh. More... | |||||
| int | GetSourceLocalNDofs () | ||||
| Get the number of local Degrees-Of-Freedom defined on the source mesh. More... | |||||
| int | GetDestinationLocalNDofs () | ||||
| Get the number of local Degrees-Of-Freedom defined on the destination mesh. More... | |||||
| int | GetSourceNDofsPerElement () | ||||
| Get the number of Degrees-Of-Freedom per element on the source mesh. More... | |||||
| int | GetDestinationNDofsPerElement () | ||||
| Get the number of Degrees-Of-Freedom per element on the destination mesh. More... | |||||
| void | SetSourceNDofsPerElement (int ns) | ||||
| Set the number of Degrees-Of-Freedom per element on the source mesh. More... | |||||
| void | SetDestinationNDofsPerElement (int nt) | ||||
| Get the number of Degrees-Of-Freedom per element on the destination mesh. More... | |||||
| int | GetRowGlobalDoF (int localID) const | ||||
| Get the global Degrees-Of-Freedom ID on the destination mesh. More... | |||||
| int | GetIndexOfRowGlobalDoF (int globalRowDoF) const | ||||
| Get the index of globaRowDoF. More... | |||||
| int | GetColGlobalDoF (int localID) const | ||||
| Get the global Degrees-Of-Freedom ID on the source mesh. More... | |||||
| int | GetIndexOfColGlobalDoF (int globalColDoF) const | ||||
| Get the index of globaColDoF. More... | |||||
| moab::ErrorCode | ApplyWeights (moab::Tag srcSolutionTag, moab::Tag tgtSolutionTag, bool transpose=false, CAASType caasType=CAAS_NONE, double default_projection=0.0) | ||||
Apply the weight matrix onto the source vector (tag) provided as input, and return the column vector (solution projection) in a tag, after the map application Compute: tgtVals = A(S->T) * More... | |||||
| moab::ErrorCode | ApplyWeightsWithDualMap (moab::Tag srcSolutionTag, moab::Tag tgtSolutionTag, TempestOnlineMap *loWeightMap, CAASType caasType=CAAS_LOCAL) | ||||
Apply the high-order weight matrix onto the source vector (tag), and then enforce bounds computed from the stencil of a separate low-order weight map using the Clip-And-Assert-Sum (CAAS) algorithm. This implements the dual-map nonlinear remapping pattern used in E3SM coupling. loWeightMap provides the low-order (monotone) map whose per-row stencil defines the min/max bounds. The CAAS filter clips the high-order result to those bounds and redistributes mass proportionally to maintain conservation. More... | |||||
| moab::ErrorCode | DefineAnalyticalSolution (moab::Tag &exactSolnTag, const std::string &solnName, Remapper::IntersectionContext ctx, sample_function testFunction, moab::Tag *clonedSolnTag=NULL, std::string cloneSolnName="") | ||||
| Define an analytical solution over the given (source or target) mesh, as specificed in the context. This routine will define a tag that is compatible with the specified discretization method type and order and sample the solution exactly using the analytical function provided by the user. More... | |||||
| moab::ErrorCode | ComputeMetrics (Remapper::IntersectionContext ctx, moab::Tag &exactTag, moab::Tag &approxTag, std::map< std::string, double > &metrics, bool verbose=true) | ||||
| Compute the error between a sampled (exact) solution and a projected solution in various error norms. More... | |||||
| moab::ErrorCode | fill_col_ids (std::vector< int > &ids_of_interest) | ||||
| moab::ErrorCode | set_col_dc_dofs (std::vector< int > &values_entities) | ||||
| moab::ErrorCode | set_row_dc_dofs (std::vector< int > &values_entities) | ||||
| void | SetMeshInput (Mesh *imesh) | ||||
| const std::vector< int > & | GetRowDofMap () const | ||||
| Read-only access to the matrix-row -> matrix-col DOF index maps. Used by callers (e.g. iMOAB diagnostic helpers) that need to translate matrix indices back into source/target tag-vector indices. More... | |||||
| const std::vector< int > & | GetColDofMap () const | ||||
Private Member Functions | |
| moab::ErrorCode | LinearRemapNN_MOAB (bool use_GID_matching=false, bool strict_check=false) |
| Compute the remapping weights as a permutation matrix that relates DoFs on the source mesh to DoFs on the target mesh. More... | |
| void | LinearRemapFVtoFV_Tempest_MOAB (int nOrder) |
| Compute the remapping weights for a FV field defined on the source to a FV field defined on the target mesh. More... | |
| void | LinearRemapSE0_Tempest_MOAB (const DataArray3D< int > &dataGLLNodes, const DataArray3D< double > &dataGLLJacobian) |
| Generate the OfflineMap for linear conserative element-average spectral element to element average remapping. More... | |
| void | LinearRemapSE4_Tempest_MOAB (const DataArray3D< int > &dataGLLNodes, const DataArray3D< double > &dataGLLJacobian, int nMonotoneType, bool fContinuousIn, bool fNoConservation) |
| Generate the OfflineMap for cubic conserative element-average spectral element to element average remapping. More... | |
| void | LinearRemapFVtoGLL_MOAB (const DataArray3D< int > &dataGLLNodes, const DataArray3D< double > &dataGLLJacobian, const DataArray1D< double > &dataGLLNodalArea, int nOrder, int nMonotoneType, bool fContinuous, bool fNoConservation) |
| Generate the OfflineMap for remapping from finite volumes to finite elements. More... | |
| void | LinearRemapGLLtoGLL2_MOAB (const DataArray3D< int > &dataGLLNodesIn, const DataArray3D< double > &dataGLLJacobianIn, const DataArray3D< int > &dataGLLNodesOut, const DataArray3D< double > &dataGLLJacobianOut, const DataArray1D< double > &dataNodalAreaOut, int nPin, int nPout, int nMonotoneType, bool fContinuousIn, bool fContinuousOut, bool fNoConservation) |
| Generate the OfflineMap for remapping from finite elements to finite elements. More... | |
| void | LinearRemapGLLtoGLL2_Pointwise_MOAB (const DataArray3D< int > &dataGLLNodesIn, const DataArray3D< double > &dataGLLJacobianIn, const DataArray3D< int > &dataGLLNodesOut, const DataArray3D< double > &dataGLLJacobianOut, const DataArray1D< double > &dataNodalAreaOut, int nPin, int nPout, int nMonotoneType, bool fContinuousIn, bool fContinuousOut) |
| Generate the OfflineMap for remapping from finite elements to finite elements (pointwise interpolation). More... | |
| moab::ErrorCode | WriteSCRIPMapFile (const std::string &strOutputFile, const std::map< std::string, std::string > &attrMap) |
| Copy the local matrix from Tempest SparseMatrix representation (ELL) to the parallel CSR Eigen Matrix for scalable application of matvec needed for projections. More... | |
| moab::ErrorCode | WriteHDF5MapFile (const std::string &filename) |
| Parallel I/O with NetCDF to write out the SCRIP file from multiple processors. More... | |
| template<typename SparseMatrixType > | |
| void | serializeSparseMatrix (const SparseMatrixType &mat, const std::string &filename) |
| void | setup_sizes_dimensions () |
| void | CAASLimiter (std::vector< double > &dataCorrectedField, std::vector< double > &dataLowerBound, std::vector< double > &dataUpperBound, double &dMass) |
| double | QLTLimiter (int caasIteration, std::vector< double > &dataCorrectedField, std::vector< double > &dataLowerBound, std::vector< double > &dataUpperBound, std::vector< double > &dMassDefect) |
| moab::ErrorCode | ApplyWeights (std::vector< double > &srcVals, std::vector< double > &tgtVals, bool transpose=false) |
Apply the weight matrix onto the source vector provided as input, and return the column vector (solution projection) after the map application Compute: tgtVals = A(S->T) * More... | |
An offline map between two Meshes.
Definition at line 68 of file TempestOnlineMap.hpp.
| typedef double( * moab::TempestOnlineMap::sample_function) (double, double) |
Definition at line 436 of file TempestOnlineMap.hpp.
| Enumerator | |
|---|---|
| CAAS_NONE | |
| CAAS_GLOBAL | |
| CAAS_LOCAL | |
| CAAS_LOCAL_ADJACENT | |
| CAAS_QLT | |
Definition at line 93 of file TempestOnlineMap.hpp.
| Enumerator | |
|---|---|
| DiscretizationType_FV | |
| DiscretizationType_CGLL | |
| DiscretizationType_DGLL | |
| DiscretizationType_PCLOUD | |
Definition at line 84 of file TempestOnlineMap.hpp.
| moab::TempestOnlineMap::TempestOnlineMap | ( | moab::TempestRemapper * | remapper | ) |
Generate the metadata associated with the offline map.
Definition at line 66 of file TempestOnlineMap.cpp.
References moab::Remapper::get_interface(), moab::TempestRemapper::GetCoveringMesh(), moab::TempestRemapper::GetMesh(), is_parallel, moab::TempestRemapper::is_parallel, is_root, moab::TempestRemapper::is_root, m_input_order, m_interface, m_meshInput, m_meshInputCov, m_meshOutput, m_meshOverlap, m_output_order, m_remapper, moab::Remapper::OverlapMesh, rank, moab::TempestRemapper::rank, setup_sizes_dimensions(), size, moab::TempestRemapper::size, moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
|
virtual |
| std::pair< double, double > moab::TempestOnlineMap::ApplyBoundsLimiting | ( | std::vector< double > & | dataInDouble, |
| std::vector< double > & | dataOutDouble, | ||
| CAASType | caasType = CAAS_GLOBAL, |
||
| int | caasIteration = 0, |
||
| double | mismatch = 0.0 |
||
| ) |
ApplyBoundsLimiting - Apply bounds limiting to the data field
| dataInDouble | - input data field |
| dataOutDouble | - output data field |
| caasType | - type of limiter |
| caasIteration | - iteration number of limiter |
Definition at line 638 of file TempestLinearRemap.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::GeomUtil::first(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Range::insert(), and MB_CHK_SET_ERR_CONT.
| moab::ErrorCode moab::TempestOnlineMap::ApplyWeights | ( | moab::Tag | srcSolutionTag, |
| moab::Tag | tgtSolutionTag, | ||
| bool | transpose = false, |
||
| CAASType | caasType = CAAS_NONE, |
||
| double | default_projection = 0.0 |
||
| ) |
Apply the weight matrix onto the source vector (tag) provided as input, and return the column vector (solution projection) in a tag, after the map application Compute: tgtVals = A(S->T) *
tgtVals = [A(T->S)]^T * Definition at line 1422 of file TempestOnlineMap.cpp.
References moab::Remapper::CoveringMesh, MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::size(), and moab::Remapper::TargetMesh.
Referenced by ApplyWeightsWithDualMap(), and main().
|
private |
Apply the weight matrix onto the source vector provided as input, and return the column vector (solution projection) after the map application Compute: tgtVals = A(S->T) *
tgtVals = [A(T->S)]^T * Definition at line 205 of file ApplyWeights.cpp.
References col_dtoc_dofmap, col_gdofmap, deterministicSparseMatTransposeVecMulClean(), deterministicSparseMatVecMulClean(), m_nTotDofs_Dest, m_nTotDofs_SrcCov, MB_SUCCESS, rank, row_dtoc_dofmap, row_gdofmap, and size.
| moab::ErrorCode moab::TempestOnlineMap::ApplyWeightsWithDualMap | ( | moab::Tag | srcSolutionTag, |
| moab::Tag | tgtSolutionTag, | ||
| TempestOnlineMap * | loWeightMap, | ||
| CAASType | caasType = CAAS_LOCAL |
||
| ) |
Apply the high-order weight matrix onto the source vector (tag), and then enforce bounds computed from the stencil of a separate low-order weight map using the Clip-And-Assert-Sum (CAAS) algorithm. This implements the dual-map nonlinear remapping pattern used in E3SM coupling. loWeightMap provides the low-order (monotone) map whose per-row stencil defines the min/max bounds. The CAAS filter clips the high-order result to those bounds and redistributes mass proportionally to maintain conservation.
Definition at line 1529 of file TempestOnlineMap.cpp.
References ApplyWeights(), moab::Range::begin(), moab::Remapper::CoveringMesh, moab::E, moab::Range::end(), ErrorCode, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, moab::Range::size(), moab::IntegerReprosum::sum_masked_batch(), and moab::Remapper::TargetMesh.
|
private |
Definition at line 546 of file TempestLinearRemap.cpp.
| void moab::TempestOnlineMap::ComputeAdjacencyRelations | ( | std::vector< std::unordered_set< int > > & | vecAdjFaces, |
| int | nrings, | ||
| const Range & | entities, | ||
| bool | useMOABAdjacencies = true, |
||
| Mesh * | trMesh = nullptr |
||
| ) |
| vecAdjFaces | |
| nrings | |
| entities | |
| useMOABAdjacencies | |
| trMesh |
Vector storing adjacent Faces.
Definition at line 1373 of file TempestOnlineMap.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::MeshTopoUtil::get_bridge_adjacencies(), moab::index, moab::Range::index(), moab::Range::insert(), and MB_CHK_SET_ERR_CONT.
| moab::ErrorCode moab::TempestOnlineMap::ComputeMetrics | ( | Remapper::IntersectionContext | ctx, |
| moab::Tag & | exactTag, | ||
| moab::Tag & | approxTag, | ||
| std::map< std::string, double > & | metrics, | ||
| bool | verbose = true |
||
| ) |
Compute the error between a sampled (exact) solution and a projected solution in various error norms.
Definition at line 2654 of file TempestOnlineMap.cpp.
References moab::error(), MB_CHK_ERR, MB_SUCCESS, moab::Range::size(), moab::Remapper::SourceMesh, moab::Remapper::TargetMesh, and verbose.
Referenced by main().
| moab::ErrorCode moab::TempestOnlineMap::DefineAnalyticalSolution | ( | moab::Tag & | exactSolnTag, |
| const std::string & | solnName, | ||
| Remapper::IntersectionContext | ctx, | ||
| sample_function | testFunction, | ||
| moab::Tag * | clonedSolnTag = NULL, |
||
| std::string | cloneSolnName = "" |
||
| ) |
Define an analytical solution over the given (source or target) mesh, as specificed in the context. This routine will define a tag that is compatible with the specified discretization method type and order and sample the solution exactly using the analytical function provided by the user.
Definition at line 2293 of file TempestOnlineMap.cpp.
References MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, moab::Range::size(), moab::Remapper::SourceMesh, and moab::Remapper::TargetMesh.
Referenced by main().
|
inline |
| moab::ErrorCode moab::TempestOnlineMap::GenerateRemappingWeights | ( | std::string | strInputType, |
| std::string | strOutputType, | ||
| const GenerateOfflineMapAlgorithmOptions & | mapOptions, | ||
| const std::string & | srcDofTagName = "GLOBAL_ID", |
||
| const std::string & | tgtDofTagName = "GLOBAL_ID" |
||
| ) |
Generate the offline map, given the source and target mesh and discretization details. This method generates the mapping between the two meshes based on the overlap and stores the result in the SparseMatrix.
the tag should be created already in the e3sm workflow; if not, create it here
Definition at line 435 of file TempestOnlineMap.cpp.
References dbgprint, moab::error(), ErrorCode, MB_ALREADY_ALLOCATED, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_EXCL, MB_TYPE_DOUBLE, and moab::Remapper::OverlapMesh.
Referenced by main().
|
inline |
|
inline |
Get the global Degrees-Of-Freedom ID on the source mesh.
Definition at line 598 of file TempestOnlineMap.hpp.
| int moab::TempestOnlineMap::GetDestinationGlobalNDofs | ( | ) |
Get the number of total Degrees-Of-Freedom defined on the destination mesh.
| int moab::TempestOnlineMap::GetDestinationLocalNDofs | ( | ) |
Get the number of local Degrees-Of-Freedom defined on the destination mesh.
|
inline |
Get the number of Degrees-Of-Freedom per element on the destination mesh.
Definition at line 616 of file TempestOnlineMap.hpp.
| const DataArray1D< double >& moab::TempestOnlineMap::GetGlobalSourceAreas | ( | ) | const |
If we computed the reduction, get the vector representing the source areas for all entities in the mesh
| const DataArray1D< double >& moab::TempestOnlineMap::GetGlobalTargetAreas | ( | ) | const |
If we computed the reduction, get the vector representing the target areas for all entities in the mesh
|
inline |
Get the index of globaColDoF.
Definition at line 603 of file TempestOnlineMap.hpp.
|
inline |
Get the index of globaRowDoF.
Definition at line 592 of file TempestOnlineMap.hpp.
|
inline |
Read-only access to the matrix-row -> matrix-col DOF index maps. Used by callers (e.g. iMOAB diagnostic helpers) that need to translate matrix indices back into source/target tag-vector indices.
Definition at line 483 of file TempestOnlineMap.hpp.
References row_dtoc_dofmap.
|
inline |
Get the global Degrees-Of-Freedom ID on the destination mesh.
Definition at line 587 of file TempestOnlineMap.hpp.
| int moab::TempestOnlineMap::GetSourceGlobalNDofs | ( | ) |
Get the number of total Degrees-Of-Freedom defined on the source mesh.
| int moab::TempestOnlineMap::GetSourceLocalNDofs | ( | ) |
Get the number of local Degrees-Of-Freedom defined on the source mesh.
|
inline |
Get the number of Degrees-Of-Freedom per element on the source mesh.
Definition at line 609 of file TempestOnlineMap.hpp.
|
virtual |
Determine if the map is conservative.
Definition at line 1192 of file TempestOnlineMap.cpp.
|
virtual |
Determine if the map is first-order accurate.
Definition at line 1146 of file TempestOnlineMap.cpp.
|
virtual |
|
private |
Compute the remapping weights for a FV field defined on the source to a FV field defined on the target mesh.
Definition at line 121 of file TempestLinearRemap.cpp.
References dbgprint.
|
private |
Generate the OfflineMap for remapping from finite volumes to finite elements.
|
private |
Generate the OfflineMap for remapping from finite elements to finite elements.
Definition at line 1300 of file TempestLinearRemap.cpp.
References center(), dbgprint, and ForceIntArrayConsistencyConservation().
|
private |
Generate the OfflineMap for remapping from finite elements to finite elements (pointwise interpolation).
Definition at line 1851 of file TempestLinearRemap.cpp.
References dbgprint.
|
private |
Compute the remapping weights as a permutation matrix that relates DoFs on the source mesh to DoFs on the target mesh.
Definition at line 58 of file TempestLinearRemap.cpp.
References col_gdofmap, m_nTotDofs_Dest, m_nTotDofs_SrcCov, MB_SUCCESS, and row_gdofmap.
|
private |
Generate the OfflineMap for linear conserative element-average spectral element to element average remapping.
|
private |
Generate the OfflineMap for cubic conserative element-average spectral element to element average remapping.
Definition at line 879 of file TempestLinearRemap.cpp.
References center(), dbgprint, and ForceConsistencyConservation3().
| void moab::TempestOnlineMap::PrintMapStatistics | ( | ) |
Print information and metadata about the remapping weights.
Definition at line 284 of file TempestLinearRemap.cpp.
Referenced by main().
|
private |
Definition at line 388 of file TempestLinearRemap.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::MeshTopoUtil::get_bridge_adjacencies(), moab::index, moab::Range::insert(), and MB_CHK_SET_ERR_CONT.
| moab::ErrorCode moab::TempestOnlineMap::ReadParallelMap | ( | const char * | strSource, |
| const std::vector< int > & | tgt_dof_ids, | ||
| int | arearead, | ||
| std::vector< double > & | areaA, | ||
| int & | nA, | ||
| std::vector< double > & | areaB, | ||
| int & | nB | ||
| ) |
Generate the metadata associated with the offline map.
Read the OfflineMap from a NetCDF file.
Definition at line 1248 of file TempestOnlineMapIO.cpp.
References CHECK_EXCEPTION, moab::TupleList::enableWriteAccess(), moab::error(), moab::TupleList::get_n(), moab::TupleList::inc_n(), moab::index, moab::TupleList::initialize(), MB_SUCCESS, moab::TupleList::reset(), moab::TupleList::sort(), moab::TupleList::vi_rd, moab::TupleList::vi_wr, moab::TupleList::vr_rd, and moab::TupleList::vr_wr.
|
private |
| moab::ErrorCode moab::TempestOnlineMap::set_col_dc_dofs | ( | std::vector< int > & | values_entities | ) |
Definition at line 401 of file TempestOnlineMap.cpp.
References MB_SUCCESS.
| moab::ErrorCode moab::TempestOnlineMap::set_row_dc_dofs | ( | std::vector< int > & | values_entities | ) |
Definition at line 420 of file TempestOnlineMap.cpp.
References MB_SUCCESS.
|
inline |
Get the number of Degrees-Of-Freedom per element on the destination mesh.
Definition at line 627 of file TempestOnlineMap.hpp.
| moab::ErrorCode moab::TempestOnlineMap::SetDOFmapAssociation | ( | DiscretizationType | srcType, |
| int | srcOrder, | ||
| bool | isSrcContinuous, | ||
| DataArray3D< int > * | srcdataGLLNodes, | ||
| DataArray3D< int > * | srcdataGLLNodesSrc, | ||
| DiscretizationType | destType, | ||
| int | destOrder, | ||
| bool | isTgtContinuous, | ||
| DataArray3D< int > * | tgtdataGLLNodes | ||
| ) |
Compute the association between the solution tag global DoF numbering and the local matrix numbering so that matvec operations can be performed consistently.
| srcType | The discretization type of the source mesh |
| srcOrder | The order of the discretization on the source mesh |
| isSrcContinuous | The continuity of the discretization on the source mesh |
| srcdataGLLNodes | The GLL nodes on the source mesh |
| srcdataGLLNodesSrc | The GLL nodes on the source mesh |
| destType | The discretization type of the destination mesh |
| destOrder | The order of the discretization on the destination mesh |
| isTgtContinuous | The continuity of the discretization on the destination mesh |
| tgtdataGLLNodes | The GLL nodes on the destination mesh |
Definition at line 165 of file TempestOnlineMap.cpp.
References MB_CHK_ERR, and MB_SUCCESS.
| moab::ErrorCode moab::TempestOnlineMap::SetDOFmapTags | ( | const std::string | srcDofTagName, |
| const std::string | tgtDofTagName | ||
| ) |
Store the tag names associated with global DoF ids for source and target meshes to be used for mapping.
| srcDofTagName | The tag name associated with global DoF ids for the source mesh |
| tgtDofTagName | The tag name associated with global DoF ids for the target mesh |
Definition at line 133 of file TempestOnlineMap.cpp.
References ErrorCode, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_ANY, MB_TAG_NOT_FOUND, and MB_TYPE_INTEGER.
|
inline |
Definition at line 475 of file TempestOnlineMap.hpp.
References m_meshInput.
|
inline |
Set the number of Degrees-Of-Freedom per element on the source mesh.
Definition at line 622 of file TempestOnlineMap.hpp.
|
private |
|
private |
Parallel I/O with NetCDF to write out the SCRIP file from multiple processors.
Need to get the global maximum of number of vertices per element Key issue is that when calling InitializeCoordinatesFromMeshFV, the allocation for dVertexLon/dVertexLat are made based on the maximum vertices in the current process. However, when writing this out, other processes may have a different size for the same array. This is hence a mess to consolidate in h5mtoscrip eventually.
Definition at line 827 of file TempestOnlineMapIO.cpp.
References MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TAG_VARLEN, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, and moab::TempestRemapper::RLL.
| moab::ErrorCode moab::TempestOnlineMap::WriteParallelMap | ( | const std::string & | strTarget, |
| const std::map< std::string, std::string > & | attrMap | ||
| ) |
Write the TempestOnlineMap to a parallel NetCDF file.
Definition at line 193 of file TempestOnlineMapIO.cpp.
References MB_CHK_ERR, and MB_SUCCESS.
Referenced by main().
|
private |
Copy the local matrix from Tempest SparseMatrix representation (ELL) to the parallel CSR Eigen Matrix for scalable application of matvec needed for projections.
Parallel I/O with HDF5 to write out the remapping weights from multiple processors.
Need to get the global maximum of number of vertices per element Key issue is that when calling InitializeCoordinatesFromMeshFV, the allocation for dVertexLon/dVertexLat are made based on the maximum vertices in the current process. However, when writing this out, other processes may have a different size for the same array. This is hence a mess to consolidate in h5mtoscrip eventually.
Definition at line 216 of file TempestOnlineMapIO.cpp.
References moab::TupleList::enableWriteAccess(), moab::error(), moab::TupleList::get_n(), moab::TupleList::inc_n(), moab::TupleList::initialize(), MB_CHK_SET_ERR, MB_SUCCESS, moab::TempestRemapper::RLL, moab::Remapper::SourceMesh, moab::Remapper::TargetMesh, moab::TupleList::vi_wr, and moab::TupleList::vr_wr.
|
private |
Definition at line 558 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), and GetColDofMap().
|
private |
Definition at line 555 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), fill_col_ids(), and LinearRemapNN_MOAB().
|
private |
Definition at line 560 of file TempestOnlineMap.hpp.
|
private |
Definition at line 563 of file TempestOnlineMap.hpp.
|
private |
Definition at line 563 of file TempestOnlineMap.hpp.
|
private |
Definition at line 563 of file TempestOnlineMap.hpp.
|
private |
Definition at line 578 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
Definition at line 578 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
Definition at line 570 of file TempestOnlineMap.hpp.
|
private |
Definition at line 564 of file TempestOnlineMap.hpp.
|
private |
Definition at line 554 of file TempestOnlineMap.hpp.
|
private |
The original tag data and local to global DoF mapping to associate matrix values to solution
Definition at line 554 of file TempestOnlineMap.hpp.
|
private |
Definition at line 569 of file TempestOnlineMap.hpp.
|
private |
Definition at line 569 of file TempestOnlineMap.hpp.
|
private |
Definition at line 571 of file TempestOnlineMap.hpp.
|
private |
Definition at line 561 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
The reference to the moab::Core object that contains source/target and overlap sets.
Definition at line 542 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
Definition at line 573 of file TempestOnlineMap.hpp.
Referenced by SetMeshInput(), and TempestOnlineMap().
|
private |
Definition at line 574 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
Definition at line 575 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
Definition at line 576 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
Definition at line 568 of file TempestOnlineMap.hpp.
|
private |
Definition at line 568 of file TempestOnlineMap.hpp.
|
private |
Definition at line 565 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), and LinearRemapNN_MOAB().
|
private |
Definition at line 565 of file TempestOnlineMap.hpp.
|
private |
Definition at line 565 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), and LinearRemapNN_MOAB().
|
private |
Definition at line 561 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
The fundamental remapping operator object.
Definition at line 528 of file TempestOnlineMap.hpp.
Referenced by TempestOnlineMap().
|
private |
Definition at line 564 of file TempestOnlineMap.hpp.
|
private |
Definition at line 579 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), and TempestOnlineMap().
|
private |
Definition at line 558 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), and GetRowDofMap().
|
private |
Definition at line 555 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), and LinearRemapNN_MOAB().
|
private |
Definition at line 560 of file TempestOnlineMap.hpp.
|
private |
Definition at line 579 of file TempestOnlineMap.hpp.
Referenced by ApplyWeights(), and TempestOnlineMap().
|
private |
Definition at line 558 of file TempestOnlineMap.hpp.
|
private |
Definition at line 555 of file TempestOnlineMap.hpp.