Back to index

salome-med  6.5.0
Nature of a field

Overview: intensive and extensive field

NatureOfField is an enum which helps determining some physical significance of the field and affects the choice of interpolation formula ( see Summary). It has five possible values:

By an intensive field we mean a field that represent volumetric or intensive physical variable such as density ( $kg.m^{-3}$), power density ( $W.m^{-3}$), temperature ( $K$) or pressure ( $Pa$). By extensive (or integral) field we mean a field that represents an extensive physical quantity sych as mass ( $kg$), volume ( $m^3$), a momentum ( $kg.m.s^{-1}$) or power $(W$). For fields with a P0 representation, conservativity formulas are different depending on whether the field is extensive or intensive (see cell-cell (P0->P0) conservative remapping of intensive fields and cell-cell (P0->P0) conservative remapping of extensive fields). In some cases such a non overlapping meshes, it is impossible to fulfill both conservation and maximum principle during the interpolation. The nature of the fields determines the formula to be used for non overlapped cells and thus the property that we will be satisfied. We consider that fields with P1 or P2 representations are necessarily intensive.


In order to employ the various Interpolation tools, it is important to specify the nature of your field. In case the sources and target meshes do not overlap different treatments will be employed, depending on the nature of the source and target fields. You can specify the nature of the field when you create a MEDCoupling field with the following constructor:

MEDCouplingFieldDouble(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type);

If you read or copy an already existing field, or later after its creation, you may want to change/set its nature. In order to do so, you can use the function

void setNature(NatureOfField nat);

Here is an example

const char sourceFileName[]="";
MEDCouplingFieldDouble <em>sourceField=MEDLoader::ReadFieldCell(sourceFileName,"Source_Mesh",0,"Density",/*iteration</em>/0,/*order*/0);
const char targetFileName[]="";
MEDCouplingUMesh *med_target_mesh=MEDLoader::ReadUMeshFromFile(targetFileName,"Target_Mesh",0);