-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "ParaFIELD.hxx"
#include "ParaMESH.hxx"
#include "ICoCoField.hxx"
-#include "ICoCoMEDField.hxx"
+#include "ICoCoMEDDoubleField.hxx"
#include "MPIProcessorGroup.hxx"
#include <cmath>
namespace MEDCoupling
{
-
- /*!
- * \anchor DisjointDEC-det
- * \class DisjointDEC
- *
- * \section DisjointDEC-over Overview
- *
- * Abstract interface class representing a link between two
- * processor groups for exchanging mesh or field data. The two processor groups must
- * have a void intersection (\ref MEDCoupling::OverlapDEC "OverlapDEC" is to be considered otherwise).
- * The %DEC is initialized by attaching a field on the receiving or on the
- * sending side.
- *
- * The data is sent or received through calls to the (abstract) methods recvData() and sendData().
- *
- * One can attach either a \c MEDCoupling::ParaFIELD, or a
- * \c ICoCo::Field, or directly a \c MEDCoupling::MEDCouplingFieldDouble instance.
- * See the various signatures of the method DisjointDEC::attachLocalField()
- *
- * The derivations of this class should be considered for practical instantiation:
- * - \ref InterpKernelDEC-det "InterpKernelDEC"
- * - \ref ExplicitCoincidentDEC-det "ExplicitCoincidentDEC"
- * - \ref StructuredCoincidentDEC-det "StructuredCoincidentDEC"
- *
- * \section DisjointDEC-options DisjointDEC options
- * The options supported by %DisjointDEC objects are the same that the ones supported for all
- * DECs in general and are all inherited from the class \ref MEDCoupling::DECOptions "DECOptions"
- *
- */
-
DisjointDEC::DisjointDEC(ProcessorGroup& source_group, ProcessorGroup& target_group):
_local_field(0),
_source_group(&source_group),
{
delete _local_field;
}
- _local_field=0;
+ _local_field=nullptr;
_owns_field=false;
if(_owns_groups)
{
delete _target_group;
}
_owns_groups=false;
- _source_group=0;
- _target_group=0;
+ _source_group=nullptr;
+ _target_group=nullptr;
delete _union_group;
- _union_group=0;
+ _union_group=nullptr;
if (_union_comm != MPI_COMM_NULL)
_comm_interface->commFree(&_union_comm);
+ _union_comm = MPI_COMM_NULL;
}
/**
will be updated by a recvData() call.
Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side.
The field type is a generic ICoCo Field, so that the DEC can couple a number of different fields :
- - a ICoCo::MEDField, that is created from a MEDCoupling structure
+ - a ICoCo::MEDDoubleField, that is created from a MEDCoupling structure
*/
- void DisjointDEC::attachLocalField(const ICoCo::MEDField *field)
+ void DisjointDEC::attachLocalField(const ICoCo::MEDDoubleField *field)
{
if(!isInUnion())
return ;
if(!field)
- throw INTERP_KERNEL::Exception("DisjointDEC::attachLocalField : ICoCo::MEDField pointer is NULL !");
- attachLocalField(field->getField());
+ throw INTERP_KERNEL::Exception("DisjointDEC::attachLocalField : ICoCo::MEDDoubleField pointer is NULL !");
+ attachLocalField(field->getMCField());
}
/*!