#include <InterpolationMatrix.hxx>

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 |
| MPIAccessDEC * | getAccessDEC () |
Private Member Functions | |
| 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 |
Private Attributes | |
| 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 |
| 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] |
| void ParaMEDMEM.InterpolationMatrix::addContribution | ( | MEDCouplingPointSet & | distant_support, |
| int | iproc_distant, | ||
| const int * | distant_elems, | ||
| const std::string & | srcMeth, | ||
| const std::string & | targetMeth | ||
| ) |
References ParaMEDMEM.InterpolationMatrix._source_support, ParaMEDMEM.RefCountObject.decrRef(), ParaMEDMEM.InterpolationMatrix.fillDSFromVM(), INTERP_KERNEL.Interpolation< TrueMainInterpolator >.fromIntegralUniform(), INTERP_KERNEL.InterpolationOptions.getMeasureAbsStatus(), ParaMEDMEM.MEDCouplingMesh.getMeasureField(), ParaMEDMEM.MEDCouplingUMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingMesh.getMeshDimension(), ParaMEDMEM.MEDCouplingPointSet.getSpaceDimension(), INTERP_KERNEL.Interpolation3D.interpolateMeshes(), INTERP_KERNEL.InterpolationPlanar< RealPlanar >.interpolateMeshes(), INTERP_KERNEL.InterpolationCurve< RealCurve >.interpolateMeshes(), ParaMEDMEM.InterpolationMatrix.isSurfaceComputationNeeded(), MEDCouplingNormalizedUnstructuredMesh< SPACEDIM, MESHDIM >.releaseTempArrays(), and INTERP_KERNEL.Interpolation< TrueMainInterpolator >.toIntegralUniform().
| void ParaMEDMEM.InterpolationMatrix::finishContributionW | ( | ElementLocator & | elementLocator | ) |
References ParaMEDMEM.InterpolationMatrix.computeConservVolDenoW(), ParaMEDMEM.InterpolationMatrix.computeGlobConstraintDenoW(), ParaMEDMEM.InterpolationMatrix.computeIntegralDenoW(), ParaMEDMEM.InterpolationMatrix.computeRevIntegralDenoW(), ParaMEDMEM.ConservativeVolumic, ParaMEDMEM.ElementLocator.getLocalNature(), ParaMEDMEM.Integral, ParaMEDMEM.IntegralGlobConstraint, ParaMEDMEM.ElementLocator.isM1DCorr(), and ParaMEDMEM.RevIntegral.
| void ParaMEDMEM.InterpolationMatrix::finishContributionL | ( | ElementLocator & | elementLocator | ) |
References ParaMEDMEM.InterpolationMatrix.computeConservVolDenoL(), ParaMEDMEM.InterpolationMatrix.computeIntegralDenoL(), ParaMEDMEM.InterpolationMatrix.computeRevIntegralDenoL(), ParaMEDMEM.ConservativeVolumic, ParaMEDMEM.ElementLocator.getLocalNature(), ParaMEDMEM.Integral, ParaMEDMEM.IntegralGlobConstraint, ParaMEDMEM.ElementLocator.isM1DCorr(), and ParaMEDMEM.RevIntegral.
| void ParaMEDMEM.InterpolationMatrix::multiply | ( | MEDCouplingFieldDouble & | field | ) | const |
References ParaMEDMEM.InterpolationMatrix._coeffs, ParaMEDMEM.InterpolationMatrix._col_offsets, ParaMEDMEM.InterpolationMatrix._deno_multiply, ParaMEDMEM.InterpolationMatrix._mapping, ParaMEDMEM.InterpolationMatrix._row_offsets, ParaMEDMEM.InterpolationMatrix._source_group, ParaMEDMEM.InterpolationMatrix._target_group, ParaMEDMEM.ProcessorGroup.containsMyRank(), ParaMEDMEM.MEDCouplingFieldDouble.getArray(), ParaMEDMEM.MEDCouplingFieldDouble.getIJ(), ParaMEDMEM.DataArray.getNumberOfComponents(), ParaMEDMEM.DataArray.getNumberOfTuples(), ParaMEDMEM.DataArrayDouble.getPointer(), ParaMEDMEM.MxN_Mapping.sendRecv(), and batchmode_medcorba_test.value.
| void ParaMEDMEM.InterpolationMatrix::transposeMultiply | ( | MEDCouplingFieldDouble & | field | ) | const |
References ParaMEDMEM.InterpolationMatrix._coeffs, ParaMEDMEM.InterpolationMatrix._col_offsets, ParaMEDMEM.InterpolationMatrix._deno_reverse_multiply, ParaMEDMEM.InterpolationMatrix._mapping, ParaMEDMEM.InterpolationMatrix._row_offsets, ParaMEDMEM.InterpolationMatrix._source_group, ParaMEDMEM.ProcessorGroup.containsMyRank(), MEDMEM.fill(), ParaMEDMEM.MEDCouplingFieldDouble.getArray(), ParaMEDMEM.DataArray.getNumberOfComponents(), ParaMEDMEM.DataArrayDouble.getPointer(), ParaMEDMEM.MxN_Mapping.reverseSendRecv(), and batchmode_medcorba_test.value.
| void ParaMEDMEM.InterpolationMatrix::prepare | ( | ) |
| int ParaMEDMEM.InterpolationMatrix.getNbRows | ( | ) | const |
References ParaMEDMEM.InterpolationMatrix._row_offsets.
| MPIAccessDEC* ParaMEDMEM.InterpolationMatrix.getAccessDEC | ( | ) |
| void ParaMEDMEM.InterpolationMatrix::computeConservVolDenoW | ( | ElementLocator & | elementLocator | ) | [private] |
| void ParaMEDMEM.InterpolationMatrix::computeIntegralDenoW | ( | ElementLocator & | elementLocator | ) | [private] |
References ParaMEDMEM.InterpolationMatrix._coeffs, ParaMEDMEM.InterpolationMatrix._deno_multiply, ParaMEDMEM.InterpolationMatrix._deno_reverse_multiply, ParaMEDMEM.InterpolationMatrix._source_support, ParaMEDMEM.InterpolationMatrix._target_volume, ParaMEDMEM.RefCountObject.decrRef(), MEDMEM.fill(), ParaMEDMEM.MEDCouplingFieldDouble.getArray(), ParaMEDMEM.DataArrayDouble.getConstPointer(), INTERP_KERNEL.InterpolationOptions.getMeasureAbsStatus(), ParaMEDMEM.MEDCouplingMesh.getMeasureField(), and medMeshing_test.values.
| void ParaMEDMEM.InterpolationMatrix::computeRevIntegralDenoW | ( | ElementLocator & | elementLocator | ) | [private] |
References ParaMEDMEM.InterpolationMatrix._coeffs, ParaMEDMEM.InterpolationMatrix._deno_multiply, ParaMEDMEM.InterpolationMatrix._deno_reverse_multiply, ParaMEDMEM.InterpolationMatrix._source_support, ParaMEDMEM.InterpolationMatrix._target_volume, ParaMEDMEM.RefCountObject.decrRef(), MEDMEM.fill(), ParaMEDMEM.MEDCouplingFieldDouble.getArray(), ParaMEDMEM.DataArrayDouble.getConstPointer(), INTERP_KERNEL.InterpolationOptions.getMeasureAbsStatus(), ParaMEDMEM.MEDCouplingMesh.getMeasureField(), and medMeshing_test.values.
| void ParaMEDMEM.InterpolationMatrix::computeGlobConstraintDenoW | ( | ElementLocator & | elementLocator | ) | [private] |
| void ParaMEDMEM.InterpolationMatrix::computeConservVolDenoL | ( | ElementLocator & | elementLocator | ) | [private] |
References ParaMEDMEM.ElementLocator.CUMULATIVE_POLICY, ParaMEDMEM.ElementLocator.NO_POST_TREATMENT_POLICY, ParaMEDMEM.ElementLocator.recvCandidatesForAddElementsL(), ParaMEDMEM.ElementLocator.recvFromWorkingSideL(), ParaMEDMEM.ElementLocator.recvLocalIdsFromWorkingSideL(), ParaMEDMEM.ElementLocator.sendAddElementsToWorkingSideL(), ParaMEDMEM.ElementLocator.sendCandidatesGlobalIdsToWorkingSideL(), ParaMEDMEM.ElementLocator.sendGlobalIdsToWorkingSideL(), ParaMEDMEM.ElementLocator.sendPolicyToWorkingSideL(), and ParaMEDMEM.ElementLocator.sendToWorkingSideL().
| void ParaMEDMEM.InterpolationMatrix::computeIntegralDenoL | ( | ElementLocator & | elementLocator | ) | [private] |
Nothing to do because surface computation is on working side.
| void ParaMEDMEM.InterpolationMatrix::computeRevIntegralDenoL | ( | ElementLocator & | elementLocator | ) | [private] |
Nothing to do because surface computation is on working side.
| void ParaMEDMEM.InterpolationMatrix.computeLocalColSum | ( | std::vector< double > & | res | ) | const [private] |
| void ParaMEDMEM.InterpolationMatrix::computeLocalRowSum | ( | const std::vector< int > & | distantProcs, |
| std::vector< std::vector< int > > & | resPerProcI, | ||
| std::vector< std::vector< double > > & | resPerProcD | ||
| ) | const [private] |
| 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 | ||
| ) | [private] |
References ParaMEDMEM.InterpolationMatrix.addGhostElements(), ParaMEDMEM.InterpolationMatrix.computeLocalRowSum(), ParaMEDMEM.ElementLocator.CUMULATIVE_POLICY, ParaMEDMEM.InterpolationMatrix.divideByGlobalRowSum(), ParaMEDMEM.InterpolationMatrix.findAdditionnalElements(), ParaMEDMEM.ElementLocator.getDistantProcIds(), ParaMEDMEM.InterpolationMatrix.mergeCoeffs(), ParaMEDMEM.InterpolationMatrix.mergePolicies(), ParaMEDMEM.InterpolationMatrix.mergeRowSum3(), ParaMEDMEM.ElementLocator.NO_POST_TREATMENT_POLICY, ParaMEDMEM.ElementLocator.recvCandidatesGlobalIdsFromLazyProcsW(), ParaMEDMEM.ElementLocator.recvGlobalIdsFromLazyProcsW(), ParaMEDMEM.ElementLocator.recvPolicyFromLazySideW(), ParaMEDMEM.ElementLocator.recvSumFromLazySideW(), ParaMEDMEM.ElementLocator.sendLocalIdsToLazyProcsW(), and ParaMEDMEM.ElementLocator.sendSumToLazySideW().
| void ParaMEDMEM.InterpolationMatrix::computeGlobalColSum | ( | std::vector< std::vector< double > > & | denoStrorage | ) | [private] |
References ParaMEDMEM.InterpolationMatrix._coeffs, and MEDMEM.fill().
| void ParaMEDMEM.InterpolationMatrix::resizeGlobalColSum | ( | std::vector< std::vector< double > > & | denoStrorage | ) | [private] |
References ParaMEDMEM.InterpolationMatrix._coeffs, and MEDMEM.fill().
| void ParaMEDMEM.InterpolationMatrix::fillDSFromVM | ( | int | iproc_distant, |
| const int * | distant_elems, | ||
| const std::vector< std::map< int, double > > & | values, | ||
| MEDCouplingFieldDouble * | surf | ||
| ) | [private] |
References ParaMEDMEM.InterpolationMatrix._coeffs, ParaMEDMEM.InterpolationMatrix._col_offsets, ParaMEDMEM.InterpolationMatrix._mapping, ParaMEDMEM.InterpolationMatrix._row_offsets, ParaMEDMEM.InterpolationMatrix._target_volume, ParaMEDMEM.MxN_Mapping.addElementFromSource(), med_test1.begin, ParaMEDMEM.MEDCouplingFieldDouble.getIJ(), and medMeshing_test.values.
| void ParaMEDMEM.InterpolationMatrix::initialize | ( | ) | [private] |
| 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 | ||
| ) | [private] |
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().
| int ParaMEDMEM.InterpolationMatrix::mergePolicies | ( | const std::vector< int > & | policyPartial | ) | [private] |
References medcorba_test.msg, and ParaMEDMEM.ElementLocator.NO_POST_TREATMENT_POLICY.
| 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 | ||
| ) | [private] |
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()
| 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 | ||
| ) | [private] |
This method simply reorganize the result contained in 'sumCorresponding' computed by lazy side into 'rowsPartialSumD' with help of 'globalIdsPartial' and 'globalIdsLazySideInteraction'
| 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 | ||
| ) | [private] |
| 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 | ||
| ) | [private] |
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.
| 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.
| bool ParaMEDMEM.InterpolationMatrix::isSurfaceComputationNeeded | ( | const std::string & | method | ) | const [private] |
const ParaMEDMEM::ParaFIELD* ParaMEDMEM.InterpolationMatrix._source_field [private] |
std::vector<int> ParaMEDMEM.InterpolationMatrix._row_offsets [private] |
std::map<std::pair<int,int>, int > ParaMEDMEM.InterpolationMatrix._col_offsets [private] |
const ProcessorGroup& ParaMEDMEM.InterpolationMatrix._source_group [private] |
const ProcessorGroup& ParaMEDMEM.InterpolationMatrix._target_group [private] |
std::vector< std::vector<double> > ParaMEDMEM.InterpolationMatrix._target_volume [private] |
std::vector<std::vector<std::pair<int,double> > > ParaMEDMEM.InterpolationMatrix._coeffs [private] |
std::vector<std::vector<double> > ParaMEDMEM.InterpolationMatrix._deno_multiply [private] |
std::vector<std::vector<double> > ParaMEDMEM.InterpolationMatrix._deno_reverse_multiply [private] |