Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEDCoupling::InterpolationMatrix Class Reference
Inheritance diagram for MEDCoupling::InterpolationMatrix:
Collaboration diagram for MEDCoupling::InterpolationMatrix:

Public Member Functions

void addContribution (MEDCouplingPointSet &distant_support, int iproc_distant, const int *distant_elems, const std::string &srcMeth, const std::string &targetMeth)
 
void finishContributionL (ElementLocator &elementLocator)
 
void finishContributionW (ElementLocator &elementLocator)
 
MPIAccessDEC * getAccessDEC ()
 
int getNbRows () const
 
 InterpolationMatrix (const MEDCoupling::ParaFIELD *source_field, const ProcessorGroup &source_group, const ProcessorGroup &target_group, const DECOptions &dec_opt, const InterpolationOptions &i_opt)
 
void multiply (MEDCouplingFieldDouble &field) const
 
void prepare ()
 
void transposeMultiply (MEDCouplingFieldDouble &field) const
 
virtual ~InterpolationMatrix ()
 
- Public Member Functions inherited from INTERP_KERNEL::InterpolationOptions
void copyOptions (const InterpolationOptions &other)
 
std::string filterInterpolationMethod (const std::string &meth) const
 
double getArcDetectionPrecision () const
 
double getBoundingBoxAdjustment () const
 
double getBoundingBoxAdjustmentAbs () const
 
bool getDoRotate () const
 
IntersectionType getIntersectionType () const
 
std::string getIntersectionTypeRepr () const
 
double getMaxDistance3DSurfIntersect () const
 
bool getMeasureAbsStatus () const
 
double getMedianPlane () const
 
double getMinDotBtwPlane3DSurfIntersect () const
 
int getOrientation () const
 
double getPrecision () const
 
int getPrintLevel () const
 
SplittingPolicy getSplittingPolicy () const
 
std::string getSplittingPolicyRepr () const
 
void init ()
 
 InterpolationOptions ()
 
std::string printOptions () const
 
void setArcDetectionPrecision (double p)
 
void setBoundingBoxAdjustment (double bba)
 
void setBoundingBoxAdjustmentAbs (double bba)
 
void setDoRotate (bool dr)
 
bool setInterpolationOptions (long print_level, std::string intersection_type, double precision, double median_plane, bool do_rotate, double bounding_box_adjustment, double bounding_box_adjustment_abs, double max_distance_for_3Dsurf_intersect, long orientation, bool measure_abs, std::string splitting_policy)
 
void setIntersectionType (IntersectionType it)
 
void setMaxDistance3DSurfIntersect (double bba)
 
void setMeasureAbsStatus (bool newStatus)
 
void setMedianPlane (double mp)
 
void setMinDotBtwPlane3DSurfIntersect (double v)
 
bool setOptionDouble (const std::string &key, double value)
 
bool setOptionInt (const std::string &key, int value)
 
bool setOptionString (const std::string &key, const std::string &value)
 
void setOrientation (int o)
 
void setPrecision (double p)
 
void setPrintLevel (int pl)
 
void setSplittingPolicy (SplittingPolicy sp)
 
- Public Member Functions inherited from MEDCoupling::DECOptions
 DECOptions ()
 
 DECOptions (const DECOptions &deco)
 
AllToAllMethod getAllToAllMethod () const
 
bool getAsynchronous () const
 
bool getForcedRenormalization () const
 
const std::string & getMethod () const
 
TimeInterpolationMethod getTimeInterpolationMethod () const
 
void setAllToAllMethod (AllToAllMethod sp)
 
void setAsynchronous (bool dr)
 
void setForcedRenormalization (bool dr)
 
void setMethod (const char *m)
 
void setTimeInterpolationMethod (TimeInterpolationMethod it)
 

Additional Inherited Members

- Static Public Member Functions inherited from INTERP_KERNEL::InterpolationOptions
static void CheckAndSplitInterpolationMethod (const std::string &method, std::string &srcMeth, std::string &trgMeth)
 
- Static Public Attributes inherited from INTERP_KERNEL::InterpolationOptions
static const char ARC_DETECTION_PRECISION_STR [] ="ArcDetectionPrecision"
 
static const char BARYCENTRIC_INTERSECT_STR [] ="Barycentric"
 
static const char BARYCENTRICGEO2D_INTERSECT_STR [] ="BarycentricGeo2D"
 
static const char BOUNDING_BOX_ADJ_ABS_STR [] ="BoundingBoxAdjustmentAbs"
 
static const char BOUNDING_BOX_ADJ_STR [] ="BoundingBoxAdjustment"
 
static const char CONVEX_INTERSECT2D_STR [] ="Convex"
 
static const char DO_ROTATE_STR [] ="DoRotate"
 
static const char GENERAL_SPLIT_24_STR [] ="GENERAL_24"
 
static const char GENERAL_SPLIT_48_STR [] ="GENERAL_48"
 
static const char GEOMETRIC_INTERSECT2D_STR [] ="Geometric2D"
 
static const char INTERSEC_TYPE_STR [] ="IntersectionType"
 
static const char MAX_DISTANCE_3DSURF_INSECT_STR [] ="MaxDistance3DSurfIntersect"
 
static const char MEASURE_ABS_STR [] ="MeasureAbs"
 
static const char MEDIANE_PLANE_STR [] ="MedianPlane"
 
static const char MIN_DOT_BTW_3DSURF_INSECT_STR [] ="MinDotBetween3DSurfIntersect"
 
static const char ORIENTATION_STR [] ="Orientation"
 
static const char PLANAR_SPLIT_FACE_5_STR [] ="PLANAR_FACE_5"
 
static const char PLANAR_SPLIT_FACE_6_STR [] ="PLANAR_FACE_6"
 
static const char POINTLOCATOR_INTERSECT_STR [] ="PointLocator"
 
static const char PRECISION_STR [] ="Precision"
 
static const char PRINT_LEV_STR [] ="PrintLevel"
 
static const char SPLITTING_POLICY_STR [] ="SplittingPolicy"
 
static const char TRIANGULATION_INTERSECT2D_STR [] ="Triangulation"
 
- Protected Attributes inherited from MEDCoupling::DECOptions
AllToAllMethod _allToAllMethod
 
bool _asynchronous
 
bool _forcedRenormalization
 
std::string _method
 
TimeInterpolationMethod _timeInterpolationMethod
 

Detailed Description

Internal class, not part of the public API.

This class enables the storage of an interpolation matrix Wij mapping a source field Sj to a target field Ti via Ti=Vi^(-1).Wij.Sj. The matrix is built and stored on the processors belonging to the source group.

Constructor & Destructor Documentation

MEDCoupling::InterpolationMatrix::InterpolationMatrix ( const MEDCoupling::ParaFIELD source_field,
const ProcessorGroup source_group,
const ProcessorGroup target_group,
const DECOptions dec_opt,
const InterpolationOptions i_opt 
)

! Creates an empty matrix structure linking two distributed supports. The method must be called by all processors belonging to source and target groups.

Parameters
source_supportlocal support
source_groupprocessor group containing the local processors
target_groupprocessor group containing the distant processors
methodinterpolation method

References MEDCoupling::ParaFIELD::getField(), and MEDCoupling::MEDCouplingFieldDouble::getNumberOfTuples().

MEDCoupling::InterpolationMatrix::~InterpolationMatrix ( )
virtual

Member Function Documentation

void MEDCoupling::InterpolationMatrix::addContribution ( MEDCouplingPointSet distant_support,
int  iproc_distant,
const int *  distant_elems,
const std::string &  srcMeth,
const std::string &  targetMeth 
)

Adds the contribution of a distant subdomain to the* interpolation matrix. The method adds contribution to the interpolation matrix. For each row of the matrix, elements are addded as a (column, coeff) pair in the _coeffs array. This column number refers to an element on the target side via the _col_offsets array. It is made of a series of (iproc, ielem) pairs. The number of elements per row is stored in the row_offsets array.

param distant_support local representation of the distant subdomain param iproc_distant id of the distant subdomain (in the distant group) param distant_elems mapping between the local representation of the subdomain and the actual elem ids on the distant subdomain

References MEDCoupling::RefCountObjectOnly::decrRef(), INTERP_KERNEL::Interpolation< TrueMainInterpolator >::fromIntegralUniform(), INTERP_KERNEL::InterpolationOptions::getMeasureAbsStatus(), MEDCoupling::MEDCouplingMesh::getMeasureField(), MEDCoupling::MEDCouplingUMesh::getMeshDimension(), MEDCoupling::MEDCouplingMesh::getMeshDimension(), MEDCoupling::MEDCouplingPointSet::getSpaceDimension(), INTERP_KERNEL::Interpolation3D::interpolateMeshes(), and INTERP_KERNEL::Interpolation< TrueMainInterpolator >::toIntegralUniform().

Referenced by MEDCoupling::InterpKernelDEC::synchronize().

void MEDCoupling::InterpolationMatrix::finishContributionW ( ElementLocator &  elementLocator)
void MEDCoupling::InterpolationMatrix::finishContributionL ( ElementLocator &  elementLocator)
void MEDCoupling::InterpolationMatrix::multiply ( MEDCouplingFieldDouble field) const

performs t=Ws, where t is the target field, s is the source field

The call to this method must be called both on the working side and on the idle side. On the working side, the vector T=VT^(-1).(W.S) is computed and sent. On the idle side, no computation is done, but the result from the working side is received and the field is updated.

Parameters
fieldsource field on processors involved on the source side, target field on processors on the target side

References MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::MEDCouplingFieldT< T >::getArray(), and MEDCoupling::MEDCouplingFieldT< T >::getIJ().

Referenced by MEDCoupling::InterpKernelDEC::recvData(), and MEDCoupling::InterpKernelDEC::sendData().

void MEDCoupling::InterpolationMatrix::transposeMultiply ( MEDCouplingFieldDouble field) const

performs s=WTt, where t is the target field, s is the source field, WT is the transpose matrix from W

! The call to this method must be called both on the working side and on the idle side. On the working side, the target vector T is received and the vector S=VS^(-1).(WT.T) is computed to update the field. On the idle side, no computation is done, but the field is sent.

param field source field on processors involved on the source side, target field on processors on the target side

References MEDCoupling::ProcessorGroup::containsMyRank(), and MEDCoupling::MEDCouplingFieldT< T >::getArray().

Referenced by MEDCoupling::InterpKernelDEC::recvData(), and MEDCoupling::InterpKernelDEC::sendData().

void MEDCoupling::InterpolationMatrix::prepare ( )

! The call to this method updates the arrays on the target side so that they know which amount of data from which processor they should expect. That call makes actual interpolations via multiply method available.

References MEDCoupling::ParaFIELD::getField(), and MEDCoupling::MEDCouplingFieldDouble::getNumberOfTuples().

Referenced by MEDCoupling::InterpKernelDEC::synchronize().

int MEDCoupling::InterpolationMatrix::getNbRows ( ) const
MPIAccessDEC* MEDCoupling::InterpolationMatrix::getAccessDEC ( )