From: ageay Date: Tue, 9 Mar 2010 09:28:45 +0000 (+0000) Subject: Addition of RevIntegral management. X-Git-Tag: V5_1_main_FINAL~166 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2294dbf120040e11a37a7a57165800df18cb5987;p=tools%2Fmedcoupling.git Addition of RevIntegral management. --- diff --git a/src/ParaMEDMEM/InterpolationMatrix.cxx b/src/ParaMEDMEM/InterpolationMatrix.cxx index 344e00b12..ffe839fc3 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.cxx +++ b/src/ParaMEDMEM/InterpolationMatrix.cxx @@ -310,6 +310,14 @@ namespace ParaMEDMEM 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; @@ -336,6 +344,14 @@ namespace ParaMEDMEM //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; @@ -388,6 +404,21 @@ namespace ParaMEDMEM source_triangle_surf->decrRef(); _deno_reverse_multiply=_target_volume; } + + void InterpolationMatrix::computeRevIntegralDenoW(ElementLocator& elementLocator) + { + _deno_multiply=_target_volume; + MEDCouplingFieldDouble *source_triangle_surf = _source_support->getMeasureField(getMeasureAbsStatus()); + _deno_reverse_multiply.resize(_coeffs.size()); + vector >::iterator iter6=_deno_reverse_multiply.begin(); + const double *values=source_triangle_surf->getArray()->getConstPointer(); + for(vector > >::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(); + } /*! * Nothing to do because surface computation is on working side. @@ -396,6 +427,14 @@ namespace ParaMEDMEM { } + /*! + * Nothing to do because surface computation is on working side. + */ + void InterpolationMatrix::computeRevIntegralDenoL(ElementLocator& elementLocator) + { + } + + void InterpolationMatrix::computeGlobConstraintDenoW(ElementLocator& elementLocator) { computeGlobalColSum(_deno_multiply); diff --git a/src/ParaMEDMEM/InterpolationMatrix.hxx b/src/ParaMEDMEM/InterpolationMatrix.hxx index e0dfceab3..1664fdb2a 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.hxx +++ b/src/ParaMEDMEM/InterpolationMatrix.hxx @@ -53,9 +53,11 @@ namespace ParaMEDMEM private: 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& res) const; void computeLocalRowSum(const std::vector& distantProcs, std::vector >& resPerProcI,