Version: 6.5.0
Functions
MEDMEM::MEDMEM_REMAPPER

Functions

 MEDMEM_REMAPPER::MEDMEM_REMAPPER ()
virtual MEDMEM_REMAPPER::~MEDMEM_REMAPPER ()
int MEDMEM_REMAPPER::prepare (const MEDMEM::MESH &source_mesh, const MEDMEM::MESH &target_mesh, const char *method)
void MEDMEM_REMAPPER::transfer (const MEDMEM::FIELD< double > &source_field, MEDMEM::FIELD< double > &target_field)
void MEDMEM_REMAPPER::reverseTransfer (MEDMEM::FIELD< double > &source_field, const MEDMEM::FIELD< double > &target_field)
MEDMEM::FIELD< double > * MEDMEM_REMAPPER::transferField (const MEDMEM::FIELD< double > &source_field)
MEDMEM::FIELD< double > * MEDMEM_REMAPPER::reverseTransferField (const MEDMEM::FIELD< double > &target_field)
int MEDMEM_REMAPPER::setOptionDouble (const std::string &key, double value)
int MEDMEM_REMAPPER::setOptionInt (const std::string &key, int value)
int MEDMEM_REMAPPER::setOptionString (const std::string &key, std::string &value)
void MEDMEM_REMAPPER::printMatrixInfo ()

Detailed Description

Overview

MEDMEM_REMAPPER enables conservative remapping of fields between two sequential codes. The computation is possible for 3D meshes and 2D meshes or 3D surfaces. It enables fast sequential localization, based on a bounding box tree structure. It is based on cell-cell intersection or on a point in element search, depending on the field type. Fields can either lie on cells (P0) or nodes (P1).

A typical use of MEDMEM_REMAPPER encompasses two distinct phases :

The following code excerpt illutrates a typical use of the MEDMEM_REMAPPER class.

...
std::string sourceFileName("source.med");
MEDMEM::MESH med_source_mesh(MED_DRIVER,sourceFileName,"Source_Mesh");
std::string targetFileName("target.med");
MEDMEM::MESH med_target_mesh(MED_DRIVER,targetFileName,"Target_Mesh");
FIELD<double> sourceField(MED_DRIVER,sourceFileName,"Density",0,0);
FIELD<double> targetField;
MEDMEM_Remapper mapper;
mapper.setOptionsDouble("Precision",1e-7);
mapper.setOptionsString("Intersection_type",Geometric2D);
mapper.prepare(med_source_mesh,med_target_mesh,"P0P1");
mapper.transfer(sourceField,targetField);
//use targetField
...

Function Documentation

MEDMEM_REMAPPER::MEDMEM_REMAPPER ( )
MEDMEM_REMAPPER::~MEDMEM_REMAPPER ( )
virtual
int MEDMEM_REMAPPER::prepare ( const MEDMEM::MESH mesh_source,
const MEDMEM::MESH mesh_target,
const char *  method 
)

This method computes the intersection matrix between source mesh_source and mesh_target. It is a preliminary step that is necessary before calling the transfer() method. The method analyses the dimensions of the meshes and checks for compatibility.

References MEDMEM::MESH::getMeshDimension(), MEDMEM::GMESH::getSpaceDimension(), and INTERP_KERNEL::Interpolation3D::interpolateMeshes().

void MEDMEM_REMAPPER::transfer ( const MEDMEM::FIELD< double > &  source_field,
MEDMEM::FIELD< double > &  target_field 
)
void MEDMEM_REMAPPER::reverseTransfer ( MEDMEM::FIELD< double > &  source_field,
const MEDMEM::FIELD< double > &  target_field 
)
MEDMEM::FIELD< double > * MEDMEM_REMAPPER::transferField ( const MEDMEM::FIELD< double > &  source_field)
MEDMEM::FIELD< double > * MEDMEM_REMAPPER::reverseTransferField ( const MEDMEM::FIELD< double > &  target_field)
int MEDMEM_REMAPPER::setOptionDouble ( const std::string &  key,
double  value 
)
int MEDMEM_REMAPPER::setOptionInt ( const std::string &  key,
int  value 
)
int MEDMEM_REMAPPER::setOptionString ( const std::string &  key,
std::string &  value 
)
void MEDMEM_REMAPPER::printMatrixInfo ( )
Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS