#include <SALOMEconfig.h>
#include <map>
#include CORBA_SERVER_HEADER(FILTER_Gen)
-#include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
+
+#include "utilities.h"
+#include "MEDMEM_Med.hxx"
+#include "Utils_SALOME_Exception.hxx"
#include "SALOME_Component_i.hxx"
#include "SALOME_NamingService.hxx"
-#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
-
class Filter_Gen_i:
public POA_SALOME_FILTER::FILTER_Gen,
public Engines_Component_i
{
-private:
-
public:
Filter_Gen_i();
Filter_Gen_i(CORBA::ORB_ptr orb,
const char *interfaceName);
virtual ~Filter_Gen_i();
+ void loadMED(const char* inMedFile);
+ void unloadMED();
+ SALOME_FILTER::StrSeq* getMeshNames();
+ SALOME_FILTER::StrSeq* getFieldNames();
+ CORBA::Long getMeshDimension(const char* meshName);
+ CORBA::Long getFieldEntity(const char* fieldName,CORBA::Long dt,CORBA::Long it);
+ CORBA::Boolean fieldIsOnAllElements(const char* fieldName,CORBA::Long dt,CORBA::Long it);
+ SALOME_FILTER::DTITSeq* getFieldIteration(const char* fieldName);
+ char* getMeshName(const char* fieldName,CORBA::Long dt,CORBA::Long it);
+ void readReferenceField(const char* meshName, const char* fieldName, CORBA::Long ts);
+ void buildGradient() throw(SALOME_FILTER::FILTER_Gen::FilterError);
+ void getMinMax(CORBA::Double& imin, CORBA::Double& imax,SALOME_FILTER::ref_func rf);
+ SALOME_FILTER::LongSeq* getHistogram(CORBA::Long size,SALOME_FILTER::ref_func rf);
+ void generateCriteria(CORBA::Long nbthresh,CORBA::Double fthresh,CORBA::Double thresh,CORBA::Boolean areaFlag,SALOME_FILTER::ref_func rf) throw(SALOME_FILTER::FILTER_Gen::FilterError);
+ void createEnsightInputFiles() throw(SALOME_FILTER::FILTER_Gen::FilterError);
+ void filtering() throw(SALOME_FILTER::FILTER_Gen::FilterError);
+ void projectFieldsOnDecimateMesh() throw(SALOME_FILTER::FILTER_Gen::FilterError);
+ void createMedOutputFile(const char* outMedFile);
private :
+ void readMapping();
+ int getNodeNumber(int);
+ int getNeighbourVertex(int) throw(SALOME_Exception);
+
static Filter_Gen_i* _FILTERGen; // Point to last created instance of the class
- private:
bool _duringLoad;
SALOME_NamingService *_NS;
+
+ int _nbvmap;
+ int *_map;
+ int _connL;
+ const int *_conn;
+ const int *_connI;
+ string _file;
+
+ ::MEDMEM::MED *_med, *_newMed;
+ MESH* _mesh, *_newMesh;
+ FIELD<double> * _myGradient;
+ FIELD<double> * _myDField;
+ FIELD<int> * _myIField;
+ FIELD<int> *_criteria;
+
};
+extern "C"
+ PortableServer::ObjectId * FilterMEDEngine_factory(
+ CORBA::ORB_ptr orb,
+ PortableServer::POA_ptr poa,
+ PortableServer::ObjectId * contId,
+ const char *instanceName,
+ const char *interfaceName);
#endif