Version: 5.1.6

multipr.DecimationFilterGradAvg Class Reference

#include <MULTIPR_DecimationFilter.hxx>

Inheritance diagram for multipr.DecimationFilterGradAvg:
Inheritance graph

Public Member Functions

 DecimationFilterGradAvg ()
 Builds an empty DecimationFilterGradAvg (default constructor).
virtual ~DecimationFilterGradAvg ()
 Destructor.
virtual Meshapply (Mesh *pMesh, const char *pArgv, const char *pNameNewMesh)
 Creates a new Mesh by decimating the given Mesh with this DecimationFilter.
void getGradientInfo (Mesh *pMesh, const char *pFieldName, int pFieldIt, double pRadius, int pBoxing, double *pOutGradMin, double *pOutGradAvg, double *pOutGradMax)
 Returns information about gradient.
med_float computeNormGrad (const PointOfField &pPt, const std::vector< PointOfField > &pNeighbours) const
 Returns the norm of the gradient of the field at the given point.
 DecimationFilterGradAvg (const DecimationFilterGradAvg &)
DecimationFilterGradAvgoperator= (const DecimationFilterGradAvg &)
bool operator== (const DecimationFilterGradAvg &)

Constructor & Destructor Documentation

multipr.DecimationFilterGradAvg::DecimationFilterGradAvg (  ) 

Builds an empty DecimationFilterGradAvg (default constructor).

multipr.DecimationFilterGradAvg::~DecimationFilterGradAvg (  )  [virtual]

Destructor.

Removes everything.

multipr.DecimationFilterGradAvg.DecimationFilterGradAvg ( const DecimationFilterGradAvg  ) 

Member Function Documentation

Mesh * multipr.DecimationFilterGradAvg::apply ( Mesh pMesh,
const char *  pArgv,
const char *  pNameNewMesh 
) [virtual]

Creates a new Mesh by decimating the given Mesh with this DecimationFilter.

For each element Keep this element if all its points (related to a field) have a |gradient| > threshold.

For each point, gradient is computed by considering all the neighbours in a sphere of radius r.

Parameters:
pMesh any mesh to be decimated; must not be NULL.
pArgv all the arguments of the filter as a string; must not be NULL. for GradAvg, expected "fieldName fieldIt threshold radius boxing" (5 parameters).
pNameNewMesh name of the decimated mesh; must not be NULL.
Returns:
the decimated mesh.

Implements multipr.DecimationFilter.

References multipr.DecimationFilterGradAvg.computeNormGrad(), multipr.DecimationAccel.configure(), multipr.DecimationAccel.create(), multipr.Mesh.createFromSetOfElements(), multipr.eMaxMedMesh, multipr.Elements.extractSubSetFromNodes(), MED_test2.field, Med_Gen_test.fieldName, multipr.DecimationAccel.findNeighbours(), multipr.Mesh.getAllPointsOfField(), multipr.Mesh.getElements(), multipr.Mesh.getFieldByName(), multipr.Mesh.getNodes(), multipr.Mesh.getNumberOfElements(), multipr.Nodes.getNumberOfNodes(), multipr.Field.getNumberOfTimeSteps(), multipr.Mesh.getProfil(), multipr.Field.getProfil(), multipr.Profil.getSet(), multipr.Field.isFieldOnNodes(), MED_TAILLE_NOM, multipr.PointOfField.mXYZ, NULL, and testMEDMEM.ret.

void multipr.DecimationFilterGradAvg::getGradientInfo ( Mesh pMesh,
const char *  pFieldName,
int  pFieldIt,
double  pRadius,
int  pBoxing,
double pOutGradMin,
double pOutGradAvg,
double pOutGradMax 
)
med_float multipr.DecimationFilterGradAvg::computeNormGrad ( const PointOfField pPt,
const std::vector< PointOfField > &  pNeighbours 
) const

Returns the norm of the gradient of the field at the given point.

Sub-method used by apply().

Parameters:
pPt any point in the field.
pNeigbours neighbourhood of pPt.
Returns:
the norm of the gradient of the field in pPt.

References multipr.PointOfField.mVal, multipr.PointOfField.mXYZ, and med_test1.norm.

DecimationFilterGradAvg& multipr.DecimationFilterGradAvg.operator= ( const DecimationFilterGradAvg  ) 

Reimplemented from multipr.DecimationFilter.

bool multipr.DecimationFilterGradAvg.operator== ( const DecimationFilterGradAvg  ) 

Reimplemented from multipr.DecimationFilter.