Version: 5.1.6

ParaMEDMEM.InterpolationMatrix Class Reference

#include <InterpolationMatrix.hxx>

Inheritance diagram for ParaMEDMEM.InterpolationMatrix:
Inheritance graph

Public Member Functions

 InterpolationMatrix (const ParaMEDMEM::ParaFIELD *source_field, const ProcessorGroup &source_group, const ProcessorGroup &target_group, const DECOptions &dec_opt, const InterpolationOptions &i_opt)
virtual ~InterpolationMatrix ()
void addContribution (MEDCouplingPointSet &distant_support, int iproc_distant, const int *distant_elems, const std::string &srcMeth, const std::string &targetMeth)
void finishContributionW (ElementLocator &elementLocator)
void finishContributionL (ElementLocator &elementLocator)
void multiply (MEDCouplingFieldDouble &field) const
void transposeMultiply (MEDCouplingFieldDouble &field) const
void prepare ()
int getNbRows () const
MPIAccessDECgetAccessDEC ()
void computeConservVolDenoW (ElementLocator &elementLocator)
void computeIntegralDenoW (ElementLocator &elementLocator)
void computeRevIntegralDenoW (ElementLocator &elementLocator)
void computeGlobConstraintDenoW (ElementLocator &elementLocator)
void computeConservVolDenoL (ElementLocator &elementLocator)
void computeIntegralDenoL (ElementLocator &elementLocator)
void computeRevIntegralDenoL (ElementLocator &elementLocator)
void computeLocalColSum (std::vector< double > &res) const
void computeLocalRowSum (const std::vector< int > &distantProcs, std::vector< std::vector< int > > &resPerProcI, std::vector< std::vector< double > > &resPerProcD) const
void computeGlobalRowSum (ElementLocator &elementLocator, std::vector< std::vector< double > > &denoStrorage, std::vector< std::vector< double > > &denoStrorageInv)
void computeGlobalColSum (std::vector< std::vector< double > > &denoStrorage)
void resizeGlobalColSum (std::vector< std::vector< double > > &denoStrorage)
void fillDSFromVM (int iproc_distant, const int *distant_elems, const std::vector< std::map< int, double > > &values, MEDCouplingFieldDouble *surf)
void serializeMe (std::vector< std::vector< std::map< int, double > > > &data1, std::vector< int > &data2) const
void initialize ()
void findAdditionnalElements (ElementLocator &elementLocator, std::vector< std::vector< int > > &elementsToAdd, const std::vector< std::vector< int > > &resPerProcI, const std::vector< std::vector< int > > &globalIdsPartial)
void addGhostElements (const std::vector< int > &distantProcs, const std::vector< std::vector< int > > &elementsToAdd)
int mergePolicies (const std::vector< int > &policyPartial)
void mergeRowSum (const std::vector< std::vector< double > > &rowsPartialSumD, const std::vector< std::vector< int > > &globalIdsPartial, std::vector< int > &globalIdsLazySideInteraction, std::vector< double > &sumCorresponding)
void mergeRowSum2 (const std::vector< std::vector< int > > &globalIdsPartial, std::vector< std::vector< double > > &rowsPartialSumD, const std::vector< int > &globalIdsLazySideInteraction, const std::vector< double > &sumCorresponding)
void mergeRowSum3 (const std::vector< std::vector< int > > &globalIdsPartial, std::vector< std::vector< double > > &rowsPartialSumD)
void mergeCoeffs (const std::vector< int > &procsInInteraction, const std::vector< std::vector< int > > &rowsPartialSumI, const std::vector< std::vector< int > > &globalIdsPartial, std::vector< std::vector< double > > &denoStrorageInv)
void divideByGlobalRowSum (const std::vector< int > &distantProcs, const std::vector< std::vector< int > > &resPerProcI, const std::vector< std::vector< double > > &resPerProcD, std::vector< std::vector< double > > &deno)
bool isSurfaceComputationNeeded (const std::string &method) const

Data Fields

const ParaMEDMEM::ParaFIELD_source_field
std::vector< int_row_offsets
std::map< std::pair< int, int >
, int
_col_offsets
MEDCouplingPointSet_source_support
MxN_Mapping _mapping
const ProcessorGroup_source_group
const ProcessorGroup_target_group
std::vector< std::vector
< double > > 
_target_volume
std::vector< std::vector
< std::pair< int, double > > > 
_coeffs
std::vector< std::vector
< double > > 
_deno_multiply
std::vector< std::vector
< double > > 
_deno_reverse_multiply

Constructor & Destructor Documentation

ParaMEDMEM.InterpolationMatrix.InterpolationMatrix ( const ParaMEDMEM::ParaFIELD source_field,
const ProcessorGroup source_group,
const ProcessorGroup target_group,
const DECOptions dec_opt,
const InterpolationOptions &  i_opt 
)
ParaMEDMEM.InterpolationMatrix::~InterpolationMatrix (  )  [virtual]

Member Function Documentation

void ParaMEDMEM.InterpolationMatrix::addContribution ( MEDCouplingPointSet distant_support,
int  iproc_distant,
const int distant_elems,
const std::string &  srcMeth,
const std::string &  targetMeth 
)
void ParaMEDMEM.InterpolationMatrix::finishContributionW ( ElementLocator elementLocator  ) 
void ParaMEDMEM.InterpolationMatrix::finishContributionL ( ElementLocator elementLocator  ) 
void ParaMEDMEM.InterpolationMatrix::multiply ( MEDCouplingFieldDouble field  )  const
void ParaMEDMEM.InterpolationMatrix::transposeMultiply ( MEDCouplingFieldDouble field  )  const
void ParaMEDMEM.InterpolationMatrix::prepare (  ) 
int ParaMEDMEM.InterpolationMatrix.getNbRows (  )  const
MPIAccessDEC* ParaMEDMEM.InterpolationMatrix.getAccessDEC (  ) 
void ParaMEDMEM.InterpolationMatrix::computeConservVolDenoW ( ElementLocator elementLocator  ) 
void ParaMEDMEM.InterpolationMatrix::computeIntegralDenoW ( ElementLocator elementLocator  ) 
void ParaMEDMEM.InterpolationMatrix::computeRevIntegralDenoW ( ElementLocator elementLocator  ) 
void ParaMEDMEM.InterpolationMatrix::computeGlobConstraintDenoW ( ElementLocator elementLocator  ) 
void ParaMEDMEM.InterpolationMatrix::computeConservVolDenoL ( ElementLocator elementLocator  ) 
void ParaMEDMEM.InterpolationMatrix::computeIntegralDenoL ( ElementLocator elementLocator  ) 

Nothing to do because surface computation is on working side.

void ParaMEDMEM.InterpolationMatrix::computeRevIntegralDenoL ( ElementLocator elementLocator  ) 

Nothing to do because surface computation is on working side.

void ParaMEDMEM.InterpolationMatrix.computeLocalColSum ( std::vector< double > &  res  )  const
void ParaMEDMEM.InterpolationMatrix::computeLocalRowSum ( const std::vector< int > &  distantProcs,
std::vector< std::vector< int > > &  resPerProcI,
std::vector< std::vector< double > > &  resPerProcD 
) const
Parameters:
distantProcs in parameter that indicates which lazy procs are concerned.
resPerProcI out parameter that must be cleared before calling this method. The size of 1st dimension is equal to the size of 'distantProcs'. It contains the element ids (2nd dimension) of the corresponding lazy proc.
resPerProcD out parameter with the same format than 'resPerProcI'. It contains corresponding sum values.

References ParaMEDMEM.InterpolationMatrix._coeffs, ParaMEDMEM.InterpolationMatrix._col_offsets, ParaMEDMEM.InterpolationMatrix._mapping, ParaMEDMEM.MxN_Mapping.getSendingIds(), and testRenumbering.id.

void ParaMEDMEM.InterpolationMatrix::computeGlobalRowSum ( ElementLocator elementLocator,
std::vector< std::vector< double > > &  denoStrorage,
std::vector< std::vector< double > > &  denoStrorageInv 
)
void ParaMEDMEM.InterpolationMatrix::computeGlobalColSum ( std::vector< std::vector< double > > &  denoStrorage  ) 
void ParaMEDMEM.InterpolationMatrix::resizeGlobalColSum ( std::vector< std::vector< double > > &  denoStrorage  ) 
void ParaMEDMEM.InterpolationMatrix::fillDSFromVM ( int  iproc_distant,
const int distant_elems,
const std::vector< std::map< int, double > > &  values,
MEDCouplingFieldDouble surf 
)
void ParaMEDMEM.InterpolationMatrix::serializeMe ( std::vector< std::vector< std::map< int, double > > > &  data1,
std::vector< int > &  data2 
) const
void ParaMEDMEM.InterpolationMatrix::initialize (  ) 
void ParaMEDMEM.InterpolationMatrix::findAdditionnalElements ( ElementLocator elementLocator,
std::vector< std::vector< int > > &  elementsToAdd,
const std::vector< std::vector< int > > &  resPerProcI,
const std::vector< std::vector< int > > &  globalIdsPartial 
)

This method is only usable when CUMULATIVE_POLICY detected. This method finds elements ids (typically nodes) lazy side that are not present in columns of 'this' and that should regarding cumulative merge of elements regarding their global ids.

References ParaMEDMEM.ElementLocator.recvAddElementsFromLazyProcsW(), and ParaMEDMEM.ElementLocator.sendCandidatesForAddElementsW().

void ParaMEDMEM.InterpolationMatrix::addGhostElements ( const std::vector< int > &  distantProcs,
const std::vector< std::vector< int > > &  elementsToAdd 
)
int ParaMEDMEM.InterpolationMatrix::mergePolicies ( const std::vector< int > &  policyPartial  ) 
void ParaMEDMEM.InterpolationMatrix::mergeRowSum ( const std::vector< std::vector< double > > &  rowsPartialSumD,
const std::vector< std::vector< int > > &  globalIdsPartial,
std::vector< int > &  globalIdsLazySideInteraction,
std::vector< double > &  sumCorresponding 
)

This method introduce global ids aspects in computed 'rowsPartialSumD'. As precondition rowsPartialSumD.size()==policyPartial.size()==globalIdsPartial.size(). Foreach i in [0;rowsPartialSumD.size() ) rowsPartialSumD[i].size()==globalIdsPartial[i].size()

Parameters:
rowsPartialSumD : in parameter, Partial row sum computed for each lazy procs connected with.
rowsPartialSumI : in parameter, Corresponding local ids for each lazy procs connected with.
globalIdsPartial : in parameter, the global numbering, of elements connected with.
globalIdsLazySideInteraction : out parameter, constituted from all global ids of lazy procs connected with. sumCorresponding : out parameter, relative to 'globalIdsLazySideInteraction'
void ParaMEDMEM.InterpolationMatrix::mergeRowSum2 ( const std::vector< std::vector< int > > &  globalIdsPartial,
std::vector< std::vector< double > > &  rowsPartialSumD,
const std::vector< int > &  globalIdsLazySideInteraction,
const std::vector< double > &  sumCorresponding 
)

This method simply reorganize the result contained in 'sumCorresponding' computed by lazy side into 'rowsPartialSumD' with help of 'globalIdsPartial' and 'globalIdsLazySideInteraction'

Parameters:
globalIdsPartial : in parameter, global ids sorted by lazy procs
rowsPartialSumD : in/out parameter, with exactly the same size as 'globalIdsPartial'
globalIdsLazySideInteraction : in parameter that represents ALL the global ids of every lazy procs in interaction
sumCorresponding : in parameter with same size as 'globalIdsLazySideInteraction' that stores the corresponding sum of 'globalIdsLazySideInteraction'
void ParaMEDMEM.InterpolationMatrix::mergeRowSum3 ( const std::vector< std::vector< int > > &  globalIdsPartial,
std::vector< std::vector< double > > &  rowsPartialSumD 
)
void ParaMEDMEM.InterpolationMatrix::mergeCoeffs ( const std::vector< int > &  procsInInteraction,
const std::vector< std::vector< int > > &  rowsPartialSumI,
const std::vector< std::vector< int > > &  globalIdsPartial,
std::vector< std::vector< double > > &  denoStrorageInv 
)

This method updates this->_coeffs attribute in order to take into account hidden (because having the same global number) similar nodes in _coeffs array. If in this->_coeffs two distant element id have the same global id their values will be replaced for each by the sum of the two.

Parameters:
procsInInteraction input parameter : specifies the procId in absolute of distant lazy procs in interaction with
rowsPartialSumI input parameter : local ids of distant lazy procs elements in interaction with
globalIdsPartial input parameter : global ids of distant lazy procs elements in interaction with

References ParaMEDMEM.InterpolationMatrix._coeffs, ParaMEDMEM.InterpolationMatrix._mapping, ParaMEDMEM.MxN_Mapping.getSendingIds(), and test_NonCoincidentDEC.size.

void ParaMEDMEM.InterpolationMatrix::divideByGlobalRowSum ( const std::vector< int > &  distantProcs,
const std::vector< std::vector< int > > &  resPerProcI,
const std::vector< std::vector< double > > &  resPerProcD,
std::vector< std::vector< double > > &  deno 
)
bool ParaMEDMEM.InterpolationMatrix::isSurfaceComputationNeeded ( const std::string &  method  )  const

Field Documentation

std::vector<std::vector<std::pair<int,double> > > ParaMEDMEM.InterpolationMatrix._coeffs