This class couples data between meshes. More...
#include <DataCoupler.hpp>
Public Types | |
enum | Method { CONSTANT , LINEAR_FE , QUADRATIC_FE , SPECTRAL } |
enum | IntegType { VOLUME } |
Public Member Functions | |
DataCoupler (Interface *impl, Range &source_ents, int coupler_id, ParallelComm *pc=NULL, bool init_locator=true, int dim=-1) | |
virtual | ~DataCoupler () |
ErrorCode | locate_points (double *xyz, int num_points, const double rel_iter_tol=1.0e-10, const double abs_iter_tol=1.0e-10, const double inside_tol=1.0e-6) |
ErrorCode | locate_points (Range &ents, const double rel_iter_tol=1.0e-10, const double abs_iter_tol=1.0e-10, const double inside_tol=1.0e-6) |
ErrorCode | interpolate (int method, Tag tag, double *interp_vals=NULL, std::vector< int > *point_indices=NULL, bool normalize=true) |
ErrorCode | interpolate (int method, const std::string &tag_name, double *interp_vals=NULL, std::vector< int > *point_indices=NULL, bool normalize=true) |
ErrorCode | interpolate (int *methods, const std::string *tag_names, int *points_per_method, int num_methods, double *interp_vals=NULL, std::vector< int > *point_indices=NULL, bool normalize=true) |
ErrorCode | interpolate (int *methods, Tag *tag_names, int *points_per_method, int num_methods, double *interp_vals=NULL, std::vector< int > *point_indices=NULL, bool normalize=true) |
SpatialLocator * | spatial_locator () |
int | my_id () const |
const Range & | target_ents () const |
Range & | target_ents () |
int | get_dim () const |
Private Attributes | |
Interface * | mbImpl |
ParallelComm * | myPcomm |
SpatialLocator * | myLocator |
int | myId |
Range | targetEnts |
int | myDim |
This class couples data between meshes.
The coupler interpolates solution data at a set of points. Data being interpolated resides on a "source" mesh, in a tag or in vertex coords. Applications calling this coupler send in entities, and receive back data interpolated at those points. Entities in the source mesh containing those points do not have to reside on the same processor.
To use, an application should:
Multiple interpolations (of multiple tags, or element-average vs. true interpolation) can be done after locating the points.
SpatialLocator is used for the spatial location portion of this work.
This class is a next-generation implementation of Coupler.
Definition at line 39 of file DataCoupler.hpp.
Enumerator | |
---|---|
CONSTANT | |
LINEAR_FE | |
QUADRATIC_FE | |
SPECTRAL |
Definition at line 42 of file DataCoupler.hpp.
moab::DataCoupler::DataCoupler | ( | Interface * | impl, |
Range & | source_ents, | ||
int | coupler_id, | ||
ParallelComm * | pc = NULL , |
||
bool | init_locator = true , |
||
int | dim = -1 |
||
) |
Definition at line 22 of file DataCoupler.cpp.
References dim, moab::Interface::dimension_from_handle(), moab::SpatialLocator::elem_eval(), moab::Range::empty(), ErrorCode, MB_SUCCESS, mbImpl, MBMAXTYPE, myDim, myLocator, myPcomm, moab::Range::pair_begin(), moab::Range::pair_end(), moab::Range::rbegin(), moab::ElemEvaluator::set_eval_set(), and moab::Interface::type_from_handle().
|
virtual |
Definition at line 60 of file DataCoupler.cpp.
References moab::SpatialLocator::elem_eval(), and myLocator.
|
inline |
ErrorCode moab::DataCoupler::interpolate | ( | int * | methods, |
const std::string * | tag_names, | ||
int * | points_per_method, | ||
int | num_methods, | ||
double * | interp_vals = NULL , |
||
std::vector< int > * | point_indices = NULL , |
||
bool | normalize = true |
||
) |
ErrorCode moab::DataCoupler::interpolate | ( | int * | methods, |
Tag * | tag_names, | ||
int * | points_per_method, | ||
int | num_methods, | ||
double * | interp_vals = NULL , |
||
std::vector< int > * | point_indices = NULL , |
||
bool | normalize = true |
||
) |
Method/ int method = methods[TLob.vi_rd[4*i + 3]];
Definition at line 109 of file DataCoupler.cpp.
References moab::ProcConfig::crystal_router(), moab::SpatialLocator::elem_eval(), moab::TupleList::enableWriteAccess(), ErrorCode, moab::ElemEvaluator::eval(), moab::TupleList::get_n(), moab::TupleList::inc_n(), moab::TupleList::initialize(), moab::SpatialLocator::loc_table(), MB_SUCCESS, mbImpl, myLocator, myPcomm, moab::SpatialLocator::par_loc_table(), moab::ParallelComm::proc_config(), moab::ElemEvaluator::set_ent_handle(), moab::TupleList::set_n(), moab::ElemEvaluator::set_tag_handle(), moab::Range::size(), moab::ParallelComm::size(), moab::Interface::tag_get_bytes(), moab::Interface::tag_get_length(), moab::Interface::tag_set_data(), targetEnts, moab::TupleList::vi_rd, moab::TupleList::vi_wr, moab::TupleList::vr_rd, and moab::TupleList::vul_rd.
ErrorCode moab::DataCoupler::interpolate | ( | int | method, |
const std::string & | tag_name, | ||
double * | interp_vals = NULL , |
||
std::vector< int > * | point_indices = NULL , |
||
bool | normalize = true |
||
) |
Definition at line 95 of file DataCoupler.cpp.
References ErrorCode, interpolate(), MB_CHK_SET_ERR, mbImpl, normalize(), and moab::Interface::tag_get_handle().
|
inline |
Definition at line 266 of file DataCoupler.hpp.
References normalize(), moab::Range::size(), and targetEnts.
Referenced by DeformMeshRemap::execute(), and interpolate().
ErrorCode moab::DataCoupler::locate_points | ( | double * | xyz, |
int | num_points, | ||
const double | rel_iter_tol = 1.0e-10 , |
||
const double | abs_iter_tol = 1.0e-10 , |
||
const double | inside_tol = 1.0e-6 |
||
) |
Definition at line 81 of file DataCoupler.cpp.
References moab::SpatialLocator::locate_points(), myLocator, myPcomm, and moab::ParallelComm::size().
Referenced by DeformMeshRemap::execute().
ErrorCode moab::DataCoupler::locate_points | ( | Range & | ents, |
const double | rel_iter_tol = 1.0e-10 , |
||
const double | abs_iter_tol = 1.0e-10 , |
||
const double | inside_tol = 1.0e-6 |
||
) |
Definition at line 66 of file DataCoupler.cpp.
References moab::SpatialLocator::locate_points(), myLocator, myPcomm, moab::ParallelComm::size(), and targetEnts.
|
inline |
|
inline |
Definition at line 220 of file DataCoupler.hpp.
References myLocator.
Referenced by DeformMeshRemap::execute().
|
inline |
Definition at line 232 of file DataCoupler.hpp.
References targetEnts.
|
inline |
Definition at line 228 of file DataCoupler.hpp.
References targetEnts.
|
private |
Definition at line 244 of file DataCoupler.hpp.
Referenced by DataCoupler(), and interpolate().
|
private |
Definition at line 263 of file DataCoupler.hpp.
Referenced by DataCoupler(), and get_dim().
|
private |
Definition at line 256 of file DataCoupler.hpp.
Referenced by my_id().
|
private |
Definition at line 252 of file DataCoupler.hpp.
Referenced by DataCoupler(), interpolate(), locate_points(), spatial_locator(), and ~DataCoupler().
|
private |
Definition at line 248 of file DataCoupler.hpp.
Referenced by DataCoupler(), interpolate(), and locate_points().
|
private |
Definition at line 260 of file DataCoupler.hpp.
Referenced by interpolate(), locate_points(), and target_ents().