Back to index

salome-med  6.5.0
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes
ParaMEDMEM::InterpolationMatrix Class Reference

#include <InterpolationMatrix.hxx>

Inheritance diagram for ParaMEDMEM::InterpolationMatrix:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::InterpolationMatrix:
Collaboration graph
[legend]

List of all members.

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 ()
const std::string & getMethod () const
def getMethod
void setMethod (const char *m)
def setMethod
TimeInterpolationMethod getTimeInterpolationMethod () const
def getTimeInterpolationMethod
void setTimeInterpolationMethod (TimeInterpolationMethod it)
def setTimeInterpolationMethod
bool getForcedRenormalization () const
def getForcedRenormalization
void setForcedRenormalization (bool dr)
def setForcedRenormalization
bool getAsynchronous () const
def getAsynchronous
void setAsynchronous (bool dr)
def setAsynchronous
AllToAllMethod getAllToAllMethod () const
def getAllToAllMethod
void setAllToAllMethod (AllToAllMethod sp)
def setAllToAllMethod

Public Attributes

 this

Protected Attributes

std::string _method
bool _asynchronous
TimeInterpolationMethod _timeInterpolationMethod
AllToAllMethod _allToAllMethod
bool _forcedRenormalization

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)
 Nothing to do because surface computation is on working side.
void computeRevIntegralDenoL (ElementLocator &elementLocator)
 Nothing to do because surface computation is on working side.
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)
 This method is only usable when CUMULATIVE_POLICY detected.
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)
 This method introduce global ids aspects in computed 'rowsPartialSumD'.
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)
 This method simply reorganize the result contained in 'sumCorresponding' computed by lazy side into 'rowsPartialSumD' with help of 'globalIdsPartial' and 'globalIdsLazySideInteraction'.
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)
 This method updates this->_coeffs attribute in order to take into account hidden (because having the same global number) similar nodes in _coeffs array.
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

Detailed Description

Definition at line 32 of file InterpolationMatrix.hxx.


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 
)

Definition at line 63 of file InterpolationMatrix.cxx.

                                                                                                   :
    INTERP_KERNEL::InterpolationOptions(interp_options),
    DECOptions(dec_options),
    _source_field(source_field),
    _source_support(source_field->getSupport()->getCellMesh()),
    _mapping(source_group, target_group, dec_options),
    _source_group(source_group),
    _target_group(target_group)
  {
    int nbelems = source_field->getField()->getNumberOfTuples();
    _row_offsets.resize(nbelems+1);
    _coeffs.resize(nbelems);
    _target_volume.resize(nbelems);
  }

Here is the call graph for this function:

Definition at line 82 of file InterpolationMatrix.cxx.

  {
  }

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 
)

