// Project MULTIPR, IOLS WP1.2.1 - EDF/CS // Partitioning/decimation module for the SALOME v3.2 platform // // MULTIPR.idl // // Interface CORBA for the MULTIPR module // // Author: Olivier LE ROUX - CS, Virtual Reality Dpt // // Date: 01/2007 // #ifndef __MULTIPR_INTERFACE_CORBA__ #define __MULTIPR_INTERFACE_CORBA__ #include "SALOME_Exception.idl" #include "SALOME_Component.idl" #include "SALOME_GenericObj.idl" #include "SALOMEDS.idl" // to access study /*! \ingroup MULTIPR * * This package contains the interface MULTIPR_ORB used for %MULTIPR component. */ module MULTIPR_ORB { typedef sequence string_array; //************************************************************************* // Interface of the %MULTIPR component used to manage partition/decimation //************************************************************************* interface MULTIPR_Obj { //--------------------------------------------------------------------- // Basic accessors/mutators //-------------------------------------------------------------------- /*! * Return true iff this obj represents a valid sequential MED file. */ boolean isValidSequentialMEDFile(); /*! * Return true iff this obj represents a valid distributed MED file. */ boolean isValidDistributedMEDFile(); /*! * Set the mesh to be partitionned/decimated. * Assume sequential MED file. */ void setMesh(in string meshName) raises (SALOME::SALOME_Exception); /*! * Set the boxing parameter used for decimation (100 by default). */ void setBoxing(in long boxing) raises (SALOME::SALOME_Exception); /*! * Return the list of meshes contained in the associated MED file. */ string_array getMeshes() raises (SALOME::SALOME_Exception); /*! * Return the list of fields contained in the current mesh of the associated MED file. */ string_array getFields() raises (SALOME::SALOME_Exception); /*! * Return the number of iterations for a given field. */ long getTimeStamps(in string fieldName) raises (SALOME::SALOME_Exception); /*! * Return the name of all partitions. * Assume this object encapsulates a distributed MED file. */ string_array getParts() raises (SALOME::SALOME_Exception); /*! * Return all information about a part. * Assume this object encapsulates a distributed MED file. */ string getPartInfo(in string partName) raises (SALOME::SALOME_Exception); //--------------------------------------------------------------------- // Algorithms //-------------------------------------------------------------------- /*! * Create a distributed MED file (v2.3) by extracting all the groups from the current mesh of the current MED sequential MED file. * Assume: * - the file is in MED format and can be read using MED file v2.3. * - the file is sequential (not a distributed MED). * - the file only contains TETRA10 elements (dimension of space and mesh is 3). * - the file have no profil. * \return the name of each part. */ string_array partitionneDomaine() raises (SALOME::SALOME_Exception); /*! * Create a distributed MED file (V2.3) by splitting a group of a MED file previously created by partitionneDomaine. * Assume: * - the file is a distributed MED file, previously created by partitionneDomaine() * (=> each part only contain 1 mesh, TETRA10 elements only) * - nbPart > 1 * - partitionner METIS=0 or SCOTCH=1 * \return the name of each part. */ string_array partitionneGrain( in string partName, in long nbParts, in long partitionner) raises (SALOME::SALOME_Exception); /*! * Create 3 resolutions of the given part of a distributed MED file (V2.3). * Assume: * - the file is a distributed MED file, previously created by partitionneDomaine() or partitionneGrain() * (=> each part only contain 1 mesh, TETRA10 elements only) */ string_array decimePartition( in string partName, in string fieldName, in long fieldIt, in string filterName, in double tmed, in double tlow, in double radius) raises (SALOME::SALOME_Exception); /*! * Return useful information to configure decimation parameters. * Depends on part, field and filter: generic operation. */ string evalDecimationParams( in string partName, in string fieldName, in long fieldIt, in string filterName, in string filterParams) raises (SALOME::SALOME_Exception); /*! * Remove all the parts starting with the given prefix from the distributed MED file. * Assume this object encapsulates a distributed MED file. */ void removeParts(in string prefixPartName) raises (SALOME::SALOME_Exception); //--------------------------------------------------------------------- // i/o //-------------------------------------------------------------------- /*! * Save the current distributed MED file to disk. */ void save() raises (SALOME::SALOME_Exception); }; // interface MULTIPR_Obj //************************************************************************* // Interface of the %MULTIPR component; used to create MULTIPR_Obj object // and to define high level API. //************************************************************************* interface MULTIPR_Gen : Engines::Component { /*! * Return the version of the MULTIPR library. */ string getVersion() raises (SALOME::SALOME_Exception); //------------------------------------------------------------------------ // High level API // Directly apply one of the 3 main operations of the MULTIPR module on a MED file //------------------------------------------------------------------------ /*! * Create a distributed MED file (v2.3) by extracting all the groups from the mesh of a sequential MED file. * High level function. */ void partitionneDomaine( in string medFilename, in string meshName) raises (SALOME::SALOME_Exception); /*! * Create a distributed MED file (V2.3) by splitting a group of a MED file previously created by partitionneDomaine(). * High level function. */ void partitionneGrain( in string medFilename, in string partName, in long nbParts, in long partitionner) // 0=METIS 1=SCOTCH raises (SALOME::SALOME_Exception); /*! * Creates 3 resolutions of the given part of a distributed MED file (V2.3). * High level function. */ void decimePartition( in string medFilename, in string partName, in string fieldName, in long fieldIt, in string filterName, in double tmed, in double tlow, in double radius, in long boxing) raises (SALOME::SALOME_Exception); //------------------------------------------------------------------------ // Low level API // Create an object to encapsulate a MED file. //------------------------------------------------------------------------ /*! * Create a MULTIPR_Obj object which encapsulate a MED file. */ MULTIPR_Obj getObject(in string medFilename) raises (SALOME::SALOME_Exception); }; // interface MULTIPR_Gen }; // module MULTIPR_ORB #endif // __MULTIPR_INTERFACE_CORBA__