From: geay Date: Fri, 6 Jun 2014 10:25:58 +0000 (+0200) Subject: Ready to be tested outside -> next commit suppression. X-Git-Tag: V7_5_0a1~2^2~32^2~3^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=780d7d55f1bd9d75112cfa5006f38d0d623e63c8;p=tools%2Fmedcoupling.git Ready to be tested outside -> next commit suppression. --- diff --git a/src/ParaMEDMEM/CMakeLists.txt b/src/ParaMEDMEM/CMakeLists.txt index 0427edd0a..d5bed9bfe 100644 --- a/src/ParaMEDMEM/CMakeLists.txt +++ b/src/ParaMEDMEM/CMakeLists.txt @@ -55,10 +55,11 @@ SET(paramedmem_SOURCES OverlapMapping.cxx ICoCoMEDField.cxx ICoCoField.cxx - ICoCoTrioField.cxx ParaFIELD.cxx ParaGRID.cxx BlockTopology.cxx + ICoCoTrioField.cxx + TrioDEC.cxx ) ADD_LIBRARY(paramedmem SHARED ${paramedmem_SOURCES}) diff --git a/src/ParaMEDMEM/TrioDEC.cxx b/src/ParaMEDMEM/TrioDEC.cxx new file mode 100644 index 000000000..9ae1734f5 --- /dev/null +++ b/src/ParaMEDMEM/TrioDEC.cxx @@ -0,0 +1,44 @@ +// Data exchange channel for trio +// TrioDEC.cxx +// version 0.0 06/06/2014 + +#include "TrioDEC.hxx" + +#include "ICoCoMEDField.hxx" +#include "ICoCoTrioField.hxx" + +using namespace ParaMEDMEM; +using namespace ICoCo; + +TrioDEC::TrioDEC():_traduced_field(0) +{ +} + +TrioDEC::TrioDEC(ProcessorGroup& source_group, ProcessorGroup& target_group):InterpKernelDEC(source_group,target_group),_traduced_field(0) +{ +} + +TrioDEC::TrioDEC(const std::set& src_ids, const std::set& trg_ids, const MPI_Comm& world_comm):InterpKernelDEC(src_ids,trg_ids,world_comm),_traduced_field(0) +{ +} + +void TrioDEC::attachLocalField(ICoCo::TrioField *field) +{ + if(!field) + throw INTERP_KERNEL::Exception("TrioDEC::attachLocalField : The input trio Field is NULL !"); + releaseInternalPointer(); + _traduced_field=field->build_medfield(); + DisjointDEC::attachLocalField(_traduced_field); +} + +void TrioDEC::releaseInternalPointer() +{ + if(_traduced_field) + delete _traduced_field; + _traduced_field=0; +} + +TrioDEC::~TrioDEC() +{ + releaseInternalPointer(); +} diff --git a/src/ParaMEDMEM/TrioDEC.hxx b/src/ParaMEDMEM/TrioDEC.hxx new file mode 100644 index 000000000..4f8fc315d --- /dev/null +++ b/src/ParaMEDMEM/TrioDEC.hxx @@ -0,0 +1,33 @@ +// Data exchange channel for trio +// TrioDEC.h +// version 0.0 06/06/2014 + +#ifndef _TrioDEC_included_ +#define _TrioDEC_included_ + +#include "InterpKernelDEC.hxx" + +namespace ICoCo +{ + class MEDField; + class TrioField; +} + +namespace ParaMEDMEM +{ + class TrioDEC : public InterpKernelDEC + { + public: + TrioDEC(); + TrioDEC(ProcessorGroup& source_group, ProcessorGroup& target_group); + TrioDEC(const std::set& src_ids, const std::set& trg_ids, const MPI_Comm& world_comm=MPI_COMM_WORLD); + void attachLocalField(ICoCo::TrioField *field); + virtual ~TrioDEC(); + private: + void releaseInternalPointer(); + private : + ICoCo::MEDField *_traduced_field; + }; +} + +#endif