Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 (TypeOfField type, TypeOfTimeDiscretization td, ParaMESH *mesh, const ComponentTopology &component_topology)
 
 ParaFIELD (MEDCouplingFieldDouble *field, ParaMESH *sup, const ProcessorGroup &group)
 
DataArrayIntreturnCumulativeGlobalNumbering () const
 
DataArrayIntreturnGlobalNumbering () 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

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::MEDCouplingFieldDouble::New(), MEDCoupling::DataArrayDouble::New(), MEDCoupling::MEDCouplingFieldT< T >::setArray(), MEDCoupling::MEDCouplingField::setDescription(), MEDCoupling::MEDCouplingField::setMesh(), MEDCoupling::MEDCouplingField::setName(), and MEDCoupling::ProcessorGroup::size().

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().

MEDCoupling::ParaFIELD::~ParaFIELD ( )
virtual

Member Function Documentation

void MEDCoupling::ParaFIELD::setOwnSupport ( bool  v) const
DataArrayInt * 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 recieved by lazy side.

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

Topology* MEDCoupling::ParaFIELD::getTopology ( ) const
ParaMESH* MEDCoupling::ParaFIELD::getSupport ( ) const
int MEDCoupling::ParaFIELD::nbComponents ( ) const
double MEDCoupling::ParaFIELD::getVolumeIntegral ( int  icomp,
bool  isWAbs 
) const
double MEDCoupling::ParaFIELD::getL2Norm ( ) const