org.keridwen.modelling.mesh.inspector.analysers
Class MeshAnalyser

java.lang.Object
  extended by org.keridwen.modelling.mesh.inspector.analysers.MeshAnalyser
All Implemented Interfaces:
Comparable, MeshAnalyserInterface
Direct Known Subclasses:
BorderCellLocator, CellVolumeAnalyser, EtaQualityAnalyser, RhoQualityAnalyser

public abstract class MeshAnalyser
extends Object
implements MeshAnalyserInterface

Abstract analyser class, in order to provide a generic probing tool for the mesh. All specific analyser, implementing a given quality evaluation subroutine or a validation test on the mesh should be derived from this class and implement the MeshAnalyserInterface interface. The analyser should be linked to the mesh to be analysed. Each analyser is identified by the ANALYSER_TYPE number. This is the value used in the controler of the Mesh Inspector to select the used/current analyser. The result is returned through an analysis object, implementing the MeshAnalysisInterface interface, that can then be used for various plotting and/or post-processing.

Author:
Julien Forest, ARTENUM SARL

Field Summary
 int ANALYSER_TYPE
          set the analyser type
protected  GenericAnalysis analysis
           
 String DATA_ARRAY_NAME
           
 Boolean HISTROGRAM_ENABLE
           
protected  HashMap inputParameters
           
protected  com.artenum.penelope.mesh.interfaces.Mesh mesh
           
protected  String name
           
protected  HashMap outputParameters
           
 
Constructor Summary
MeshAnalyser()
           
 
Method Summary
 Object analyseAndBuildVtkDataSet()
          return a vtk data set with the quality value mapped on it.
 GenericAnalysis analyseMesh()
          perform the analysis of the mesh and return the result under the form of an analysis object.
 float[][] computeDistributionFunction(int samplingLevel, boolean normalise)
          Compute the distribution function (i.e histogram) of the quality level distribution over the mesh.
 GenericAnalysis getAnalysis()
          Return the current result of the analysis.
 HashMap getInputParameters()
          return the input parameters
 com.artenum.penelope.mesh.interfaces.Mesh getMesh()
          get the mesh on which one the analysis is performed.
 String getName()
           
 HashMap getOutputParameters()
          return the output parameter of the current analyser.
 void printAnalysis()
          print the result of the analysis.
 void setAnalysis(GenericAnalysis analysis)
          Set the output analysis object in which one the results should be stored.
 void setInputParameters(HashMap inputParameters)
          set the input parameters.
 void setMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
          set the mesh object on wich on the analysis should be performed.
 void setName(String name)
          set the nem of the current analyser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.keridwen.modelling.mesh.inspector.interfaces.MeshAnalyserInterface
probeCell
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

ANALYSER_TYPE

public int ANALYSER_TYPE
set the analyser type


DATA_ARRAY_NAME

public String DATA_ARRAY_NAME

HISTROGRAM_ENABLE

public Boolean HISTROGRAM_ENABLE

mesh

protected com.artenum.penelope.mesh.interfaces.Mesh mesh

name

protected String name

analysis

protected GenericAnalysis analysis

inputParameters

protected HashMap inputParameters

outputParameters

protected HashMap outputParameters
Constructor Detail

MeshAnalyser

public MeshAnalyser()
Method Detail

getInputParameters

public HashMap getInputParameters()
return the input parameters


setInputParameters

public void setInputParameters(HashMap inputParameters)
set the input parameters. Parameters are defined through a hashmap object on the basis (key, value). The detailed structure of this hashmap may differ from an analyser to another one.

Specified by:
setInputParameters in interface MeshAnalyserInterface

getOutputParameters

public HashMap getOutputParameters()
return the output parameter of the current analyser. The corresponding implementation may differ from one analyser to another one.

Specified by:
getOutputParameters in interface MeshAnalyserInterface
Returns:
the control parameters of the analyser.

setName

public void setName(String name)
set the nem of the current analyser


getName

public String getName()

getAnalysis

public GenericAnalysis getAnalysis()
Description copied from interface: MeshAnalyserInterface
Return the current result of the analysis. This method do not call the analyseMesh method and the analysis may not be computed and/or up-to-date. To update the analysis call the analyseMesh method before.

Specified by:
getAnalysis in interface MeshAnalyserInterface
Returns:
Analysis object implementing the GenericAnalysis interface.

setAnalysis

public void setAnalysis(GenericAnalysis analysis)
Set the output analysis object in which one the results should be stored. Normally this method has not be to be used, the default constructor of the

Specified by:
setAnalysis in interface MeshAnalyserInterface

getMesh

public com.artenum.penelope.mesh.interfaces.Mesh getMesh()
get the mesh on which one the analysis is performed.


setMesh

public void setMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
set the mesh object on wich on the analysis should be performed.

Specified by:
setMesh in interface MeshAnalyserInterface

computeDistributionFunction

public float[][] computeDistributionFunction(int samplingLevel,
                                             boolean normalise)
Compute the distribution function (i.e histogram) of the quality level distribution over the mesh. This gives a global information of the quality for the whole mesh. NB: The distribution function is re-normalised if the normalise factor is set at true.


printAnalysis

public void printAnalysis()
print the result of the analysis. The analyseMesh method should be called before.

Specified by:
printAnalysis in interface MeshAnalyserInterface

analyseAndBuildVtkDataSet

public Object analyseAndBuildVtkDataSet()
return a vtk data set with the quality value mapped on it.

Specified by:
analyseAndBuildVtkDataSet in interface MeshAnalyserInterface
Returns:
a vtkDataSet of the analysed mesh with the quality factor.

analyseMesh

public GenericAnalysis analyseMesh()
perform the analysis of the mesh and return the result under the form of an analysis object. The corresponding dataArray has the name defined in DATA_ARRAY_NAME.

Specified by:
analyseMesh in interface MeshAnalyserInterface
Returns:
This method should return the result of the analysis under an object implementing the GenericAnalysis interface.


Copyright © 2013 Artenum. All Rights Reserved.