CommInterface.cxx
ParaUMesh.cxx
ParaSkyLineArray.cxx
+ ParaDataArray.cxx
ComponentTopology.cxx
MPIAccess.cxx
InterpolationMatrix.cxx
FILE(GLOB paramedmem_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${paramedmem_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
+FILE(GLOB paramedmem_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
+INSTALL(FILES ${paramedmem_HEADERS_TXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
+
# To allow usage as SWIG dependencies:
SET(paramedmem_HEADERS_HXX PARENT_SCOPE)
--- /dev/null
+// Copyright (C) 2020 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (EDF R&D)
+
+#include "ParaDataArray.txx"
+
+using namespace MEDCoupling;
+
+template class ParaDataArrayTemplate<Int32>;
+template class ParaDataArrayTemplate<Int64>;
--- /dev/null
+// Copyright (C) 2020 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (EDF R&D)
+
+#pragma once
+
+#include "MEDCouplingMemArray.hxx"
+
+namespace MEDCoupling
+{
+ /*!
+ * Parallel representation of a DataArray
+ *
+ * This class is very specific to the requirement of parallel code computations.
+ */
+ class ParaDataArray : public RefCountObject
+ {
+ };
+
+ template<class T>
+ class ParaDataArrayTemplate : public ParaDataArray
+ {
+ protected:
+ ParaDataArrayTemplate(typename Traits<T>::ArrayType *seqDa);
+ protected:
+ std::size_t getHeapMemorySizeWithoutChildren() const override;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const override;
+ void checkOKOneComponent(const std::string& msg);
+ private:
+ MCAuto<typename Traits<T>::ArrayType> _seq_da;
+ };
+
+ template<class T>
+ class ParaDataArrayDiscrete : public ParaDataArrayTemplate<T>
+ {
+ public:
+ typename Traits<T>::ArrayType *buildComplement() const;
+ protected:
+ ParaDataArrayDiscrete(typename Traits<T>::ArrayType *seqDa):ParaDataArrayTemplate<T>(seqDa) { }
+ };
+
+ class ParaDataArrayInt32 : public ParaDataArrayDiscrete<Int32>
+ {
+ private:
+ ParaDataArrayInt32(DataArrayInt32 *seqDa):ParaDataArrayDiscrete<Int32>(seqDa) { }
+ std::string getClassName() const override { return "ParaDataArrayInt32"; }
+ };
+
+ class ParaDataArrayInt64 : public ParaDataArrayDiscrete<Int64>
+ {
+ private:
+ ParaDataArrayInt64(DataArrayInt64 *seqDa):ParaDataArrayDiscrete<Int64>(seqDa) { }
+ std::string getClassName() const override { return "ParaDataArrayInt64"; }
+ };
+
+ #ifndef MEDCOUPLING_USE_64BIT_IDS
+ using ParaDataArrayIdType = ParaDataArrayInt32;
+ #else
+ using ParaDataArrayIdType = ParaDataArrayInt64;
+ #endif
+}
--- /dev/null
+// Copyright (C) 2020 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (EDF R&D)
+
+#pragma once
+
+#include "ParaDataArray.hxx"
+
+#include <sstream>
+
+namespace MEDCoupling
+{
+ template<class T>
+ ParaDataArrayTemplate<T>::ParaDataArrayTemplate(typename Traits<T>::ArrayType *seqDa)
+ {
+ this->_seq_da.takeRef(seqDa);
+ }
+
+ template<class T>
+ std::size_t ParaDataArrayTemplate<T>::getHeapMemorySizeWithoutChildren() const
+ {
+ return 0;
+ }
+
+ template<class T>
+ std::vector<const BigMemoryObject *> ParaDataArrayTemplate<T>::getDirectChildrenWithNull() const
+ {
+ return { this->_seq_da };
+ }
+
+ template<class T>
+ void ParaDataArrayTemplate<T>::checkOKOneComponent(const std::string& msg)
+ {
+ if(this->_seq_da.isNull())
+ {
+ std::ostringstream oss; oss << msg << " : nullptr internal pointer !";
+ throw INTERP_KERNEL::Exception(oss.str());
+ }
+ this->_seq_da->checkAllocated();
+ if( this->_seq_da->getNumberOfComponents()!=1 )
+ {
+ std::ostringstream oss; oss << msg << " : internal seq dataarray does not contain one component as expected !";
+ throw INTERP_KERNEL::Exception(oss.str());
+ }
+ }
+
+ /*!
+ Parallel version of DataArrayInt::buildComplement.
+ */
+ template<class T>
+ typename Traits<T>::ArrayType *ParaDataArrayDiscrete<T>::buildComplement() const
+ {
+ return nullptr;
+ }
+
+}