]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Ready to be tested outside -> next commit suppression.
authorgeay <anthony.geay@cea.fr>
Fri, 6 Jun 2014 10:25:58 +0000 (12:25 +0200)
committergeay <anthony.geay@cea.fr>
Fri, 6 Jun 2014 10:25:58 +0000 (12:25 +0200)
src/ParaMEDMEM/CMakeLists.txt
src/ParaMEDMEM/TrioDEC.cxx [new file with mode: 0644]
src/ParaMEDMEM/TrioDEC.hxx [new file with mode: 0644]

index 0427edd0a96631e22f1f51376f4bf96f132df7e7..d5bed9bfe5044a3de722516b109fa7d5f7b38fcb 100644 (file)
@@ -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 (file)
index 0000000..9ae1734
--- /dev/null
@@ -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<int>& src_ids, const std::set<int>& 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 (file)
index 0000000..4f8fc31
--- /dev/null
@@ -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<int>& src_ids, const std::set<int>& 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