Definition at line 103 of file InterpolationMatrix.cxx.

  {
    std::string interpMethod(targetMeth);
    interpMethod+=srcMeth;
    //creating the interpolator structure
    vector<map<int,double> > surfaces;
    int colSize=0;
    //computation of the intersection volumes between source and target elements
    MEDCouplingUMesh *distant_supportC=dynamic_cast<MEDCouplingUMesh *>(&distant_support);
    MEDCouplingUMesh *source_supportC=dynamic_cast<MEDCouplingUMesh *>(_source_support);
    if ( distant_support.getMeshDimension() == -1 )
      {
        if(source_supportC->getMeshDimension()==2 && source_supportC->getSpaceDimension()==2)
          {
            MEDCouplingNormalizedUnstructuredMesh<2,2> source_mesh_wrapper(source_supportC);
            INTERP_KERNEL::Interpolation2D interpolation(*this);
            colSize=interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth.c_str());
          }
        else if(source_supportC->getMeshDimension()==3 && source_supportC->getSpaceDimension()==3)
          {
            MEDCouplingNormalizedUnstructuredMesh<3,3> source_mesh_wrapper(source_supportC);
            INTERP_KERNEL::Interpolation3D interpolation(*this);
            colSize=interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth.c_str());
          }
        else if(source_supportC->getMeshDimension()==2 && source_supportC->getSpaceDimension()==3)
          {
            MEDCouplingNormalizedUnstructuredMesh<3,2> source_mesh_wrapper(source_supportC);
            INTERP_KERNEL::Interpolation3DSurf interpolation(*this);
            colSize=interpolation.fromIntegralUniform(source_mesh_wrapper,surfaces,srcMeth.c_str());
          }
        else
          throw INTERP_KERNEL::Exception("No para interpolation available for the given mesh and space dimension of source mesh to -1D targetMesh");
      }
    else if ( source_supportC->getMeshDimension() == -1 )
      {
        if(distant_supportC->getMeshDimension()==2 && distant_supportC->getSpaceDimension()==2)
          {
            MEDCouplingNormalizedUnstructuredMesh<2,2> distant_mesh_wrapper(distant_supportC);
            INTERP_KERNEL::Interpolation2D interpolation(*this);
            colSize=interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth.c_str());
          }
        else if(distant_supportC->getMeshDimension()==3 && distant_supportC->getSpaceDimension()==3)
          {
            MEDCouplingNormalizedUnstructuredMesh<3,3> distant_mesh_wrapper(distant_supportC);
            INTERP_KERNEL::Interpolation3D interpolation(*this);
            colSize=interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth.c_str());
          }
        else if(distant_supportC->getMeshDimension()==2 && distant_supportC->getSpaceDimension()==3)
          {
            MEDCouplingNormalizedUnstructuredMesh<3,2> distant_mesh_wrapper(distant_supportC);
            INTERP_KERNEL::Interpolation3DSurf interpolation(*this);
            colSize=interpolation.toIntegralUniform(distant_mesh_wrapper,surfaces,srcMeth.c_str());
          }
        else
          throw INTERP_KERNEL::Exception("No para interpolation available for the given mesh and space dimension of distant mesh to -1D sourceMesh");
      }
    else if ( distant_support.getMeshDimension() == 2
              && _source_support->getMeshDimension() == 3
              && distant_support.getSpaceDimension() == 3 && _source_support->getSpaceDimension() == 3)
      {
        MEDCouplingNormalizedUnstructuredMesh<3,3> target_wrapper(distant_supportC);
        MEDCouplingNormalizedUnstructuredMesh<3,3> source_wrapper(source_supportC);
        INTERP_KERNEL::Interpolation3D2D interpolator (*this);
        colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
        target_wrapper.releaseTempArrays();
        source_wrapper.releaseTempArrays();
      }
    else if ( distant_support.getMeshDimension() == 1
              && _source_support->getMeshDimension() == 2
              && distant_support.getSpaceDimension() == 2 && _source_support->getSpaceDimension() == 2)
      {
        MEDCouplingNormalizedUnstructuredMesh<2,2> target_wrapper(distant_supportC);
        MEDCouplingNormalizedUnstructuredMesh<2,2> source_wrapper(source_supportC);
        INTERP_KERNEL::Interpolation2D1D interpolator (*this);
        colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
        target_wrapper.releaseTempArrays();
        source_wrapper.releaseTempArrays();
      }
    else if (distant_support.getMeshDimension() != _source_support->getMeshDimension())
      {
        throw INTERP_KERNEL::Exception("local and distant meshes do not have the same space and mesh dimensions");
      }
    else if( distant_support.getMeshDimension() == 1
             && distant_support.getSpaceDimension() == 1 )
      {
        MEDCouplingNormalizedUnstructuredMesh<1,1> target_wrapper(distant_supportC);
        MEDCouplingNormalizedUnstructuredMesh<1,1> source_wrapper(source_supportC);

        INTERP_KERNEL::Interpolation1D interpolation(*this);
        colSize=interpolation.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
        target_wrapper.releaseTempArrays();
        source_wrapper.releaseTempArrays();
      }
    else if( distant_support.getMeshDimension() == 1
             && distant_support.getSpaceDimension() == 2 )
      {
        MEDCouplingNormalizedUnstructuredMesh<2,1> target_wrapper(distant_supportC);
        MEDCouplingNormalizedUnstructuredMesh<2,1> source_wrapper(source_supportC);

        INTERP_KERNEL::Interpolation2DCurve interpolation(*this);
        colSize=interpolation.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
        target_wrapper.releaseTempArrays();
        source_wrapper.releaseTempArrays();
      }
    else if ( distant_support.getMeshDimension() == 2
              && distant_support.getSpaceDimension() == 3 )
      {
        MEDCouplingNormalizedUnstructuredMesh<3,2> target_wrapper(distant_supportC);
        MEDCouplingNormalizedUnstructuredMesh<3,2> source_wrapper(source_supportC);

        INTERP_KERNEL::Interpolation3DSurf interpolator (*this);
        colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
        target_wrapper.releaseTempArrays();
        source_wrapper.releaseTempArrays();
      }
    else if ( distant_support.getMeshDimension() == 2
              && distant_support.getSpaceDimension() == 2)
      {
        MEDCouplingNormalizedUnstructuredMesh<2,2> target_wrapper(distant_supportC);
        MEDCouplingNormalizedUnstructuredMesh<2,2> source_wrapper(source_supportC);

        INTERP_KERNEL::Interpolation2D interpolator (*this);
        colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
        target_wrapper.releaseTempArrays();
        source_wrapper.releaseTempArrays();
      }
    else if ( distant_support.getMeshDimension() == 3
              && distant_support.getSpaceDimension() == 3 )
      {
        MEDCouplingNormalizedUnstructuredMesh<3,3> target_wrapper(distant_supportC);
        MEDCouplingNormalizedUnstructuredMesh<3,3> source_wrapper(source_supportC);

        INTERP_KERNEL::Interpolation3D interpolator (*this);
        colSize=interpolator.interpolateMeshes(target_wrapper,source_wrapper,surfaces,interpMethod.c_str());
        target_wrapper.releaseTempArrays();
        source_wrapper.releaseTempArrays();
      }
    else
      {
        throw INTERP_KERNEL::Exception("no interpolator exists for these mesh and space dimensions ");
      }
    bool needTargetSurf=isSurfaceComputationNeeded(targetMeth);

    MEDCouplingFieldDouble *target_triangle_surf=0;
    if(needTargetSurf)
      target_triangle_surf = distant_support.getMeasureField(getMeasureAbsStatus());
    fillDSFromVM(iproc_distant,distant_elems,surfaces,target_triangle_surf);

    if(needTargetSurf)
      target_triangle_surf->decrRef();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void ParaMEDMEM::InterpolationMatrix::addGhostElements ( const std::vector< int > &  distantProcs,
const std::vector< std::vector< int > > &  elementsToAdd 
) [private]

