Version: 9.14.0
MEDCoupling::ParaFIELD Class Reference

Public Member Functions

MEDCouplingFieldDoublegetField () const
 
double getL2Norm () const
 
ParaMESHgetSupport () const
 
TopologygetTopology () const
 
double getVolumeIntegral (int icomp, bool isWAbs) const
 
int nbComponents () const
 
 ParaFIELD (MEDCouplingFieldDouble *field, ParaMESH *sup, const ProcessorGroup &group)
 
 ParaFIELD (TypeOfField type, TypeOfTimeDiscretization td, ParaMESH *mesh, const ComponentTopology &component_topology)
 
void release ()
 
DataArrayIdType * returnCumulativeGlobalNumbering () const
 
DataArrayIdType * returnGlobalNumbering () const
 
void setOwnSupport (bool v) const
 
void synchronizeSource (MEDCoupling::ParaFIELD *target_field)
 
void synchronizeTarget (MEDCoupling::ParaFIELD *source_field)
 
virtual ~ParaFIELD ()
 

Detailed Description

This class encapsulates parallel fields.

It gathers a MEDCouplingField with some extra information related to the parallel topology.

It is most conveniently created by giving a pointer to a MEDCouplingFieldDouble object and a ProcessorGroup. By default, a ParaFIELD object will be constructed with all field components located on the same processors. In some specific cases, it might be necessary to scatter components over several processors. In this case, the constructor using a ComponentTopology is required.

Constructor & Destructor Documentation

◆ ParaFIELD() [1/2]

MEDCoupling::ParaFIELD::ParaFIELD ( TypeOfField  type,
TypeOfTimeDiscretization  td,
ParaMESH para_support,
const ComponentTopology component_topology 
)

Constructing a ParaFIELD from a ParaMESH and a ComponentTopology.

This constructor creates an empty field based on the ParaMESH description and the partitioning of components described in component_topology. It takes ownership over the _field object that it creates.

Here come the three ComponentTopology constructors :

ComponentTopology c; // one component in the field
ComponentTopology c(6); //six components, all of them on the same processor
ComponentTopology c(6, proc_group); // six components, evenly distributed over the processors of procgroup

References MEDCoupling::DataArrayTemplate< T >::alloc(), MEDCoupling::RefCountObjectOnly::decrRef(), MEDCoupling::ParaMESH::getCellMesh(), MEDCoupling::MEDCouplingFieldDouble::getNumberOfTuples(), MEDCoupling::Topology::getProcGroup(), MEDCoupling::ParaMESH::getTopology(), MEDCoupling::ParaMESH::isStructured(), MEDCoupling::ComponentTopology::nbBlocks(), MEDCoupling::ComponentTopology::nbLocalComponents(), MEDCoupling::DataArrayDouble::New(), MEDCoupling::MEDCouplingFieldDouble::New(), MEDCoupling::MEDCouplingFieldT< T >::setArray(), MEDCoupling::MEDCouplingField::setDescription(), MEDCoupling::MEDCouplingField::setMesh(), MEDCoupling::MEDCouplingField::setName(), and MEDCoupling::ProcessorGroup::size().

◆ ParaFIELD() [2/2]

MEDCoupling::ParaFIELD::ParaFIELD ( MEDCouplingFieldDouble subdomain_field,
ParaMESH sup,
const ProcessorGroup proc_group 
)

Constructor creating the ParaFIELD from a given FIELD and a processor group.

This constructor supposes that support underlying subdomain_field has no ParaMESH attached and it therefore recreates one. It therefore takes ownership over _support. The component topology associated with the field is a basic one (all components on the same processor).

References MEDCoupling::ParaMESH::getTopology(), MEDCoupling::RefCountObjectOnly::incrRef(), and MEDCoupling::ComponentTopology::nbLocalComponents().

◆ ~ParaFIELD()

MEDCoupling::ParaFIELD::~ParaFIELD ( )
virtual

References release().

Member Function Documentation

◆ release()

void MEDCoupling::ParaFIELD::release ( )

Destructor involves MPI operations: make sure this is accessible from a proper method for Python wrapping.

References MEDCoupling::RefCountObjectOnly::decrRef().

Referenced by ~ParaFIELD().

◆ synchronizeTarget()

◆ synchronizeSource()

◆ getField()

◆ setOwnSupport()

◆ returnCumulativeGlobalNumbering()

DataArrayIdType * MEDCoupling::ParaFIELD::returnCumulativeGlobalNumbering ( ) const

This method returns, if it exists, an array with only one component and as many as tuples as _field has. This array gives for every element on which this->_field lies, its global number, if this->_field is nodal. For example if _field is a nodal field : returned array will be the nodal global numbers. The content of this method is used to inform Working side to accumulate data received by lazy side.

References MEDCoupling::ParaMESH::getGlobalNumberingNodeDA(), MEDCoupling::MEDCouplingField::getTypeOfField(), MEDCoupling::ON_CELLS, and MEDCoupling::ON_NODES.

◆ returnGlobalNumbering()

◆ getTopology()

Topology* MEDCoupling::ParaFIELD::getTopology ( ) const

◆ getSupport()

ParaMESH* MEDCoupling::ParaFIELD::getSupport ( ) const

◆ nbComponents()

int MEDCoupling::ParaFIELD::nbComponents ( ) const

◆ getVolumeIntegral()

double MEDCoupling::ParaFIELD::getVolumeIntegral ( int  icomp,
bool  isWAbs 
) const

◆ getL2Norm()

double MEDCoupling::ParaFIELD::getL2Norm ( ) const