8 #ifndef _TEMPESTONLINEMAP_H_
9 #define _TEMPESTONLINEMAP_H_
14 #ifdef MOAB_HAVE_TEMPESTREMAP
16 #include "OfflineMap.h"
18 #error Re-configure with TempestRemap
24 #ifdef MOAB_HAVE_EIGEN3
25 #include <Eigen/Sparse>
30 #if !defined( RECTANGULAR_TRUNCATION ) && !defined( TRIANGULAR_TRUNCATION )
31 #define RECTANGULAR_TRUNCATION
78 std::string strOutputType,
79 const GenerateOfflineMapAlgorithmOptions& mapOptions,
80 const std::string& srcDofTagName =
"GLOBAL_ID",
81 const std::string& tgtDofTagName =
"GLOBAL_ID" );
92 const std::vector< int >& owned_dof_ids,
93 bool row_major_ownership =
true );
99 const std::map< std::string, std::string >& attrMap );
147 const DataArray3D< double >& dataGLLJacobian );
154 const DataArray3D< double >& dataGLLJacobian,
157 bool fNoConservation );
164 const DataArray3D< double >& dataGLLJacobian,
165 const DataArray1D< double >& dataGLLNodalArea,
169 bool fNoConservation );
176 const DataArray3D< double >& dataGLLJacobianIn,
177 const DataArray3D< int >& dataGLLNodesOut,
178 const DataArray3D< double >& dataGLLJacobianOut,
179 const DataArray1D< double >& dataNodalAreaOut,
185 bool fNoConservation );
192 const DataArray3D< double >& dataGLLJacobianIn,
193 const DataArray3D< int >& dataGLLNodesOut,
194 const DataArray3D< double >& dataGLLJacobianOut,
195 const DataArray1D< double >& dataNodalAreaOut,
200 bool fContinuousOut );
207 #ifdef MOAB_HAVE_EIGEN3
208 void copy_tempest_sparsemat_to_eigen3();
215 const std::map< std::string, std::string >& attrMap );
234 bool isSrcContinuous,
235 DataArray3D< int >* srcdataGLLNodes,
236 DataArray3D< int >* srcdataGLLNodesSrc,
238 bool isDestContinuous,
239 DataArray3D< int >* tgtdataGLLNodes );
241 #ifdef MOAB_HAVE_EIGEN3
243 typedef Eigen::Matrix< double, 1, Eigen::Dynamic > WeightDRowVector;
244 typedef Eigen::Matrix< double, Eigen::Dynamic, 1 > WeightDColVector;
245 typedef Eigen::SparseVector< double > WeightSVector;
246 typedef Eigen::SparseMatrix< double, Eigen::RowMajor > WeightRMatrix;
247 typedef Eigen::SparseMatrix< double, Eigen::ColMajor > WeightCMatrix;
249 typedef WeightDRowVector WeightRowVector;
250 typedef WeightDColVector WeightColVector;
251 typedef WeightRMatrix WeightMatrix;
257 WeightMatrix& GetWeightMatrix();
262 WeightRowVector& GetRowVector();
267 WeightColVector& GetColVector();
338 std::vector< double >& tgtVals,
339 bool transpose =
false );
358 const std::string& solnName,
362 std::string cloneSolnName =
"" );
371 std::map< std::string, double >& metrics,
379 ids_of_interest.push_back( *it + 1 );
389 ids_of_interest.push_back( *it + 1 );
401 int rearrange_arrays_by_dofs(
const std::vector< unsigned int >& gdofmap,
402 DataArray1D< double >& vecFaceArea,
403 DataArray1D< double >& dCenterLon,
404 DataArray1D< double >& dCenterLat,
405 DataArray2D< double >& dVertexLat,
406 DataArray2D< double >& dVertexLon,
407 std::vector< int >& masks,
418 #ifdef MOAB_HAVE_EIGEN3
420 WeightMatrix m_weightMatrix;
421 WeightRowVector m_rowVector;
422 WeightColVector m_colVector;
472 return row_gdofmap[localRowID];
477 return globalRowDoF + 1;
483 return col_gdofmap[localColID];
488 return globalColDoF + 1;
494 return m_nDofsPEl_Src;
501 return m_nDofsPEl_Dest;
512 m_nDofsPEl_Dest = nt;
516 #ifdef MOAB_HAVE_EIGEN3
520 return m_weightMatrix.cols();
527 return m_weightMatrix.rows();
534 return m_weightMatrix.cols();
541 return m_weightMatrix.rows();
546 inline moab::TempestOnlineMap::WeightMatrix& moab::TempestOnlineMap::GetWeightMatrix()
548 assert( m_weightMatrix.rows() != 0 && m_weightMatrix.cols() != 0 );
549 return m_weightMatrix;
554 inline moab::TempestOnlineMap::WeightRowVector& moab::TempestOnlineMap::GetRowVector()
556 assert( m_rowVector.size() != 0 );
562 inline moab::TempestOnlineMap::WeightColVector& moab::TempestOnlineMap::GetColVector()
564 assert( m_colVector.size() != 0 );