Definition at line 583 of file InterpolationMatrix.cxx.

  {
    std::vector< std::vector< std::map<int,double> > > data1;
    std::vector<int> data2;
    serializeMe(data1,data2);
    initialize();
    int nbOfDistProcs=distantProcs.size();
    for(int i=0;i<nbOfDistProcs;i++)
      {
        int procId=distantProcs[i];
        const std::vector<int>& eltsForThisProc=elementsToAdd[i];
        if(!eltsForThisProc.empty())
          {
            std::vector<int>::iterator iter1=std::find(data2.begin(),data2.end(),procId);
            std::map<int,double> *toFeed=0;
            if(iter1!=data2.end())
              {//to test
                int rank=iter1-data2.begin();
                toFeed=&(data1[rank].back());
              }
            else
              {
                iter1=std::lower_bound(data2.begin(),data2.end(),procId);
                int rank=iter1-data2.begin();
                data2.insert(iter1,procId);
                std::vector< std::map<int,double> > tmp(data1.front().size());
                data1.insert(data1.begin()+rank,tmp);
                toFeed=&(data1[rank].back());
              }
            for(std::vector<int>::const_iterator iter2=eltsForThisProc.begin();iter2!=eltsForThisProc.end();iter2++)
              (*toFeed)[*iter2]=0.;
          }
      }
    //
    nbOfDistProcs=data2.size();
    for(int j=0;j<nbOfDistProcs;j++)
      fillDSFromVM(data2[j],0,data1[j],0);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 416 of file InterpolationMatrix.cxx.

  {
    int pol1=elementLocator.sendPolicyToWorkingSideL();
    if(pol1==ElementLocator::NO_POST_TREATMENT_POLICY)
      {
        elementLocator.recvFromWorkingSideL();
        elementLocator.sendToWorkingSideL();
      }
    else if(ElementLocator::CUMULATIVE_POLICY)
      {
        //ask for lazy side to deduce ids eventually missing on working side and to send it back.
        elementLocator.recvLocalIdsFromWorkingSideL();
        elementLocator.sendCandidatesGlobalIdsToWorkingSideL();
        elementLocator.recvCandidatesForAddElementsL();
        elementLocator.sendAddElementsToWorkingSideL();
        //Working side has updated its eventually missing ids updates its global ids with lazy side procs contribution
        elementLocator.recvLocalIdsFromWorkingSideL();
        elementLocator.sendGlobalIdsToWorkingSideL();
        //like no post treatment
        elementLocator.recvFromWorkingSideL();
        elementLocator.sendToWorkingSideL();
      }
    else
      throw INTERP_KERNEL::Exception("Not managed policy detected on lazy side : not implemented !");
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 410 of file InterpolationMatrix.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void ParaMEDMEM::InterpolationMatrix::computeGlobalColSum ( std::vector< std::vector< double > > &  denoStrorage) [private]

Definition at line 808 of file InterpolationMatrix.cxx.

  {
    denoStrorage.resize(_coeffs.size());
    vector<vector<double> >::iterator iter2=denoStrorage.begin();
    for(vector<vector<pair<int,double> > >::const_iterator iter1=_coeffs.begin();iter1!=_coeffs.end();iter1++,iter2++)
      {
        (*iter2).resize((*iter1).size());
        double sumOfCurrentRow=0.;
        for(vector<pair<int,double> >::const_iterator iter3=(*iter1).begin();iter3!=(*iter1).end();iter3++)
          sumOfCurrentRow+=(*iter3).second;
        std::fill((*iter2).begin(),(*iter2).end(),sumOfCurrentRow);
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void ParaMEDMEM::InterpolationMatrix::computeGlobalRowSum ( ElementLocator elementLocator,
std::vector< std::vector< double > > &  denoStrorage,
std::vector< std::vector< double > > &  denoStrorageInv 
) [private]

Definition at line 493 of file InterpolationMatrix.cxx.

  {
    //stores id in distant procs sorted by lazy procs connected with
    vector< vector<int> > rowsPartialSumI;
    //stores for each lazy procs connected with, if global info is available and if it's the case the policy
    vector<int> policyPartial;
    //stores the corresponding values.
    vector< vector<double> > rowsPartialSumD;
    elementLocator.recvPolicyFromLazySideW(policyPartial);
    int pol1=mergePolicies(policyPartial);
    if(pol1==ElementLocator::NO_POST_TREATMENT_POLICY)
      {
        computeLocalRowSum(elementLocator.getDistantProcIds(),rowsPartialSumI,rowsPartialSumD);
        elementLocator.sendSumToLazySideW(rowsPartialSumI,rowsPartialSumD);
        elementLocator.recvSumFromLazySideW(rowsPartialSumD);
      }
    else if(pol1==ElementLocator::CUMULATIVE_POLICY)
      {
        //updateWithNewAdditionnalElements(addingElements);
        //stores for each lazy procs connected with, the ids in global mode if it exists (regarding policyPartial). This array has exactly the size of  rowsPartialSumI,
        //if policyPartial has CUMALATIVE_POLICY in each.
        vector< vector<int> > globalIdsPartial;
        computeLocalRowSum(elementLocator.getDistantProcIds(),rowsPartialSumI,rowsPartialSumD);
        elementLocator.sendLocalIdsToLazyProcsW(rowsPartialSumI);
        elementLocator.recvCandidatesGlobalIdsFromLazyProcsW(globalIdsPartial);
        std::vector< std::vector<int> > addingElements;
        findAdditionnalElements(elementLocator,addingElements,rowsPartialSumI,globalIdsPartial);
        addGhostElements(elementLocator.getDistantProcIds(),addingElements);
        rowsPartialSumI.clear();
        globalIdsPartial.clear();
        computeLocalRowSum(elementLocator.getDistantProcIds(),rowsPartialSumI,rowsPartialSumD);
        elementLocator.sendLocalIdsToLazyProcsW(rowsPartialSumI);
        elementLocator.recvGlobalIdsFromLazyProcsW(rowsPartialSumI,globalIdsPartial);
        //
        elementLocator.sendSumToLazySideW(rowsPartialSumI,rowsPartialSumD);
        elementLocator.recvSumFromLazySideW(rowsPartialSumD);
        mergeRowSum3(globalIdsPartial,rowsPartialSumD);
        mergeCoeffs(elementLocator.getDistantProcIds(),rowsPartialSumI,globalIdsPartial,denoStrorageInv);
      }
    else
      throw INTERP_KERNEL::Exception("Not managed policy detected : not implemented !");
    divideByGlobalRowSum(elementLocator.getDistantProcIds(),rowsPartialSumI,rowsPartialSumD,denoStrorage);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 487 of file InterpolationMatrix.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

Nothing to do because surface computation is on working side.

Definition at line 475 of file InterpolationMatrix.cxx.

  {
  }

Here is the caller graph for this function:

Definition at line 442 of file InterpolationMatrix.cxx.

  {
    MEDCouplingFieldDouble *source_triangle_surf = _source_support->getMeasureField(getMeasureAbsStatus());
    _deno_multiply.resize(_coeffs.size());
    vector<vector<double> >::iterator iter6=_deno_multiply.begin();
    const double *values=source_triangle_surf->getArray()->getConstPointer();
    for(vector<vector<pair<int,double> > >::const_iterator iter4=_coeffs.begin();iter4!=_coeffs.end();iter4++,iter6++,values++)
      {
        (*iter6).resize((*iter4).size());
        std::fill((*iter6).begin(),(*iter6).end(),*values);
      }
    source_triangle_surf->decrRef();
    _deno_reverse_multiply=_target_volume;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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]
Parameters:
distantProcsin parameter that indicates which lazy procs are concerned.
resPerProcIout 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.
resPerProcDout parameter with the same format than 'resPerProcI'. It contains corresponding sum values.

Definition at line 543 of file InterpolationMatrix.cxx.

  {
    resPerProcI.resize(distantProcs.size());
    resPerProcD.resize(distantProcs.size());
    std::vector<double> res(_col_offsets.size());
    for(vector<vector<pair<int,double> > >::const_iterator iter=_coeffs.begin();iter!=_coeffs.end();iter++)
      for(vector<pair<int,double> >::const_iterator iter3=(*iter).begin();iter3!=(*iter).end();iter3++)
        res[(*iter3).first]+=(*iter3).second;
    set<int> procsSet;
    int id=-1;
    const vector<std::pair<int,int> >& mapping=_mapping.getSendingIds();
    for(vector<std::pair<int,int> >::const_iterator iter2=mapping.begin();iter2!=mapping.end();iter2++)
      {
        std::pair<set<int>::iterator,bool> isIns=procsSet.insert((*iter2).first);
        if(isIns.second)
          id=std::find(distantProcs.begin(),distantProcs.end(),(*iter2).first)-distantProcs.begin();
        resPerProcI[id].push_back((*iter2).second);
        resPerProcD[id].push_back(res[iter2-mapping.begin()]);
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Nothing to do because surface computation is on working side.

Definition at line 482 of file InterpolationMatrix.cxx.

  {
  }

Here is the caller graph for this function:

Definition at line 457 of file InterpolationMatrix.cxx.

  {
    _deno_multiply=_target_volume;
    MEDCouplingFieldDouble *source_triangle_surf = _source_support->getMeasureField(getMeasureAbsStatus());
    _deno_reverse_multiply.resize(_coeffs.size());
    vector<vector<double> >::iterator iter6=_deno_reverse_multiply.begin();
    const double *values=source_triangle_surf->getArray()->getConstPointer();
    for(vector<vector<pair<int,double> > >::const_iterator iter4=_coeffs.begin();iter4!=_coeffs.end();iter4++,iter6++,values++)
      {
        (*iter6).resize((*iter4).size());
        std::fill((*iter6).begin(),(*iter6).end(),*values);
      }
    source_triangle_surf->decrRef();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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 
) [private]

Definition at line 784 of file InterpolationMatrix.cxx.

  {
    map<int,double> fastSums;
    int procId=0;
    for(vector<int>::const_iterator iter1=distantProcs.begin();iter1!=distantProcs.end();iter1++,procId++)
      {
        const std::vector<int>& currentProcI=resPerProcI[procId];
        const std::vector<double>& currentProcD=resPerProcD[procId];
        vector<double>::const_iterator iter3=currentProcD.begin();
        for(vector<int>::const_iterator iter2=currentProcI.begin();iter2!=currentProcI.end();iter2++,iter3++)
          fastSums[_col_offsets[std::make_pair(*iter1,*iter2)]]=*iter3;
      }
    deno.resize(_coeffs.size());
    vector<vector<double> >::iterator iter6=deno.begin();
    for(vector<vector<pair<int,double> > >::const_iterator iter4=_coeffs.begin();iter4!=_coeffs.end();iter4++,iter6++)
      {
        (*iter6).resize((*iter4).size());
        vector<double>::iterator iter7=(*iter6).begin();
        for(vector<pair<int,double> >::const_iterator iter5=(*iter4).begin();iter5!=(*iter4).end();iter5++,iter7++)
          *iter7=fastSums[(*iter5).first];
      }
  }

Here is the caller graph for this function:

void ParaMEDMEM::InterpolationMatrix::fillDSFromVM ( int  iproc_distant,
const int *  distant_elems,
const std::vector< std::map< int, double > > &  values,
MEDCouplingFieldDouble surf 
) [private]

Definition at line 259 of file InterpolationMatrix.cxx.

  {
    //loop over the elements to build the interpolation
    //matrix structures
    int source_size=values.size();
    for (int ielem=0; ielem < source_size; ielem++) 
      {
        _row_offsets[ielem+1] += values[ielem].size();
        for(map<int,double>::const_iterator iter=values[ielem].begin();iter!=values[ielem].end();iter++)
          {
            int localId;
            if(distant_elems)
              localId=distant_elems[iter->first];
            else
              localId=iter->first;
            //locating the (iproc, itriangle) pair in the list of columns
            map<pair<int,int>,int >::iterator iter2 = _col_offsets.find(make_pair(iproc_distant,localId));
            int col_id;

            if (iter2 == _col_offsets.end())
              {
                //(iproc, itriangle) is not registered in the list
                //of distant elements
                col_id =_col_offsets.size();
                _col_offsets.insert(make_pair(make_pair(iproc_distant,localId),col_id));
                _mapping.addElementFromSource(iproc_distant,localId);
              }
            else 
              {
                col_id = iter2->second;
              }
            //the non zero coefficient is stored 
            //ielem is the row,
            //col_id is the number of the column
            //iter->second is the value of the coefficient
            if(surf)
              {
                double surface = surf->getIJ(iter->first,0);
                _target_volume[ielem].push_back(surface);
              }
            _coeffs[ielem].push_back(make_pair(col_id,iter->second));
          }
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Definition at line 569 of file InterpolationMatrix.cxx.

  {
    std::set<int> globalIds;
    int nbLazyProcs=globalIdsPartial.size();
    for(int i=0;i<nbLazyProcs;i++)
      globalIds.insert(globalIdsPartial[i].begin(),globalIdsPartial[i].end());
    std::vector<int> tmp(globalIds.size());
    std::copy(globalIds.begin(),globalIds.end(),tmp.begin());
    globalIds.clear();
    elementLocator.sendCandidatesForAddElementsW(tmp);
    elementLocator.recvAddElementsFromLazyProcsW(elementsToAdd);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 376 of file InterpolationMatrix.cxx.

  {
    NatureOfField nature=elementLocator.getLocalNature();
    switch(nature)
      {
      case ConservativeVolumic:
        computeConservVolDenoL(elementLocator);
        break;
      case Integral:
        {
          if(!elementLocator.isM1DCorr())
            computeIntegralDenoL(elementLocator);
          else
            computeConservVolDenoL(elementLocator);
          break;
        }
      case IntegralGlobConstraint:
        //this is not a bug doing like ConservativeVolumic
        computeConservVolDenoL(elementLocator);
        break;
      case RevIntegral:
        {
          if(!elementLocator.isM1DCorr())
            computeRevIntegralDenoL(elementLocator);
          else
            computeConservVolDenoL(elementLocator);
          break;
        }
      default:
        throw INTERP_KERNEL::Exception("Not recognized nature of field. Change nature of Field.");
        break;
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 343 of file InterpolationMatrix.cxx.

  {
    NatureOfField nature=elementLocator.getLocalNature();
    switch(nature)
      {
      case ConservativeVolumic:
        computeConservVolDenoW(elementLocator);
        break;
      case Integral:
        {
          if(!elementLocator.isM1DCorr())
            computeIntegralDenoW(elementLocator);
          else
            computeGlobConstraintDenoW(elementLocator);
          break;
        }
      case IntegralGlobConstraint:
        computeGlobConstraintDenoW(elementLocator);
        break;
      case RevIntegral:
        {
          if(!elementLocator.isM1DCorr())
            computeRevIntegralDenoW(elementLocator);
          else
            computeConservVolDenoW(elementLocator);
          break;
        }
      default:
        throw INTERP_KERNEL::Exception("Not recognized nature of field. Change nature of Field.");
        break;
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 53 of file InterpolationMatrix.hxx.

{ return _mapping.getAccessDEC(); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 69 of file DECOptions.hxx.

{ return _allToAllMethod; }

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.getAllToAllMethod (   self) [inherited]
getAllToAllMethod(self) -> AllToAllMethod

1

Definition at line 14967 of file ParaMEDMEM.py.

14967 
14968     def getAllToAllMethod(self):
14969         """
14970         getAllToAllMethod(self) -> AllToAllMethod
14971 
14972         1
14973         """
14974         return _ParaMEDMEM.DECOptions_getAllToAllMethod(self)

Here is the call graph for this function:

bool ParaMEDMEM::DECOptions::getAsynchronous ( ) const [inline, inherited]

Definition at line 66 of file DECOptions.hxx.

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.getAsynchronous (   self) [inherited]
getAsynchronous(self) -> bool

1

Definition at line 14951 of file ParaMEDMEM.py.

14951 
14952     def getAsynchronous(self):
14953         """
14954         getAsynchronous(self) -> bool
14955 
14956         1
14957         """
14958         return _ParaMEDMEM.DECOptions_getAsynchronous(self)

Here is the call graph for this function:

bool ParaMEDMEM::DECOptions::getForcedRenormalization ( ) const [inline, inherited]

Definition at line 63 of file DECOptions.hxx.

Here is the caller graph for this function:

getForcedRenormalization(self) -> bool

1

Definition at line 14935 of file ParaMEDMEM.py.

14935 
14936     def getForcedRenormalization(self):
14937         """
14938         getForcedRenormalization(self) -> bool
14939 
14940         1
14941         """
14942         return _ParaMEDMEM.DECOptions_getForcedRenormalization(self)

Here is the call graph for this function:

const std::string& ParaMEDMEM::DECOptions::getMethod ( ) const [inline, inherited]

Definition at line 57 of file DECOptions.hxx.

{ return _method; }

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.getMethod (   self) [inherited]
getMethod(self) -> string

1

Definition at line 14903 of file ParaMEDMEM.py.

14903 
14904     def getMethod(self):
14905         """
14906         getMethod(self) -> string
14907 
14908         1
14909         """
14910         return _ParaMEDMEM.DECOptions_getMethod(self)

Here is the call graph for this function:

Definition at line 52 of file InterpolationMatrix.hxx.

{ return _row_offsets.size(); }

Definition at line 60 of file DECOptions.hxx.

Here is the caller graph for this function:

getTimeInterpolationMethod(self) -> TimeInterpolationMethod

1

Definition at line 14919 of file ParaMEDMEM.py.

14919 
14920     def getTimeInterpolationMethod(self):
14921         """
14922         getTimeInterpolationMethod(self) -> TimeInterpolationMethod
14923 
14924         1
14925         """
14926         return _ParaMEDMEM.DECOptions_getTimeInterpolationMethod(self)

Here is the call graph for this function:

Definition at line 333 of file InterpolationMatrix.cxx.

  {
    int lgth=_coeffs.size();
    _row_offsets.clear(); _row_offsets.resize(lgth+1);
    _coeffs.clear(); _coeffs.resize(lgth);
    _target_volume.clear(); _target_volume.resize(lgth);
    _col_offsets.clear();
    _mapping.initialize();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool ParaMEDMEM::InterpolationMatrix::isSurfaceComputationNeeded ( const std::string &  method) const [private]

Definition at line 959 of file InterpolationMatrix.cxx.

  {
    return method=="P0";
  }

Here is the caller graph for this function:

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.

Parameters:
procsInInteractioninput parameter : specifies the procId in absolute of distant lazy procs in interaction with
rowsPartialSumIinput parameter : local ids of distant lazy procs elements in interaction with
globalIdsPartialinput parameter : global ids of distant lazy procs elements in interaction with

Definition at line 730 of file InterpolationMatrix.cxx.

  {
    //preparing fast access structures
    std::map<int,int> procT;
    int localProcId=0;
    for(std::vector<int>::const_iterator iter1=procsInInteraction.begin();iter1!=procsInInteraction.end();iter1++,localProcId++)
      procT[*iter1]=localProcId;
    int size=procsInInteraction.size();
    std::vector<std::map<int,int> > localToGlobal(size);
    for(int i=0;i<size;i++)
      {
        std::map<int,int>& myLocalToGlobal=localToGlobal[i];
        const std::vector<int>& locals=rowsPartialSumI[i];
        const std::vector<int>& globals=globalIdsPartial[i];
        std::vector<int>::const_iterator iter3=locals.begin();
        std::vector<int>::const_iterator iter4=globals.begin();
        for(;iter3!=locals.end();iter3++,iter4++)
          myLocalToGlobal[*iter3]=*iter4;
      }
    //
    const vector<std::pair<int,int> >& mapping=_mapping.getSendingIds();
    std::map<int,double> globalIdVal;
    //accumulate for same global id on lazy part.
    for(vector<vector<pair<int,double> > >::iterator iter1=_coeffs.begin();iter1!=_coeffs.end();iter1++)
      for(vector<pair<int,double> >::iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++)
        {
          const std::pair<int,int>& distantLocalLazyId=mapping[(*iter2).first];
          int localLazyProcId=procT[distantLocalLazyId.first];
          int globalDistantLazyId=localToGlobal[localLazyProcId][distantLocalLazyId.second];
          globalIdVal[globalDistantLazyId]+=(*iter2).second;
        }
    //perform merge
    std::vector<std::vector<double> >::iterator iter3=denoStrorageInv.begin();
    for(vector<vector<pair<int,double> > >::iterator iter1=_coeffs.begin();iter1!=_coeffs.end();iter1++,iter3++)
      {
        double val=(*iter3).back();
        (*iter3).resize((*iter1).size());
        std::vector<double>::iterator iter4=(*iter3).begin();
        for(vector<pair<int,double> >::iterator iter2=(*iter1).begin();iter2!=(*iter1).end();iter2++,iter4++)
          {
            const std::pair<int,int>& distantLocalLazyId=mapping[(*iter2).first];
            int localLazyProcId=procT[distantLocalLazyId.first];
            int globalDistantLazyId=localToGlobal[localLazyProcId][distantLocalLazyId.second];
            double newVal=globalIdVal[globalDistantLazyId];
            if((*iter2).second!=0.)
              (*iter4)=val*newVal/(*iter2).second;
            else
              (*iter4)=std::numeric_limits<double>::max();
            (*iter2).second=newVal;
          }
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

int ParaMEDMEM::InterpolationMatrix::mergePolicies ( const std::vector< int > &  policyPartial) [private]

Definition at line 622 of file InterpolationMatrix.cxx.

  {
    if(policyPartial.empty())
      return ElementLocator::NO_POST_TREATMENT_POLICY;
    int ref=policyPartial[0];
     std::vector<int>::const_iterator iter1=std::find_if(policyPartial.begin(),policyPartial.end(),std::bind2nd(std::not_equal_to<int>(),ref));
    if(iter1!=policyPartial.end())
      {
        std::ostringstream msg; msg << "Incompatible policies between lazy procs each other : proc # " << iter1-policyPartial.begin();
        throw INTERP_KERNEL::Exception(msg.str().c_str());
      }
    return ref;
  }

Here is the caller graph for this function:

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()

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'

Definition at line 645 of file InterpolationMatrix.cxx.

  {
    std::map<int,double> sumToReturn;
    int nbLazyProcs=rowsPartialSumD.size();
    for(int i=0;i<nbLazyProcs;i++)
      {
        const std::vector<double>& rowSumOfP=rowsPartialSumD[i];
        const std::vector<int>& globalIdsOfP=globalIdsPartial[i];
        std::vector<double>::const_iterator iter1=rowSumOfP.begin();
        std::vector<int>::const_iterator iter2=globalIdsOfP.begin();
        for(;iter1!=rowSumOfP.end();iter1++,iter2++)
          sumToReturn[*iter2]+=*iter1;
      }
    //
    int lgth=sumToReturn.size();
    globalIdsLazySideInteraction.resize(lgth);
    sumCorresponding.resize(lgth);
    std::vector<int>::iterator iter3=globalIdsLazySideInteraction.begin();
    std::vector<double>::iterator iter4=sumCorresponding.begin();
    for(std::map<int,double>::const_iterator iter5=sumToReturn.begin();iter5!=sumToReturn.end();iter5++,iter3++,iter4++)
      {
        *iter3=(*iter5).first;
        *iter4=(*iter5).second;
      }
  }
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'.

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'

Definition at line 680 of file InterpolationMatrix.cxx.

  {
    std::map<int,double> acc;
    std::vector<int>::const_iterator iter1=globalIdsLazySideInteraction.begin();
    std::vector<double>::const_iterator iter2=sumCorresponding.begin();
    for(;iter1!=globalIdsLazySideInteraction.end();iter1++,iter2++)
      acc[*iter1]=*iter2;
    //
    int nbLazyProcs=globalIdsPartial.size();
    for(int i=0;i<nbLazyProcs;i++)
      {
        const std::vector<int>& tmp1=globalIdsPartial[i];
        std::vector<double>& tmp2=rowsPartialSumD[i];
        std::vector<int>::const_iterator iter3=tmp1.begin();
        std::vector<double>::iterator iter4=tmp2.begin();
        for(;iter3!=tmp1.end();iter3++,iter4++)
          *iter4=acc[*iter3];
      }
  }
void ParaMEDMEM::InterpolationMatrix::mergeRowSum3 ( const std::vector< std::vector< int > > &  globalIdsPartial,
std::vector< std::vector< double > > &  rowsPartialSumD 
) [private]

Definition at line 701 of file InterpolationMatrix.cxx.

  {
    std::map<int,double> sum;
    std::vector< std::vector<int> >::const_iterator iter1=globalIdsPartial.begin();
    std::vector< std::vector<double> >::iterator iter2=rowsPartialSumD.begin();
    for(;iter1!=globalIdsPartial.end();iter1++,iter2++)
      {
        std::vector<int>::const_iterator iter3=(*iter1).begin();
        std::vector<double>::const_iterator iter4=(*iter2).begin();
        for(;iter3!=(*iter1).end();iter3++,iter4++)
          sum[*iter3]+=*iter4;
      }
    iter2=rowsPartialSumD.begin();
    for(iter1=globalIdsPartial.begin();iter1!=globalIdsPartial.end();iter1++,iter2++)
      {
        std::vector<int>::const_iterator iter3=(*iter1).begin();
        std::vector<double>::iterator iter4=(*iter2).begin();
        for(;iter3!=(*iter1).end();iter3++,iter4++)
          *iter4=sum[*iter3];
      }
  }

Here is the caller graph for this function:

Definition at line 864 of file InterpolationMatrix.cxx.

  {
    int nbcomp = field.getArray()->getNumberOfComponents();
    vector<double> target_value(_col_offsets.size()* nbcomp,0.0);

    //computing the matrix multiply on source side
    if (_source_group.containsMyRank())
      {
        int nbrows = _coeffs.size();

        // performing W.S
        // W is the intersection matrix
        // S is the source vector

        for (int irow=0; irow<nbrows; irow++)
          {
            for (int icomp=0; icomp< nbcomp; icomp++)
              {
                double coeff_row = field.getIJ(irow,icomp);
                for (int icol=_row_offsets[irow]; icol< _row_offsets[irow+1];icol++)
                  {
                    int colid= _coeffs[irow][icol-_row_offsets[irow]].first;
                    double value = _coeffs[irow][icol-_row_offsets[irow]].second;
                    double deno = _deno_multiply[irow][icol-_row_offsets[irow]];
                    target_value[colid*nbcomp+icomp]+=value*coeff_row/deno;
                  }
              }
          }
      }

    if (_target_group.containsMyRank())
      {
        int nbelems = field.getArray()->getNumberOfTuples() ;
        double* value = const_cast<double*> (field.getArray()->getPointer());
        for (int i=0; i<nbelems*nbcomp; i++)
          {
            value[i]=0.0;
          }
      }

    //on source side : sending  T=VT^(-1).(W.S)
    //on target side :: receiving T and storing it in field
    _mapping.sendRecv(&target_value[0],field);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 841 of file InterpolationMatrix.cxx.

  {
    int nbelems = _source_field->getField()->getNumberOfTuples();
    for (int ielem=0; ielem < nbelems; ielem++)
      {
        _row_offsets[ielem+1]+=_row_offsets[ielem];
      }
    _mapping.prepareSendRecv();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void ParaMEDMEM::InterpolationMatrix::resizeGlobalColSum ( std::vector< std::vector< double > > &  denoStrorage) [private]

Definition at line 822 of file InterpolationMatrix.cxx.

  {
    vector<vector<double> >::iterator iter2=denoStrorage.begin();
    for(vector<vector<pair<int,double> > >::const_iterator iter1=_coeffs.begin();iter1!=_coeffs.end();iter1++,iter2++)
      {
        double val=(*iter2).back();
        (*iter2).resize((*iter1).size());
        std::fill((*iter2).begin(),(*iter2).end(),val);
      }
  }

Here is the call graph for this function:

void ParaMEDMEM::InterpolationMatrix::serializeMe ( std::vector< std::vector< std::map< int, double > > > &  data1,
std::vector< int > &  data2 
) const [private]

Definition at line 304 of file InterpolationMatrix.cxx.

  {
    data1.clear();
    data2.clear();
    const std::vector<std::pair<int,int> >& sendingIds=_mapping.getSendingIds();
    std::set<int> procsS;
    for(std::vector<std::pair<int,int> >::const_iterator iter1=sendingIds.begin();iter1!=sendingIds.end();iter1++)
      procsS.insert((*iter1).first);
    data1.resize(procsS.size());
    data2.resize(procsS.size());
    std::copy(procsS.begin(),procsS.end(),data2.begin());
    std::map<int,int> fastProcAcc;
    int id=0;
    for(std::set<int>::const_iterator iter2=procsS.begin();iter2!=procsS.end();iter2++,id++)
      fastProcAcc[*iter2]=id;
    int nbOfSrcElt=_coeffs.size();
    for(std::vector< std::vector< std::map<int,double> > >::iterator iter3=data1.begin();iter3!=data1.end();iter3++)
      (*iter3).resize(nbOfSrcElt);
    id=0;
    for(std::vector< std::vector< std::pair<int,double> > >::const_iterator iter4=_coeffs.begin();iter4!=_coeffs.end();iter4++,id++)
      {
        for(std::vector< std::pair<int,double> >::const_iterator iter5=(*iter4).begin();iter5!=(*iter4).end();iter5++)
          {
            const std::pair<int,int>& elt=sendingIds[(*iter5).first];
            data1[fastProcAcc[elt.first]][id][elt.second]=(*iter5).second;
          }
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 70 of file DECOptions.hxx.

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.setAllToAllMethod (   self,
  args 
) [inherited]
setAllToAllMethod(self, AllToAllMethod sp)

1

Definition at line 14975 of file ParaMEDMEM.py.

14975 
14976     def setAllToAllMethod(self, *args):
14977         """
14978         setAllToAllMethod(self, AllToAllMethod sp)
14979 
14980         1
14981         """
14982         return _ParaMEDMEM.DECOptions_setAllToAllMethod(self, *args)

Here is the call graph for this function:

void ParaMEDMEM::DECOptions::setAsynchronous ( bool  dr) [inline, inherited]

Definition at line 67 of file DECOptions.hxx.

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.setAsynchronous (   self,
  args 
) [inherited]
setAsynchronous(self, bool dr)

1

Definition at line 14959 of file ParaMEDMEM.py.

14959 
14960     def setAsynchronous(self, *args):
14961         """
14962         setAsynchronous(self, bool dr)
14963 
14964         1
14965         """
14966         return _ParaMEDMEM.DECOptions_setAsynchronous(self, *args)

Here is the call graph for this function:

void ParaMEDMEM::DECOptions::setForcedRenormalization ( bool  dr) [inline, inherited]

Definition at line 64 of file DECOptions.hxx.

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.setForcedRenormalization (   self,
  args 
) [inherited]
setForcedRenormalization(self, bool dr)

1

Definition at line 14943 of file ParaMEDMEM.py.

14943 
14944     def setForcedRenormalization(self, *args):
14945         """
14946         setForcedRenormalization(self, bool dr)
14947 
14948         1
14949         """
14950         return _ParaMEDMEM.DECOptions_setForcedRenormalization(self, *args)

Here is the call graph for this function:

void ParaMEDMEM::DECOptions::setMethod ( const char *  m) [inline, inherited]

Definition at line 58 of file DECOptions.hxx.

{ _method=m; }

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.setMethod (   self,
  args 
) [inherited]
setMethod(self, char m)

1

Definition at line 14911 of file ParaMEDMEM.py.

14911 
14912     def setMethod(self, *args):
14913         """
14914         setMethod(self, char m)
14915 
14916         1
14917         """
14918         return _ParaMEDMEM.DECOptions_setMethod(self, *args)

Here is the call graph for this function:

Definition at line 61 of file DECOptions.hxx.

Here is the caller graph for this function:

def ParaMEDMEM.DECOptions.setTimeInterpolationMethod (   self,
  args 
) [inherited]
setTimeInterpolationMethod(self, TimeInterpolationMethod it)

1

Definition at line 14927 of file ParaMEDMEM.py.

14927 
14928     def setTimeInterpolationMethod(self, *args):
14929         """
14930         setTimeInterpolationMethod(self, TimeInterpolationMethod it)
14931 
14932         1
14933         """
14934         return _ParaMEDMEM.DECOptions_setTimeInterpolationMethod(self, *args)

Here is the call graph for this function:

Definition at line 924 of file InterpolationMatrix.cxx.

  {
    int nbcomp = field.getArray()->getNumberOfComponents();
    vector<double> source_value(_col_offsets.size()* nbcomp,0.0);
    _mapping.reverseSendRecv(&source_value[0],field);

    //treatment of the transpose matrix multiply on the source side
    if (_source_group.containsMyRank())
      {
        int nbrows    = _coeffs.size();
        double *array = field.getArray()->getPointer() ;

        // Initialization
        std::fill(array, array+nbrows*nbcomp, 0.0) ;

        //performing WT.T
        //WT is W transpose
        //T is the target vector
        for (int irow = 0; irow < nbrows; irow++)
          {
            for (int icol = _row_offsets[irow]; icol < _row_offsets[irow+1]; icol++)
              {
                int colid    = _coeffs[irow][icol-_row_offsets[irow]].first;
                double value = _coeffs[irow][icol-_row_offsets[irow]].second;
                double deno = _deno_reverse_multiply[irow][icol-_row_offsets[irow]];
                for (int icomp=0; icomp<nbcomp; icomp++)
                  {
                    double coeff_row = source_value[colid*nbcomp+icomp];
                    array[irow*nbcomp+icomp] += value*coeff_row/deno;
                  }
              }
          }
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 37 of file DECOptions.hxx.

bool ParaMEDMEM::DECOptions::_asynchronous [protected, inherited]

Definition at line 35 of file DECOptions.hxx.

std::vector<std::vector<std::pair<int,double> > > ParaMEDMEM::InterpolationMatrix::_coeffs [private]

Definition at line 97 of file InterpolationMatrix.hxx.

std::map<std::pair<int,int>, int > ParaMEDMEM::InterpolationMatrix::_col_offsets [private]

Definition at line 90 of file InterpolationMatrix.hxx.

std::vector<std::vector<double> > ParaMEDMEM::InterpolationMatrix::_deno_multiply [private]

Definition at line 98 of file InterpolationMatrix.hxx.

std::vector<std::vector<double> > ParaMEDMEM::InterpolationMatrix::_deno_reverse_multiply [private]

Definition at line 99 of file InterpolationMatrix.hxx.

Definition at line 38 of file DECOptions.hxx.

Definition at line 92 of file InterpolationMatrix.hxx.

std::string ParaMEDMEM::DECOptions::_method [protected, inherited]

Reimplemented in ParaMEDMEM::NonCoincidentDEC.

Definition at line 34 of file DECOptions.hxx.

Definition at line 89 of file InterpolationMatrix.hxx.

Definition at line 88 of file InterpolationMatrix.hxx.

Definition at line 94 of file InterpolationMatrix.hxx.

Definition at line 91 of file InterpolationMatrix.hxx.

Definition at line 95 of file InterpolationMatrix.hxx.

std::vector< std::vector<double> > ParaMEDMEM::InterpolationMatrix::_target_volume [private]

Definition at line 96 of file InterpolationMatrix.hxx.

Definition at line 36 of file DECOptions.hxx.

Reimplemented in ParaMEDMEM::StructuredCoincidentDEC, and ParaMEDMEM::InterpKernelDEC.

Definition at line 14902 of file ParaMEDMEM.py.


The documentation for this class was generated from the following files: