1 // Project MULTIPR, IOLS WP1.2.1 - EDF/CS
2 // Partitioning/decimation module for the SALOME v3.2 platform
5 * \file MULTIPR_API.hxx
7 * \brief Main header of the high level MULTIPR API.
9 * \author Olivier LE ROUX - CS, Virtual Reality Dpt
14 #ifndef MULTIPR_API_HXX
15 #define MULTIPR_API_HXX
29 }; // enum Partitionner
33 * \fn const char* getVersion()
34 * \brief returns the current version of the MULTIPR API.
35 * \return the current version of the MULTIPR API.
37 const char* getVersion();
41 * \fn void partitionneDomaine(const char* medFilename, const char* meshName)
42 * \brief creates a distributed MED file (v2.3) by extracting all the groups from the mesh of a sequential MED file.
44 * - the file is in MED format and can be read using MED file v2.3.
45 * - the file is sequential (not a distributed MED).
46 * - the file only contains TETRA10 elements (dimension of space and mesh is 3).
47 * - the file have no profil.
48 * \param medFilename filename of any valid sequential MED file with TETRA10 elements only.
49 * \param meshName name of the mesh to be distributed.
50 * \throw RuntimeException if any error occurs.
52 void partitionneDomaine(
53 const char* medFilename,
54 const char* meshName);
58 * \fn void partitionneGroupe(const char* medFilename, const char* groupName, int nbParts, int partitionner)
59 * \brief creates a distributed MED file (V2.3) by splitting a group of a MED file previously created by partitionneDomaine.
61 * - the file is a distributed MED file, previously created by partitionneDomaine()
62 * (=> each part only contain 1 mesh, TETRA10 elements only)
64 * \param medFilename filename of any valid distributed MED file previously created by partitionneDomaine().
65 * \param partName name of the part to be splitted.
66 * \param nbParts number of parts; must be > 1.
67 * \param partitionner use value MULTIPR_METIS for Metis or MULTIPR_SCOTCH for Scotch.
68 * \throw RuntimeException if any error occurs.
70 void partitionneGroupe(
71 const char* medFilename,
74 int partitionner=MULTIPR_METIS);
78 * \fn void decimePartition(const char* medFilename, const char* partName, const char* fieldName, int fieldIt, const char* filterName, double tmed, double tlow, double radius);
79 * \brief creates 3 resolutions of the given part of a distributed MED file (V2.3).
81 * - the file is a distributed MED file, previously created by partitionneDomaine() or partitionneGroupe()
82 * (=> each part only contain 1 mesh, TETRA10 elements only)
83 * \param medFilename filename of any valid distributed MED file previously created by partitionneDomaine or partitionneGroupe.
84 * \param partName name of the part to be decimated.
85 * \param fieldName name of the field used for decimation.
86 * \param fieldIt iteration (time step) of the field.
87 * \param filterName name of the filter to be used.
88 * \param tmed threshold used for medium resolution.
89 * \param tlow threshold used for low resolution; tmed must be less than tlow
90 * \param radius radius used to determine the neighbourhood.
91 * \param boxing number of cells along each axis; must be >= 1; e.g. if 100 then acceleration grid will have 100*100*100 = 10**6 cells.
92 * \throw RuntimeException if any error occurs.
95 const char* medFilename,
97 const char* fieldName,
99 const char* filterName,
100 const char* filterParams);
104 * \fn void merge(...);
105 * \brief merge a list of sequential MED file if possible.
106 * \param medFilenameSrc list of source file (sequential MED files).
107 * \param meshName name of the mesh (all mesh must have the same name).
108 * \param fieldName name of the field to merge (if NULL, merge all fields).
109 * \param medFilenameDst destination file.
110 * \return 1 if a mesh has been generated, 0 otherwise (e.g. if all the sources are empty meshes).
111 * \throw RuntimeException if any error occurs.
114 std::vector<std::string> medFilenameSrc,
115 const char* meshName,
116 const char* fieldName,
117 const char* medFilenameDst);
120 } // namespace MULTIPR
123 #endif // MULTIPR_API_HXX