From 561cf5020392d3f3df22fce3bcfa5a5224f528bf Mon Sep 17 00:00:00 2001 From: nadir Date: Fri, 19 May 2006 13:23:04 +0000 Subject: [PATCH] updating the debug branch of the V3_2_0b1 version with the new Alliances med test files; with Python scripts to test them as well as the MEDMEM source files to correct minor bugs found using those Alliances med test files. The Med Memory doc was as well updated. --- doc/MEDMEM/FIELDcreate.cxx | 19 - doc/MEDMEM/FIELDgeneral.cxx | 19 - doc/MEDMEM/MEDMEM_Content.tex.in | 869 ++++++++++++++++++ ...MEM_InvokingDriverAtObjectCreationTime.cxx | 19 - ..._InvokingDriverByAttachingItToAnObject.cxx | 19 - ...InvokingDriverFromStandardObjectMethod.cxx | 19 - .../MEDMEM_MedAddingAnExistingObject.cxx | 19 - doc/MEDMEM/MEDMEM_UML.dia | Bin 1846 -> 0 bytes doc/MEDMEM/MEDMEM_UML.png.in | Bin 0 -> 6379 bytes doc/MEDMEM/MEDMEM_UML_light.png.in | Bin 0 -> 3829 bytes doc/MEDMEM/MEDMEM_UsersGuide.tex.in | 697 +------------- doc/MEDMEM/MESHINGexample.cxx | 19 - doc/MEDMEM/MESHconnectivities.cxx | 19 - doc/MEDMEM/MESHcoordinates.cxx | 19 - doc/MEDMEM/MESHgeneral.cxx | 19 - doc/MEDMEM/Makefile.in | 28 +- 16 files changed, 902 insertions(+), 882 deletions(-) create mode 100644 doc/MEDMEM/MEDMEM_Content.tex.in delete mode 100644 doc/MEDMEM/MEDMEM_UML.dia create mode 100644 doc/MEDMEM/MEDMEM_UML.png.in create mode 100644 doc/MEDMEM/MEDMEM_UML_light.png.in diff --git a/doc/MEDMEM/FIELDcreate.cxx b/doc/MEDMEM/FIELDcreate.cxx index ca0706467..d8375e073 100644 --- a/doc/MEDMEM/FIELDcreate.cxx +++ b/doc/MEDMEM/FIELDcreate.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// using namespace std; #include "MEDMEM_Mesh.hxx" #include "MEDMEM_Field.hxx" diff --git a/doc/MEDMEM/FIELDgeneral.cxx b/doc/MEDMEM/FIELDgeneral.cxx index 82771051a..0e3dd4769 100644 --- a/doc/MEDMEM/FIELDgeneral.cxx +++ b/doc/MEDMEM/FIELDgeneral.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// using namespace std; #include "MEDMEM_Mesh.hxx" #include "MEDMEM_Field.hxx" diff --git a/doc/MEDMEM/MEDMEM_Content.tex.in b/doc/MEDMEM/MEDMEM_Content.tex.in new file mode 100644 index 000000000..e0e9dd9bd --- /dev/null +++ b/doc/MEDMEM/MEDMEM_Content.tex.in @@ -0,0 +1,869 @@ +% ___________________________________________________________________________ +% | | +% | DEBUT DU TEXTE | +% |___________________________________________________________________________| + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\chapter{Introduction} +\section{Rationale for Med Memory} +The Med data exchange model (DEM in proper english) is the format used in the +Salome platform for communicating data between different components. It +manipulates objects that describe the meshes underlying scientific +computations and the value fields lying on these meshes. This data exchange +can be achieved either through files using the Med-file formalism or directly +through memory with the Med Memory (\verb+MEDMEM+) library. + +The Med libraries are oganized in multiple layers: +\begin{itemize} +\item The MED file layer : C and Fortran API to implement mesh and field +persistency. +\item The MED Memory level C++ API to create and manipulate mesh and field +objects in memory. +\item Python API generated using SWIG which wraps the complete C++ API of the +MED Memory +\item CORBA API to simplify distributed computation inside SALOME (Server +Side). +\item MED Client classes to simplify and optimize interaction of distant +objects within the local solver. +\end{itemize} + +Thanks to Med Memory, any component can access a distant +mesh or field object. Two codes running on +different machines can thus exchange meshes and fields. +These meshes and fields can easily be read/written in a Med file +format, enabling access to the whole Salome suite of tools +(CAD, meshing, Visualization, other components). + +\section{Outline} + +In this document, we describe the API of the Med Memory library (available in +C++ and in Python). This document is intended for developers who are in charge +of integrating existing applications in the Salome platform. + +As will be seen in section \ref{sec:objects}, the API consists +of very few classes: +\begin{itemize} +\item a general MED container, +\item meshes, +\item supports and derived classes, +\item fields +\item drivers for reading and writing in MED, GIBI and VTK files. +\end{itemize} + +All these are detailed in the following sections. The C++ +formalism will be used for the description in these sections. + Python syntax is very similar and is given in + appendix \ref{app:python}. + +\section{Naming conventions} +The naming conventions are rather straightforward, but +the reader used to the MED-file semantics will find that +there are a few noticeable differences. +\begin{description} +\item[cell] entity of dimension equal to the mesh dimension ($1$, $2$ or $3$). +\item[component] in a field, represents a value that is available for each +element of the support (for instance : $T$, $v_x$, $\sigma_{xy}$)). +\item[connectivity (descending)] connectivity table expressing connectivity of +dimension $d$ elements in terms of list of dimension $d-1$ elements. +\item[connectivity (nodal)] connectivity table expressing connectivity of +dimension $d$ elements in terms of list of nodes. +\item[coordinates] in a mesh, coordinates can be described by strings giving +the names of the coordinates, the units of the coordinates, and the type of +coordinates ('CARTESIAN', 'SPHERICAL' or 'CYLINDRICAL'). +\item[description] string of characters used to describ an object without +giving any access to a query method. +\item[dimension] Med Memory discriminates the mesh dimension from the space +dimension (a surface shape in $3D$ will have $2$ as a mesh dimension). +\item[driver] object attached to a mesh or a field to read (resp. write) data +from (resp. to) a Med-file. +\item[edge] entity of dimension $1$ in a $2D$ mesh. +\item[element] elementary component of a mesh ($0D$, $1D$, $2D$ or $3D$). +\item[entity] category giving information on the dimension of elementary +components of meshes : node, edge, face (only in $3D$) or cell. +\item[face] for $3D$ meshes, faces are the $2D$ entities. +\item[family] support which is composed of a set of groups, which do not +intersect each other, and which gives access to those groups. +\item[field] array of integer, integer array, real or real array lying on a +support (the dimension of the array of values for each element of the support +is called the number of components). A field is uniquely defined by its name, +its support, its iteration number and its order number. $-1$ is the default +value of those two numbers. +\item[group] support with additional access to parent families. +\item[iteration number] information attached to a field that expresses the +number of the time step in the computation ($-1$ is its default value). +\item[name] information attached to a mesh, support or field to name it and access to it. +\item[node] entity of dimension $0$. +\item[order number] information attached to a field that expresses the number +of an internal iteration inside a time step in the computation ($-1$ is its +default value). +\item[support] list of elements of the same entity. +\item[type] category of an entity (triangle, segment, quadrangle, tetrahedron, +hexahedron, etc...). +\end{description} + +\chapter{Med Memory API}\label{sec:objects} + +\section{Conventions} + +\begin{itemize} +\item +In this document, one refers to the main user documentation \cite{RefManualMedMemory} +where the variable \verb+$MED_ROOT_DIR+ is the Med Memory directory installation. + +\item All numberings start at one (take care of array index !). + +\item When one gets a C (resp. C++) type array (resp. container) using a \texttt{get...} method, one should +not replace some value of it. Access is in read only. Other use may +product an impredicable result. To modify a such array (resp. container) use a \texttt{set...} +method. + +\item There are many couple of methods that have similar syntaxes (one singular and one +plural). The plural method returns an array and the singular one returns one +particular value in this array (see \method{double getCoordinate(int i)} and +\method{double* getCoordinates()} for example). + +\item Difference between local and global number in mesh element connectivity list~: when one talks about an +element number, one could see $i^{th}$ quadrangle ($i^{th}$ in quadrangles +array~: local numbering) or $j^{th}$ element ($j^{th}$ in all elements array~: +global numbering). These two numbering are equivalent only if one has only one +geometric type ; + +\end{itemize} + +\section{Namespaces} +Med Memory uses two namespaces : \verb+MEDMEM+ which is the general +namespace where the main classes are defined and \verb+MED_EN+ +which defines enums that can be used by an English-speaking +programer. + +\section{Classes} +At a basic usage level, the API consists in few classes which are located in +the \verb+MEDMEM+ C++ namespace : +\begin{description} +\item[MED] the global container; +\item[MESH] the class containing 2D or 3D mesh objects; +\item[SUPPORT] the class containing descriptions of list of elements; +\item[FIELD] the class template containing list of values lying on a +particular support. +\end{description} + +Figure \ref{fig:uml_light} gives a view of the UML diagram of the classes that +are sufficient for most integrations in the Salome platform, couplings using +the Med Memory libraries. With these classes, it is possible to : +\begin{itemize} +\item read/write meshes from MED-files; +\item create fields containing scalar or vectorial values on list of elements +of the mesh; +\item communicate these fields between different components; +\item read/write such fields. +\end{itemize} + +Note on this figure that the MED container controls the life cycle of all the +objects it contains : its destruction will destroy all the objects it +aggregates. On the other hand, the life cycle of mesh, support and field +objects are independent. Destroying a support will have no effect on the fields +which refer to it. + +\begin{center} +\begin{figure} +\includegraphics[width=15cm]{MEDMEM_UML_light.png} +\caption{UML diagram of basic Med Memory API classes.}\label{fig:uml_light} +\end{figure} +\end{center} + +A more advanced usage of the Med Memory is possible through other classes. +Figure \ref{fig:uml} gives a complete view of the Med Memory API. It includes : +\begin{description} +\item[GROUP] a class inherited from the SUPPORT class used to create supports +linked to mesh groups (restricted list of elements used for setting boundary +conditions, initial values or transferring data from one component to the +other); +\item[FAMILY] which is used to manipulate a certain kind of support and does +not intersect each other; +\item[MESHING] which builds meshes from scratch, it can be used to transform +meshes from a specific format to the MED format or to integrate a mesher +within Salome platform (note that class does not add element or node to a +mesh); +\item[Driver classes] which enable the user to get a fine control of the I/O +operations. +\end{description} + +\begin{center} +\begin{figure} +\includegraphics[width=15cm]{MEDMEM_UML.png} +\caption{UML diagram of Med Memory API classes.}\label{fig:uml} +\end{figure} +\end{center} + +\section{Enums} +A few enums are defined in the \verb+MED_EN+ namespace : +\begin{itemize} +\item The \verb+medGeometryElement+ enum which defines geometry types. The +available types are linear and quadratic elements (c.f. [DR??]). The +entries of the enum are quite self-explanatory : +\begin{itemize} +\item \verb+MED_NONE+ +\item \verb+MED_POINT1+ +\item \verb+MED_SEG2+ +\item \verb+MED_SEG3+ +\item \verb+MED_TRIA3+ +\item \verb+MED_QUAD4+ +\item \verb+MED_TRIA6+ +\item \verb+MED_QUAD8+ +\item \verb+MED_TETRA4+ +\item \verb+MED_PYRA5+ +\item \verb+MED_PENTA6+ +\item \verb+MED_HEXA8+ +\item \verb+MED_TETRA10+ +\item \verb+MED_PYRA13+ +\item \verb+MED_PENTA15+ +\item \verb+MED_HEXA20+ +\item \verb+MED_POLYGON+ +\item \verb+MED_POLYHEDRA+ +\item \verb+MED_ALL_ELEMENTS+ +\end{itemize} +\item +an enum which contains the different mesh entities, \verb+medEntityMesh+, the +entries of which being : +\begin{itemize} +\item \verb+MED_CELL+ +\item \verb+MED_FACE+ +\item \verb+MED_EDGE+ +\item \verb+MED_NODE+ +\item \verb+MED_ALL_ENTITIES+ +\end{itemize} +\item an enum which describes the way node coordinates or field values are +stored, +\begin{itemize} +\item \verb+MED_FULL_INTERLACE+ for arrays such that $x_1,y_1,z_1,x_2,y_2,z_2,\ldots,x_n,y_n,z_n$; +\item \verb+MED_NO_INTERLACE+ for arrays such that $x_1,x_2,\ldots,x_n,y_1,y_2,\ldots,y_n,z_1,z_2,\ldots,z_n$; +\item \verb+MED_UNDEFINED_INTERLACE+, the undefined interlacing mode. +\end{itemize} +\item +an enum which describes the type of connectivity +\begin{itemize} +\item \verb+MED_NODAL+ for nodal connectivity; +\item \verb+MED_DESCENDING+ for descending connectivity. +\end{itemize} +\end{itemize} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\chapter{How to use MED object} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{General Information} + +A typical use of this object is to mount in memory what is in a MED file (or +any type of driver in red or read/write mode) and it will manage its memory on +its own. Then from this object one can get some information such as~: + +\begin{itemize} +\item the number of meshes stored in this object using the +{\method{getNumberOfMeshes}}. +\item the number of fields stored in this object using the +{\method{getNumberOfFields}}. +\item a list of mesh names using the {\method{getMeshNames}}. +\item a list of field names using the {\method{getFieldNames}}. +\item a list of MESH object using the {\method{getMesh}} +\item a list of FIELD object using the {\method{getField}} +\item a list of SUPPORT object on all type of entities (node, cell, + face in 3d or edge on 2d) using the {\method{getSupport}}. +\end{itemize} + +The destructor of this object will destruct itself all FIELD, SUPPORT and MESH +objects; via its get method you will have a pointer on this object and you +should never delete it. + +One can add as well some MESH or FIELD object via the {\method{addMesh}} and +the {\method{addField}} respectively. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\chapter{How to use MESH object} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\section{General Information} + +We could get some general information about a MESH object such as~: + +\begin{itemize} +\item name (\method{getName}) +\item a description (\method{getDescription}) +\item the space dimension (\method{getSpaceDimension}) +\item the mesh dimension (\method{getMeshDimension}) +\end{itemize} +\fileCxx{MESHgeneral.cxx} + +\filePython{MESHgeneral.py} + +\section{Information about nodes} + +\begin{enumerate} +\item I want to get the number of nodes~: Really simple, use \method{getNumberOfNodes}. +\item I want to get the coordinates components names~: use \method{getCoordinatesNames} +which returns a string array (one string for each space dimension) +\item I want to get the coordinates components units~: use \method{getCoordinatesUnits} +which returns a string array (one string for each space dimension) +\item I want to get the coordinates system~: use \method{getCoordinatesSystem} +which returns a string (\verb+"CARTESIAN"+, \verb+"CYLINDRICAL"+ or \verb+"SPHERICAL"+). +\item I want to get the nodes coordinates~: use \method{getCoordinates} +which return a pointer to the coordinates array where values are interlace +or no. + +\textbf{Warning~:} + +\begin{itemize} +\item When we get coordinates in \verb+MED_NO_INTERLACE+ mode, we get an +array where values are ordered like (\verb+X1,X2,X..., Y1,Y..., Z1,Z...+). +\item When we get coordinates in \verb+MED_FULL_INTERLACE+ mode, we get +an array where values are ordered like (\verb+X1,Y1,Z1, X2,Y2,Z2, ...+). +\end{itemize} +\item I want to get one particular value of coordinate~: use \method{getCoordinate} +which returns the value of \( i^{th} \) node and \( j^{th} \) axis. +\end{enumerate} +\fileCxx{MESHcoordinates.cxx} + +\filePython{MESHcoordinates.py} + +\section{Information about cells} + +\begin{enumerate} +\item I want to get the number of geometric type for a mesh entity~: use +\method{getNumberOfTypes} + + +\textbf{C++ Example~:} + +\verb+int NumberOfCellsTypes = myMesh.getNumberOfTypes(MED_CELL);+ + +%%%%%%%%%%%%%%%%% +\item I want to get all geometric type for a mesh entity~: use +\method{getTypes} to get an array of \verb+medGeometryElement+ +(to use directly in others methods). + +\textbf{C++ Example~:} + +\verb+const medGeometryElement * Types = myMesh.getTypes(MED_CELL);+ + +(array is of size \verb+NumberOfCellsTypes+) + +\item I want to get the number of cells~: use \method{getNumberOfElements} +which return this information. You must give the mesh entity (\verb+MED_CELL+, +\verb+MED_FACE+, \verb+MED_EDGE+ or \verb+MED_NODE+) and a geometric +type of this entity. + + +\textbf{C++ Example~:} + +\verb+int NumberOfTriangle = myMesh.getNumberOfElements(MED_FACE,MED_TRIA3);+ + +\verb+int NumberOfFace = myMesh.getNumberOfElements(MED_FACE,MED_ALL_ELEMENT);+ + +\item I want to get the geometric type of one element~: use \method{getElementType} +which return a \verb+medGeometryElement+. + + +\textbf{C++ Example~:} + +\verb+medGeometryElement myType = myMesh.getElementType(MED_FACE,10);+ + +Return the \verb+medGeometryElement+ of \( 10^{th} \) face. + +\item I want to get a connectivity~: use \method{getConnectivity} which +return an array with connectivity values. + + +\label{getConnectivity} + +\textbf{C++ Example~:} + +\begin{verbatim} +int NumberOfTetrahedron = myMesh.getNumberOfElements(MED_CELL,MED_TETRA4); +const int * TetrahedronConnectivity = + myMesh.getConnectivity(MED_FULL_ENTERLACE, + MED_NODAL, + MED_CELL, + MED_TETRA4); +\end{verbatim} +\verb+TetrahedronConnectivity+ contain nodal connectivity +of tetrahedron in mesh. It is arranged in full enterlace mode and +its size is \verb+NumberOfTetrahedron x 4+. + +If you want to get connectivity of all elements (with \verb+Type=MED_ALL_ELEMENTS+), +you must use the index array (return by \method{getConnectivityIndex}) +to get connectivity for each elements (see example \myref{MESHconnectivities.cxx}). + +\item I want to get an element number from a connectivity~: use \method{getElementNumber} +which return the global number of a given connectivity. + + +\textbf{C++ Example~:} +\begin{verbatim} +int * myElementConnectivity = {2,10,12,14}; +int myNumber = myMesh.getElementNumber(MED_NODAL,MED_CELL, + myElementConnectivity); +\end{verbatim} + +%%%%%%%%%%% WITH POLY METHODS %%%%%%%%%%%% + +\item The listed above methods do not take into account information about + \verb+polygonal+ and \verb+polyhedral+ cells contained in a MESH object. To get + full information about cell types, use the same methods with + \verb+WithPoly+ postfix: +\begin{itemize} +\item use \method{getNumberOfTypesWithPoly} to get the number of + geometric types for a mesh entity; +\item use \method{getTypesWithPoly} to get all geometric types for a mesh entity; +\item use \method{getNumberOfElementsWithPoly} to get the number of cells; +\item use \method{getElementTypeWithPoly} to get the geometric type of + one element. +\end{itemize} +There are separate methods to get number of polygons and polyhedrons: +\method{getNumberOfPolygons} and \method{getNumberOfPolyhedron} + +To get connectivity of polygonal elements, use \method{getPolygonsConnectivity} along with +\method{getPolygonsConnectivityIndex} (see example \myref{MESHconnectivities.cxx}). + +To get nodal connectivity of polyhedral elements, it is necessary use together +3 methods: \method{getPolyhedronConnectivity}, \method{getPolyhedronFacesIndex} +and \method{getPolyhedronIndex} (see example \myref{MESHconnectivities.cxx}). + +\end{enumerate} +\fileCxx{MESHconnectivities.cxx} + +\filePython{MESHconnectivities.py} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\chapter{How to use MESHING object} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +This class is a derivated class of MESH class to build a MESH object from +scratch (use of set methods). + +All verifications are under user responsability : If arrays values or arrays +dimensions are wrongs, results are impredicable. + +All arrays in arguments in set methods are duplicated in MESHING object. + +\section{Build a MESHING} + +\label{BuildMeshing} + +\subsection{Coordinates} + +First we must defined points coordinates of the mesh. We use +\method{setCoordinates}. + +\textbf{C++ Example~:} +\begin{verbatim} +MESHING myMeshing ; +const int SpaceDimension=2; +const int NumberOfNodes=6; +int * Coordinates = new int[SpaceDimension*NumberOfNodes] ; +string System="CARTESIAN"; +medModeSwitch MED_FULL_INTERLACE ; +myMeshing.setCoordinates(SpaceDimension,NumberOfNodes,Coordinates,System,Mode); +\end{verbatim} + +Then you could set the coordinates names and units (with +\method{setCoordinatesNames} and \method{setCoordinatesUnits}). + +\subsection{Connectivities} + +When coordinates are defined, we could defined connectivities. + +First we must defined connectivity of MED\_CELL elements. +After, we could defined constituent connectivity if necesary +(MED\_FACE and/or MED\_EDGE). + +For each connectivities, you could use some methods in the following order : +\begin{itemize} +\item \method{setNumberOfTypes} to set the number of differents geometrics +types (3 for example). This method allocates all arrays which size is this +number ; +\item \method{setTypes} to set the differents geometrics types +({MED\_TETRA4,MED\_PYRA5,MED\_HEXA8} for example). Types should be given +in increasing order of number of nodes for this type ; +\item \method{setNumberOfElements} to set the number of elements for +each geometric type. This method allocates connectivities array ; +\item \method{setConnectivity} to set the connectivity in MED\_FULL\_INTERLACE +mode for each geometric type (use \method{setPolygonsConnectivity} and +\method{setPolyhedraConnectivity} for poly elements); +\end{itemize} + +\textbf{C++ Example~:} +\begin{verbatim} +MESHING myMeshing ; +myMeshing.setCoordinates(SpaceDimension,NumberOfNodes,Coordinates,System,Mode); + +myMeshing.setNumberOfTypes(2,MED_CELL); +myMeshing.setTypes({MED_TRIA3,MED_QUAD4},MED_CELL); +myMeshing.setNumberOfElements({3,2},MED_CELL); // 3 MED_TRIA3 and 2 MED_QUAD4 +myMeshing.setConnectivity({1,2,3,6,8,9,4,5,6},MED_CELL,MED_TRIA3); +myMeshing.setConnectivity({1,3,4,5,4,5,7,8},MED_CELL,MED_QUAD4); +\end{verbatim} + + +\section{Defined a GROUP object} + +To add a group in a MESHING object, use \method{addGroup}. + +This method duplicate the GROUP object in the MESH object. + +To build this GROUP object, use SUPPORT methods \ref{CreateSupport} to set all attributes. + +\subsection{WARNING} + +For instance, translation from GROUP objects to FAMILY objects are not completed ! + +You MUST set GROUP objects as if they are FAMILY objects. + +This feature will be fully implemented in next release of med memory. + +\section{Example} + +\fileCxx{MESHINGexample.cxx} + +%\filePython{MESHINGexample.py} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\chapter{How to use SUPPORT object} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Create a SUPPORT object} + +\label{CreateSupport} + +To create a SUPPORT object, you must give : + +\begin{itemize} +\item a reference to a MESH object +\item its name +\item on which mesh entity it apply to +\end{itemize} +\textbf{C++ example~:} + +\verb+SUPPORT mySupport(myMesh,"support on all faces",MED_FACE) ;+ +By default, this support is defined on all elements of the given entity. + +If you want a restricted SUPPORT, you must add manualy information +about what do you want~: + +\begin{itemize} +\item is not on all elements~: \verb+mySupport.setAll(false);+ +\item on how many geometric type~:\\ + \verb+mySupport.setNumberOfGeometricType(myNumberOfGeometricType);+ +\item on which geometric type~:\\ + \verb+mySupport.setGeometricType(myGeometricType);+ +\item Temporary : the Gauss point number for each geometric type~:\\ + \verb+mySupport.setNumberOfGaussPoint(myNumberOfGaussPoint);+ +\item the number of elements for each geometric type~:\\ + \verb+mySupport.setNumberOfEntities(myNumberOfEntities);+ +\item the total number of elements~:\\ + \verb+mySupport.setTotalNumberOfEntities(myTotalNumberOfEntities);+ +\item the array which contains elements for each geometric type~:\\ + \verb+mySupport.setNumber(myNumber);+ +\end{itemize} +You could also use \method{setpartial} which set all you need. + + +\section{Use a SUPPORT object} + +You could get all basic information (as you set them in \myref{CreateSupport})~: + +\begin{itemize} +\item \verb+getName()+ +\item \verb+getDescription()+ +\item \verb+getMesh()+ +\item \verb+getEntity()+ +\item \verb+isOnAllElements()+ +\item \verb+getNumberOfTypes()+ +\item \verb+getTypes()+ +%\item \verb+getNumberOfGaussPoint()+ +%\item \verb+getNumberOfGaussPoint(myGeometricType)+ +\item \verb+getGeometricTypeNumber()+ +\item \verb+getNumberOfElements(myGeometricType)+ +\item \verb+getNumber(myGeometricType)+ +\item \verb+getNumberIndex()+ +\end{itemize} +For details about this methods, see the reference manual \cite{RefManualMedFile}. + +The use of \method{getNumber} and \method{getNumberIndex} are the +same as \method{getConnectivity} and \method{getConnectivityIndex} +(see item \myref{getConnectivity} + +There is another particular method to blend another SUPPORT object +into it. + +For example in C++ : +\begin{verbatim} +SUPPORT mySupport ; +SUPPORT myOtherSupport ; +... +mySupport.blending(myOtherSupport) ; +\end{verbatim} + +\verb+mySupport+ contain now all elements defined originally in it, +more those defined in \verb+myOtherSupport+. + + +\section{Case of FAMILY object} + +A FAMILY is a SUPPORT with some additionnal methods that concern some optional attribut (we could have none) and group (we could also have none) : +\begin{itemize} +\item \method{getIdentifier} return the family identifier (an integer) + +\item \method{getNumberOfAttributes} return the number of attributes of this family +\item \method{getAttributesIdentifiers} and \method{getAttributeIdentifier} return an integer array or an integer that represent attribut identifier. +\item \method{getAttributesValues} and \method{getAttributeValue} return an integer array or an integer that represent attribut value. +\item \method{getAttributesDescriptions} and \method{getAttributeDescription} return a string array or a string that represent attribut description. + +\item \method{getNumberOfGroups} return the number of groups which it belog to. +\item \method{getGroupsNames} and \method{getGroupName} return a string array or a string that represent the group name which it belog to. + +\end{itemize} + +\section{Case of GROUP object} + +A GROUP is a SUPPORT with some additionnal methods to find FAMILY that make up it : +\begin{itemize} +\item \method{getNumberOfFamilies} return the number of FAMILY that make up the GROUP ; +\item \method{getFamilies} and \method{getFamily} return a FAMILY array or a FAMILY that make up the GROUP. +\end{itemize} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\chapter{How to use Field} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\section{Introduction} + +A field is characterized by its name (\method{getName}) and an optional description (\method{getDescription}). + +It is also characterized by this calculating moment : +\begin{itemize} +\item an iteration number (time step number) +\item an order number (use if there are internal iteration in a time step) +\item the time that correspond to this iteration number. +\end{itemize} + +By default, there are no iteration and order number defined (value +MED\_NOPDT and MED\_NONOR). + +A field contain values which apply on some nodes or elements (cell, face or edge). + +We find these informations from a SUPPORT object (see \method{getSupport}). + +Each field have a number of components (\method getNumberOfComponents) and all these components have a name (\method{getComponentsNames} and \method{getComponentName}), a description (\method{getComponentsDescriptions} and \method{getComponentDescription}) and an unit (\method{getMEDComponentsUnits} and \method{getMEDComponentUnit}). + +To get values of a FIELD, you could use \method{getValue}, \method{getValueI} +and \method{getValueIJ}~: + +\begin{itemize} +\item First return a reference to all values in the given mode (full or no +interlace). +\item Second return a reference to $i^{th}$ element values or component values (in accordance with the given mode). +\item Third return the $j^{th}$ component of $i^{th}$ element. +\end{itemize} + +\fileCxx{FIELDgeneral.cxx} + +\filePython{FIELDgeneral.py} + +\section{Create a Field} + +It is simple to create a field object. You must know its SUPPORT and the number of components. + +\textbf{Example :} +\verb+FILED myField(mySupport,NumberOfComponents) ;+ + +You must now set a name (\method{setName}) and optionaly a description +(\method{setDescription}). + +By default there are no iteration and order number (negative values) and +time is null. You could change this by using \method{setIterationNumber}, +\method{setOrderNumber} and \method{setTime}. + +You \textbf{SHOULD} also set unit of your components with \method{setMEDComponentUnit} + +To set value, use \method{setValueIJ} to put new value of field. + +\fileCxx{FIELDcreate.cxx} + +\filePython{FIELDcreate.py} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\chapter{Using drivers} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +The generic driver mecanism gives users the possibility to write/read +the content of an object according to a specified file format. The +semantic remains the same whatever the object is (MESH, FIELD, MED). +By the way it allows using several file formats for writting an object. + + +\section{Invoking a driver} + + +\subsection{Invoking a driver at creation object time} + +This is the simplest way of invoking a driver. The driver parameters +are given to the constructor of the object. Except for the MED object, +this way of invoking a driver assume you know exactly the name of +the MESH/FIELD you want read from a file of type . + +ex 1.1 : For a FIELD object, invoking FIELD myField(MED\_DRIVER,fileName,fieldName) +create a FIELD object and a driver which loads the mesh +from the MED file (Not implemented yet !). + +ex 1.2 : To remove the default driver previously created myField->rmDriver(); + +ex 2 : For a MESH object, invoking MESH myMesh(MED\_DRIVER,fileName,meshName) +create a MESH object and a driver which loads the mesh +from the MED file . + +ex 3 : For a MED object, invoking MED myMed(MED\_DRIVER,fileName) +create a MED object to explore the MED file . + +rem 1 : ex1 is equivalent to \ref{sec:invoking_a_driver_from_the_std_drv_method} +ex1. + +rem 2 : Since the driver has read the object, the associated file +is closed. You can reread the object with the default driver by calling +the read() method : myObject.read(). + +\fileCxx{MEDMEM_InvokingDriverAtObjectCreationTime.cxx} + +\filePython{MEDMEM_InvokingDriverAtObjectCreationTime.py} + +\subsection{Invoking a driver from the standard driver method of an object\label{sec:invoking_a_driver_from_the_std_drv_method}} + +This way of invoking a driver give the possiblility to add several +drivers to an exiting object. + +ex1 : First we create a FIELD without any driver FIELD~{*}~myField1~=~new~FIELD; +then we add a driver with int myDriver1 = myField1->addDriver(driverType1, +fileName1, fieldName1); for reading from file +with myField1->read(myDriver1); + +ex2 : We add a new driver of type int myDriver2 = myField1->addDriver(driverType2, +fileName2,fieldName2); in order to write myField1 in file +with name using command myField1->write(myDriver2); + +rem 1 : Files are openned then closed each time you call read() or +write() methods. + +rem 2 : If you use more than a driver you need to keep the driver +handlers (myDriverI ). + +\fileCxx{MEDMEM_InvokingDriverFromStandardObjectMethod.cxx} + +\filePython{MEDMEM_InvokingDriverFromStandardObjectMethod.py} + +\subsection{Invoking a driver and attaching it to an existing object} + +The methods exposed in the two previous sections always create drivers +in read/write access mode. Another way of creating a driver is to +create a driver with a specific access mode. + +ex1 : First we create a FIELD without any driver FIELD~{*}~myField1~=~new +FIELD(); then we create a read-only driver MED\_FIELD\_RDONLY\_DRIVER~myRdOnlyDriver(fileName1,myField1); +and attached it to myField1. Finally you must set the fieldName1 you +want to acess in fileName1 with myRdOnlyDriver->setFieldName(fieldName1); +in order to read the field with myRdOnlyDriver->open(); myRdOnlyDriver->read(); + +Don't forget to close the file with myRdOnlyDriver->close(). + +ToDo : By now when you create such specific drivers, the object doesn't +know anything about it. + +\fileCxx{MEDMEM_InvokingDriverByAttachingItToAnObject.cxx} + +\filePython{MEDMEM_InvokingDriverByAttachingItToAnObject.py} + +\section{Using the MED driver} + +The MED object provides the ability of : + +\begin{enumerate} +\item \noindent Obtainning a reference on the whole structure contained +in a file. +\item Obtainning the list of all the Meshes/Fields names contained in a +file. +\item Obtainning a Mesh/Field reference using a name. +\item Writting a whole set of independent objects with a simple command. +\end{enumerate} + +\subsection{Exploring files} + +In this first use case the user wants to explore the meshes \& fields +containned within a file of type given by the +parameter. + +ex 1 : Calling MED {*} myMed = new MED(driverType1, fileName1); create +a MED object which open fileName1, read all MESHes/FIELDs relations +then close the file. + +This is equivalent to MED~{*}~myMed~=~new~MED(); myDriver~=~myMed->addDriver(driverType1,fileName1); +myMed->readFileStruct(myDriver); + +ex 2 : To get the list of meshNames from a MED object, first ask the +object how many meshes it had by calling int numberOfMeshes~=~myMed->getNumberOfMeshes(); +then get the list with myMeshNames~=~new string{[}getMeshNames{]}; +myMed->getMeshNames(myMeshNames). + +Note you can also use the deque getMeshNames() method. + +ex 3 : To get a list of fieldNames from a MED object, first ask the +object how many fields it had by calling int numberOfFields~=~myMed->getNumberOfFields(); +then get the list with myFieldNames~=~new string{[}getFieldNames{]}; +myMed->getFieldNames(myFieldNames). + +ex 4 :To get a particular MESH use MESH {*} myMesh1 = myMED->getMesh(myMeshNames{[}0{]}) + +ex 5 :To get a particular FIELD you first need to know what (time +step, iteration number) list is used by calling deque~myField1DtIt~=~myMed->getFieldIteration(FieldName{[}0{]}) +; then you can ask for getting a specific FIELD with FIELD~{*}~myField1~=~myMED->getField(myFieldNames{[}0{]},myField1DtIt{[}0{]}.dt,myField1DtIt{[}0{]}.it). + +ex2 : To write the whole content of a MED object first add a driver +myDriver2~=~myMed.addDriver(driverType2,~fileName2); then ask for +writing the object myMed->write(myDriver2); (not implemented yet !) + +You can remove the driver with myMed->rmDriver(myDriver2); + +rem 1 : It is possible to use multiple drivers to read a set of FIELDs +/ MESHes from various file formats and writing the whole set through +a specific write.(not implemented yet !) + + +\subsubsection{Adding existing MESHes/FIELDs objects} + +Not yet implemented. + +\section{Using the VTK driver} + +This driver allow to save all MESH and FIELD objects in an ASCII file in +VTK format \cite{vtk}. + +You could use this driver only from a MED object, because VTK file format +impose to write objects in particular order. + +\textbf{C++ Example~:} +\begin{verbatim} +MED myMed(MED_DRIVER,"file.med"); +myMed.read(); +int id = myMed.addDriver(VTK_DRIVER,"file.vtk"); +myMed.write(id) ; +\end{verbatim} + +\section{Using the GIBI driver} + +This driver allow to load a mesh from a GIBI file (ASCII file with the extension '.sauve'), puting the mesh into a MESH object of MED. It's a read only driver and is applicable only to a MESH object. + +\textbf{C++ Example~:} +\begin{verbatim} +MESH * myMesh= new MESH() ; +GIBI_MESH_RDONLY_DRIVER myGibiMeshDriver("file.sauve", myMesh) ; +myGibiMeshDriver.open() ; +myGibiMeshDriver.read() ; +myGibiMeshDriver.close() ; +\end{verbatim} diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx b/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx index 61ec44500..b7017228d 100644 --- a/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx +++ b/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Exception.hxx" #include "MEDMEM_define.hxx" diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx b/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx index d02b07c74..e90b6030a 100644 --- a/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx +++ b/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Exception.hxx" #include "MEDMEM_define.hxx" diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx b/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx index 0465c695b..270eacbc2 100644 --- a/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx +++ b/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Exception.hxx" #include "MEDMEM_define.hxx" diff --git a/doc/MEDMEM/MEDMEM_MedAddingAnExistingObject.cxx b/doc/MEDMEM/MEDMEM_MedAddingAnExistingObject.cxx index fad6b8b39..b137c94b0 100644 --- a/doc/MEDMEM/MEDMEM_MedAddingAnExistingObject.cxx +++ b/doc/MEDMEM/MEDMEM_MedAddingAnExistingObject.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Exception.hxx" #include "MEDMEM_define.hxx" diff --git a/doc/MEDMEM/MEDMEM_UML.dia b/doc/MEDMEM/MEDMEM_UML.dia deleted file mode 100644 index 13d59840cd73f06b95f5382e0a8e643b29809aae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1846 zcmV-62g&#!iwFP!000001MOW~liD^Ee&1igkhcyiTe2nFS#~pN)25k8CYf9w`m`g! z%epl-Bb#iu5B=?x3@jLAYzsMoM*F}F==gAib-wRhB=7LW-?O;)HDpeV)&sTh_zF1Bf3pnx_oJ(E?w-5=5MUsIMYl1YCl!DYs2oU-0m8ejLH-4%a*YjwHxbbW=s zIh}`WTh(lyW)UCGALo0+lIz9m);O2QxIi+!dG^wMHndi6HrMYOBvqQvD4Rw}SuYD| zyqqKgK3dPPxzbS=O5-k+vM!WH+3h@KIipctRy<16IHbu^_Z^M1u)XqZOk;kZt1O1? zHQq&eo*rrF(0W?VQg;|yJN`C|>0`)N7W};NwBFY!i$<|nnQXCM?!$ESXE@GRj`HQ* z+umjGmzZW*e*+43zZXre`|s_IhwV<3YvDI0+xD?}8YTJamvaa1W|p!!%Jhv!+v*s% zk|xtQT&Z+GfCu8`3VMJ9J{k~!aJz2_<8XF6PFYe$hodYnbUs9r{Jw1cdKEcik{T zI`~R$Ox5@5e^{K4UM*d#^Ut~5r)PgwR_@tXki-PS9;L#zc zijJ>8zW?&UfTICN1CCN~d>wMEpmFq1VXy=xv3jcx*w{q{jOlOLAzP?Mz~OKSMG1xn zm~9IgDa-F~3ya&$p+W{%N$`;L;9%=uTiBhlC`?M25+;k8tiQbZ+^+Z>>cCp-n}F*$ zO%lEsgmabB#r3DXdzwr{XPU3yJS`e3z0K%#pOk(A$#rmbom0N9bc^b?e95|4zo=y7xD?@;W7ddzoeFII40sPdW52g555Bjk6fBvCpG(;Bj9g z0DBk>_@~;PO*#j;2<9$VDdX@#VQ>>6&dxUe;k<4VvE{Pu*BRO-Desxqhzz)wfjSSe%a!>;zj+ud3ypH5jgEl1vmR+d`b`qb_T zJokHItKAbVoVLSF-jUo?Rgm(PLqPrYsI8qpE+-`4?`Y$X_G**^JlpqAwH)<|Mf|p# zdX%Y0nR=8$+#V<+q*rW~7CXCj=g0&=v1i;Z!giM@%3hH$yZV!4*&O5|J_uYC1P2mf z1pS6mt*OPt?PnRcTjv-RqW@o{ZktG5JyN$TBlT9*CwOFp|0)<>mC~(o>k=-Rr=sz z-`%M=<4%1S9^Iya`kOQm4{+hOE(nT#4eYW<1M508LAAiaF=Bl7%)32}eb(0Nvxl=r zh>kgKteQJh7u}amVyFqYkhMsuwVs;g8bMfoGkNm?Y68i3gHIrzvUq zdXvN&(sEAhpd$o`tU}8xo}f9!mODo`ZS5N`8OMN!nUx|4cn~!da+GFZILvUE;V{Et z-;u+R-tDP1T%>+f1{Y`N^q(gzx7|FkcMgl)azy)XImry<5;g6#hP^rUPNiX{b7iI< z6bMZ(^b|q_Ep)VVS^_E70lV5+2k{XtH-B*H0BAcH>F>FDxKNI{@++Q<_yh)nOL3B^ z^|v+HYo|Vy`b~E>gu&@PiqJen#_YH=JMNT1fAw=|;#`P$uByx9S>4EqgzihRSD`>o z4?sUa15xs6|7G>96!}bKLU7lD9U%uali?f?2$(i!X3UuxlLMHF;de|2j%E<$!%Rn=s z@wa>|08~DKxqNz;4@i6NsDHq4k?FYW8j)Qz-cbi6C7*;$2Dk@#2LjSa<`M#1p{{1Q k$s{=@$uaRlM@i1mD*o-!&BfFIL%O;64|Jd9hTUuc0L?p?&j0`b diff --git a/doc/MEDMEM/MEDMEM_UML.png.in b/doc/MEDMEM/MEDMEM_UML.png.in new file mode 100644 index 0000000000000000000000000000000000000000..dfa05ef3b18e39821e7552241783344d90ff2e2f GIT binary patch literal 6379 zcmc&(dpuQH`#;Amu{9M(8&fG#6OElx-kL&kD<;WpN}PQpGh&qPO2=jFx091F6_a90 zMG@(ul>0uNOqvWOBtn{WRpYp%@O#$Y81;K^^UwQ!eERHl)_T@+{jO&{>q+GFwXK?p zwhD*CQM0#O>dfKDm2)`UC(3d#Bi1)?=Wy@~_Dd~Yc0731u-3WNY^-&2${=}NFbU=$Y?ut<`_$2m0o!<9Hx30epv35)-j1xFC#XRj_MV|FQV#I?_1To-amoC@yFVYZSLhi)y~&3O}1Fsho-C zBEQSzj>Sk>GhaXB@9+)gX-_*>Y#RfHP0>lLAzD-}Jbw{?w9*nN@XFBv*A3OIe&r%| z$Vv`I=lUSKk%^3uk7k`N{d8^M#Oc88r^tsr8M#2WvGcym59N$kl244oQX7bSWBGWo zdP2+77yIjC3NXDjULeWi{;VqDx5jQd(gI_d3dpg#dZThw?OqqCJr0_M} zqOFf5{L!|Jj)>+ki>tc1Bm{&Iz){z!R!{|6nKLfC^=+~ zi6CJHTs)}B@BmaAi&=q^e8I{_O9_dyj@RhWj?8u{$nN0AX|l1wmFO^t04-^$quwT` zXRdqL6Ew88e*ceKN_HxOHQ}pT^!X?-i5^V{jjT<&I-@7~D+32gqpS8B6Sn!B@pZ6BEiCp_}%Na?qHfk7B^b*=V<%UdlVQd~mYu zJ6!11@1oWW^h8cEnZ8sNX|JwIU~B-UxW_UuD&y(8BQCLqWem<*Re}{MuDWWTTr09j zE?6;-0gtC;7K+;x_b^XnfkhVDM&$gt4Y5;KE#tv9c>~SiZCqeS3b=U@unj;pyv+jG zIT+~&iDS-3QjifcPEM^GqI>*oZ#zuLKa+7$Q1`Ryb$2oHPHZ&!Jk36d3^I+q%Yv0`CJ;g+n&0+u29raaL%CT!}KsuvdVKdMukTg zPUp0$9Js}UYv?>s#~MPm$0XghT3r4`+)ieB)_8)u>zPOi%$ z_1!w{skpv;Yj6K3?j<3~f}PrQhLjY9lV63*8*9sNU6$4Q{6WB$Ibum}qp4W-tJc;9 z20C(51>9WOaYka<+FYcKjB^)wWpE}E;A8VKwp8=OmTd74uDE=%+7P;bH+|`uS_73u(_Aiwe!{EehPzR6y zQXPq05jhm%ElVu^9EX%tC_ zyYNwd5*0t(psU?%;{F+QY=$MKx64lnAa`Z*Dky^zYu)I*4{Z_(y{dwZ4>@l1$yz3C z`R#3*el^vcre85v+~lYOWPEM9Hb(eIDRIB7dhPa*!+^FL=T?7BT6ulD7hT*#h%?k4 zm(AQq&FT9!DfIDTb zmr2>8-n%JJTr}LU>q=aU<>$AIG z%lZPJp6hx?J(<>`R}fb{c^jtf_H*`|En{ev&FJq z#u?~uvrICZxK{binB{ z5SaWu-Yy>?a16+v7`x-f*zh<|%aD4jOZUj&UbcG|HV8V_QWKUo4pCqNfr|BEqmmnXYv}p8xr{hbX1O@hBp$ZJ~iAOi)20-z+=#%Jy z@&#{*%aBDj z=+^(w1(FlP<$(gD9;7M00L5b&DjYIdxaqR0uz3wMgldir2;k8)=MN+B-#=$^%iOqS zI1plim(Ls5ecf;Iv61>CJU_@zdU1MJ!5F>I&RH^XgK8i#ZGKVo&nP`Y*+iS2Qobd} z)HsBA)y$tw2B(MWBRa7)CFt9g$1>(FQ$Ph@`)JN8B{aBLAt^nG%ERWDI=R4Ncs7D8 zW@ih>`2U01J>T*aPGhK|^GgvavejpupSnfX$UROV6Qvr0^fGbQyb z_oGTHc4akNy(5Y}D;rmNrrKlnjx6^qhQ;sq>sH>N*UDC)iz52Z zg6ZP3)Few`wF-t9gq$pLV(Q1gx@dJk!%}$M4dFaQq0bd~I6A9+!eqpvy6PuuAl=bO zrret`k_Gr{m`v$kFWP-9{NtT}WwBu8pE8kSKC($YLwV4;5dx0X)}0ME>&+-aZiV@3 zC&RvDg>LW?YyNzt+T}k?Uu476#?1C-ZA>2iz|B^sN@uEH==4>4PgI~GTuy2fyo4!0 z!Ex<*vHi~xeeIdEr2Mn&{^z>5l8coot^|K5R{pgXz2)%!ZociRrei1Ubce^_OP6#d z$nYGN7tCq_?JDU{86&x^?3kcu?D$Q0Rzvscf$olW>A+Fa<cMZ1KsS-$Ip z?Kkpv=3lqaQ>k$|9;_iH!~z{@%4Z%sE|}^0GmI7ZhIi z#ZQrYy?xT>VcSC@$g*^QLM$df|3;C}p)wb`&BKsYW%fQ&BXm_#?KI4XOYb#Y zGJ!Trbz=j8ZuA#e>TBs9)-Q2~U)7fPxmk9C8$M@i7)@eI(spi~=%ykOp4Lk3b zvA%Wj*}HmYplcs`j3cb@afl}4br)Kx%A1*A=xQ3E`(Fdc2_M`kOvJ0pOROY_tq`Fe z(>rI0p4PTF|Em8T$z;b&7P*KzKvz`FnhFswCS(aD^g#TEgrJU)j-8;B5dsl{pWqgU_4u;{ zUf=GZE?0YXW7iOwXxrrDvY=^&OMnOKE=eG@NngR5ifep5iy9|8bU4A+55Hr~o{~)$ z$&-^`&4}Jl#f4synEyc5TChh=Fp*X+ypl~i%&#zTW6s%OQ?ca8WC@Y`pdNnHgZAFV zZMxP+H!VtxE7u1IhmmdQn11L>jG^Lsf~Xvqb>r6C(8c%qwt5|x5;2)4LgH?=H_y0c zwzBuJPSNrfZK{0}W7Bdio6GRFW{y0U+H{!=$eaEg6(d6sG8=FH+FrB?f0l^qR^xm3jvvW|kFa`_)NW=Br*t`JBbLii^LDIkW zKguCY1gYaiOpc;XEB&dDJ}=4RMfUWAYi{t zM-(+$pfSovRXOxV&=-21s3!v-gfP@RKws#tqWc>fmSGSvV6Te4&<8|)BIvgwf1zs$ zec_Mulm}gtO}LV{txOrC!#3bqP*=4Tu6`zm67bO)f5o+E!$z+R-WD!Xezo;W)K%c> zN0UiTc1AeWQ7&21twl*7=NCZ_D}}TWz!Mra8)%GI1y!2zmEeF7*wX}2)ayBzD2lL? zhsxo>4@(B=_&Crte=y1UEtHy)gG?J_joMqTw0>H=G|k>WC{4>B{|+)39S5~mD=4s@grEDm|2x4ka(&8zNC9-{}5lh{a9 zl^5P2#+ygkf3?H=7ye-L4)e$B4%ol2E{_BcDAL7h>e16T{{)HJ!R?EElOCP~M=FK+ zW|MQZrIknQg=!Ng#BYG!IEP3f19EoFdrVcXW!u^hzr*XUPkoN1-V1J-4B@7@{4MZ! z-2P3dnooE6;*gD~#mw0ZkAAQGDszVqJKv<~?^(kGoWM0#b}Ggh-jFGl8M4PHb#cVs z<16541&v{*0grm+|F!{-PT8jod!~!eHtgA!IWU5DG}CYYgq~UWl%DB+qY#0fh#nb+ zKm=b&u0ad4JmdE$qDl^_2S7%haE6w{xf(UV-Jf)8t+9=10{kZi$KLwurCCe(5&sA0 Czk3`2 literal 0 HcmV?d00001 diff --git a/doc/MEDMEM/MEDMEM_UML_light.png.in b/doc/MEDMEM/MEDMEM_UML_light.png.in new file mode 100644 index 0000000000000000000000000000000000000000..153b3be11920644a34ba8e933bf10e8877d7d8c6 GIT binary patch literal 3829 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 literal 0 HcmV?d00001 diff --git a/doc/MEDMEM/MEDMEM_UsersGuide.tex.in b/doc/MEDMEM/MEDMEM_UsersGuide.tex.in index ab5b149b3..8da8ce3e2 100644 --- a/doc/MEDMEM/MEDMEM_UsersGuide.tex.in +++ b/doc/MEDMEM/MEDMEM_UsersGuide.tex.in @@ -71,7 +71,7 @@ % | LE DOCUMENT | % |___________________________________________________________________________| % -\title{User's Guide Of Med Memory} +\title{User's Guide Of Med Memory V 3.2} \author{Patrick Goldbronn \and Eric Fayolle \and Nadir Bouhamou \and Jerome Roy \and Nicolas Crouzet} % ___________________________________________________________________________ @@ -95,691 +95,21 @@ %\newpage \cleardoublepage \tableofcontents + % ___________________________________________________________________________ % | | -% | DEBUT DU TEXTE | +% | DOCUMENT PRINCIPAL | % |___________________________________________________________________________| +% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{Introduction} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Convention} - -\begin{itemize} - -\item Difference between local and global number~: when we talk about an -element number, we could see $i^{th}$ quadrangle ($i^{th}$ in quadrangles -array~: local numbering) or $j^{th}$ element ($j^{th}$ in all elements array~: -global numbering). This two numbering are equivalent only if we have one -geometric type ; - -\item All numbering begin at one (take care of array index !) ; -\item When you get a C type array with a \texttt{get...} method, you must -not replace some value of it. Access is in read only. Other use may -product an impredicable result. To modify a such array use method -\texttt{set...} ; -\item Difference between local and global number~: when we talk about an -element number, we could see \( i^{th} \) quadrangle (\( i^{th} \) -in quadrangles array~: local numbering) or \( j^{th} \) element -(\( j^{th} \) in all elements array~: global numbering). This two -numbering are equivalent only if we have one geometric type. -\item They are many methods that have two syntax (one singular and one -plural). Plurals methods returns array and singulars methods returns one -particular value in this array (see \method{getCoordinate} and -\method{getCoordinates}). - -\end{itemize} - -\section{UML diagram} - -\includegraphics[width=16cm]{MEDMEM_UML.eps} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{How to use MED object} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{General Information} - -A typical use of this object is to mount in memory what is in a MED file (or -any type of driver in red or read/write mode) and it will manage its memory on -its own. Then from this object one can get some information such as~: - -\begin{itemize} -\item the number of meshes stored in this object using the -{\method{getNumberOfMeshes}}. -\item the number of fields stored in this object using the -{\method{getNumberOfFields}}. -\item a list of mesh names using the {\method{getMeshNames}}. -\item a list of field names using the {\method{getFieldNames}}. -\item a list of MESH object using the {\method{getMesh}} -\item a list of FIELD object using the {\method{getField}} -\item a list of SUPPORT object on all type of entities (node, cell, - face in 3d or edge on 2d) using the {\method{getSupport}}. -\end{itemize} - -The destuctor of this object will destruct itself all FIELD, SUPPORT and MESH -objects; via its get method you will have a pointeur on this object and you -should never delete it. - -One can add as well some MESH or FIELD object via the {\method{addMesh}} and -the {\method{addField}} respectively. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{How to use MESH object} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -\section{General Information} - -We could get some general information about a MESH object such as~: - -\begin{itemize} -\item name (\method{getName}) -\item a description (\method{getDescription}) -\item the space dimension (\method{getSpaceDimension}) -\item the mesh dimension (\method{getMeshDimension}) -\end{itemize} -\fileCxx{MESHgeneral.cxx} - -\filePython{MESHgeneral.py} - -\section{Information about nodes} - -\begin{enumerate} -\item I want to get the number of nodes~: Realy simple, use \method{getNumberOfNodes}. -\item I want to get the coordinates components names~: use \method{getCoordinatesNames} -which return a string array (one string for each space dimension) -\item I want to get the coordinates components units~: use \method{getCoordinatesUnits} -which return a string array (one string for each space dimension) -\item I want to get the coordinates system~: use \method{getCoordinatesSystem} -which return a string (\verb+"CARTESIAN"+, \verb+"CYLINDRICAL"+ or \verb+"SPHERICAL"+). -\item I want to get the nodes coordinates~: use \method{getCoordinates} -which return a pointer to the coordinates array where values are interlace -or no. \textbf{Warning~:} - -\begin{itemize} -\item When we get coordinates in \verb+MED_NO_INTERLACE+ mode, we get an -array where values are ordered like (\verb+X1,X2,X..., Y1,Y..., Z1,Z...+). -\item When we get coordinates in \verb+MED_FULL_INTERLACE+ mode, we get -an array where values are ordered like (\verb+X1,Y1,Z1, X2,Y2,Z2, ...+). -\end{itemize} -\item I want to get one particular value of coordinate~: use \method{getCoordinate} -which return the value of \( i^{th} \) node and \( j^{th} \) axis. -\end{enumerate} -\fileCxx{MESHcoordinates.cxx} - -\filePython{MESHcoordinates.py} - -\section{Information about cells} - -\begin{enumerate} -\item I want to get the number of geometric type for a mesh entity~: use -\method{getNumberOfTypes} - - -\textbf{C++ Example~:} - -\verb+int NumberOfCellsTypes = myMesh.getNumberOfTypes(MED_CELL);+ - -%%%%%%%%%%%%%%%%% -\item I want to get all geometric type for a mesh entity~: use -\method{getTypes} to get an array of \verb+medGeometryElement+ -(to use directly in others methods) or \method{getCellsTypes} to get -an array of \verb+CELLMODEL+ (to ask mode information~: see \myref{CellModel}) . - -\textbf{C++ Example~:} - -\verb+const medGeometryElement * Types = myMesh.getTypes(MED_CELL);+ - -\verb+const CELLMODEL * CellsTypes = myMesh.getCellsTypes(MED_CELL);+ - -(each arrays are size \verb+NumberOfCellsTypes+) - -\item I want to get the number of cells~: use \method{getNumberOfElements} -which return this information. You must give the mesh entity (\verb+MED_CELL+, -\verb+MED_FACE+, \verb+MED_EDGE+ or \verb+MED_NODE+) and a geometric -type of this entity. - - -\textbf{C++ Example~:} - -\verb+int NumberOfTriangle = myMesh.getNumberOfElements(MED_FACE,MED_TRIA3);+ - -\verb+int NumberOfFace = myMesh.getNumberOfElements(MED_FACE,MED_ALL_ELEMENT);+ - -\item I want to get the geometric type of one element~: use \method{getElementType} -which return a \verb+medGeometryElement+. - - -\textbf{C++ Example~:} - -\verb+medGeometryElement myType = myMesh.getElementType(MED_FACE,10);+ - -Return the \verb+medGeometryElement+ of \( 10^{th} \) face. - -\item I want to get a connectivity~: use \method{getConnectivity} which -return an array with connectivity values. - - -\label{getConnectivity} - -\textbf{C++ Example~:} - -\begin{verbatim} -int NumberOfTetrahedron = myMesh.getNumberOfElements(MED_CELL,MED_TETRA4); -const int * TetrahedronConnectivity = - myMesh.getConnectivity(MED_FULL_ENTERLACE, - MED_NODAL, - MED_CELL, - MED_TETRA4); -\end{verbatim} -\verb+TetrahedronConnectivity+ contain nodal connectivity -of tetrahedron in mesh. It is arranged in full enterlace mode and -its size is \verb+NumberOfTetrahedron x 4+. - -If you want to get connectivity of all elements (with \verb+Type=MED_ALL_ELEMENTS+), -you must use the index array (return by \method{getConnectivityIndex}) -to get connectivity for each elements (see example \myref{MESHconnectivities.cxx}). - -\item I want to get an element number from a connectivity~: use \method{getElementNumber} -which return the global number of a given connectivity. - - -\textbf{C++ Example~:} -\begin{verbatim} -int * myElementConnectivity = {2,10,12,14}; -int myNumber = myMesh.getElementNumber(MED_NODAL,MED_CELL, - myElementConnectivity); -\end{verbatim} - -%%%%%%%%%%% WITH POLY METHODS %%%%%%%%%%%% - -\item The listed above methods do not take into account information about - \verb+polygonal+ and \verb+polyhedral+ cells contained in a MESH object. To get - full information about cell types, use the same methods with - \verb+WithPoly+ postfix: -\begin{itemize} -\item use \method{getNumberOfTypesWithPoly} to get the number of - geometric types for a mesh entity; -\item use \method{getTypesWithPoly} to get all geometric types for a mesh entity; -\item use \method{getNumberOfElementsWithPoly} to get the number of cells; -\item use \method{getElementTypeWithPoly} to get the geometric type of - one element. -\end{itemize} -There are separate methods to get number of polygons and polyhedrons: -\method{getNumberOfPolygons} and \method{getNumberOfPolyhedron} - -To get connectivity of polygonal elements, use \method{getPolygonsConnectivity} along with -\method{getPolygonsConnectivityIndex} (see example \myref{MESHconnectivities.cxx}). - -To get nodal connectivity of polyhedral elements, it is necessary use together -3 methods: \method{getPolyhedronConnectivity}, \method{getPolyhedronFacesIndex} -and \method{getPolyhedronIndex} (see example \myref{MESHconnectivities.cxx}). - -\end{enumerate} -\fileCxx{MESHconnectivities.cxx} - -\filePython{MESHconnectivities.py} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{How to use MESHING object} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -This class is a derivated class of MESH class to build a MESH object from -scratch (use of set methods). - -All verifications are under user responsability : If arrays values or arrays -dimensions are wrongs, results are impredicable. - -All arrays in arguments in set methods are duplicated in MESHING object. - -\section{Build a MESHING} - -\label{BuildMeshing} - -\subsection{Coordinates} - -First we must defined points coordinates of the mesh. We use -\method{setCoordinates}. - -\textbf{C++ Example~:} -\begin{verbatim} -MESHING myMeshing ; -const int SpaceDimension=2; -const int NumberOfNodes=6; -int * Coordinates = new int[SpaceDimension*NumberOfNodes] ; -string System="CARTESIAN"; -medModeSwitch MED_FULL_INTERLACE ; -myMeshing.setCoordinates(SpaceDimension,NumberOfNodes,Coordinates,System,Mode); -\end{verbatim} - -Then you could set the coordinates names and units (with -\method{setCoordinatesNames} and \method{setCoordinatesUnits}). - -\subsection{Connectivities} - -When coordinates are defined, we could defined connectivities. - -First we must defined connectivity of MED\_CELL elements. -After, we could defined constituent connectivity if necesary -(MED\_FACE and/or MED\_EDGE). - -For each connectivities, you could use some methods in the following order : -\begin{itemize} -\item \method{setNumberOfTypes} to set the number of differents geometrics -types (3 for example). This method allocates all arrays which size is this -number ; -\item \method{setTypes} to set the differents geometrics types -({MED\_TETRA4,MED\_PYRA5,MED\_HEXA8} for example). Types should be given -in increasing order of number of nodes for this type ; -\item \method{setNumberOfElements} to set the number of elements for -each geometric type. This method allocates connectivities array ; -\item \method{setConnectivity} to set the connectivity in MED\_FULL\_INTERLACE -mode for each geometric type (use \method{setPolygonsConnectivity} and -\method{setPolyhedraConnectivity} for poly elements); -\end{itemize} - -\textbf{C++ Example~:} -\begin{verbatim} -MESHING myMeshing ; -myMeshing.setCoordinates(SpaceDimension,NumberOfNodes,Coordinates,System,Mode); - -myMeshing.setNumberOfTypes(2,MED_CELL); -myMeshing.setTypes({MED_TRIA3,MED_QUAD4},MED_CELL); -myMeshing.setNumberOfElements({3,2},MED_CELL); // 3 MED_TRIA3 and 2 MED_QUAD4 -myMeshing.setConnectivity({1,2,3,6,8,9,4,5,6},MED_CELL,MED_TRIA3); -myMeshing.setConnectivity({1,3,4,5,4,5,7,8},MED_CELL,MED_QUAD4); -\end{verbatim} - - -\section{Defined a GROUP object} - -To add a group in a MESHING object, use \method{addGroup}. - -This method duplicate the GROUP object in the MESH object. - -To build this GROUP object, use SUPPORT methods \ref{CreateSupport} to set all attributes. - -\subsection{WARNING} - -For instance, translation from GROUP objects to FAMILY objects are not completed ! - -You MUST set GROUP objects as if they are FAMILY objects. - -This feature will be fully implemented in next release of med memory. - -\section{Example} - -\fileCxx{MESHINGexample.cxx} - -%\filePython{MESHINGexample.py} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{How to use SUPPORT object} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Create a SUPPORT object} - -\label{CreateSupport} - -To create a SUPPORT object, you must give : - -\begin{itemize} -\item a reference to a MESH object -\item its name -\item on which mesh entity it apply to -\end{itemize} -\textbf{C++ example~:} - -\verb+SUPPORT mySupport(myMesh,"support on all faces",MED_FACE) ;+ -By default, this support is defined on all elements of the given entity. - -If you want a restricted SUPPORT, you must add manualy information -about what do you want~: - -\begin{itemize} -\item is not on all elements~: \verb+mySupport.setAll(false);+ -\item on how many geometric type~:\\ - \verb+mySupport.setNumberOfGeometricType(myNumberOfGeometricType);+ -\item on which geometric type~:\\ - \verb+mySupport.setGeometricType(myGeometricType);+ -\item Temporary : the Gauss point number for each geometric type~:\\ - \verb+mySupport.setNumberOfGaussPoint(myNumberOfGaussPoint);+ -\item the number of elements for each geometric type~:\\ - \verb+mySupport.setNumberOfEntities(myNumberOfEntities);+ -\item the total number of elements~:\\ - \verb+mySupport.setTotalNumberOfEntities(myTotalNumberOfEntities);+ -\item the array which contains elements for each geometric type~:\\ - \verb+mySupport.setNumber(myNumber);+ -\end{itemize} -You could also use \method{setpartial} which set all you need. - - -\section{Use a SUPPORT object} - -You could get all basic information (as you set them in \myref{CreateSupport})~: - -\begin{itemize} -\item \verb+getName()+ -\item \verb+getDescription()+ -\item \verb+getMesh()+ -\item \verb+getEntity()+ -\item \verb+isOnAllElements()+ -\item \verb+getNumberOfTypes()+ -\item \verb+getTypes()+ -%\item \verb+getNumberOfGaussPoint()+ -%\item \verb+getNumberOfGaussPoint(myGeometricType)+ -\item \verb+getGeometricTypeNumber()+ -\item \verb+getNumberOfElements(myGeometricType)+ -\item \verb+getNumber(myGeometricType)+ -\item \verb+getNumberIndex()+ -\end{itemize} -For details about this methods, see the reference manual \cite{RefManual}. - -The use of \method{getNumber} and \method{getNumberIndex} are the -same as \method{getConnectivity} and \method{getConnectivityIndex} -(see item \myref{getConnectivity} - -There is another particular method to blend another SUPPORT object -into it. - -For example in C++ : -\begin{verbatim} -SUPPORT mySupport ; -SUPPORT myOtherSupport ; -... -mySupport.blending(myOtherSupport) ; -\end{verbatim} - -\verb+mySupport+ contain now all elements defined originally in it, -more those defined in \verb+myOtherSupport+. - - -\section{Case of FAMILY object} - -A FAMILY is a SUPPORT with some additionnal methods that concern some optional attribut (we could have none) and group (we could also have none) : -\begin{itemize} -\item \method{getIdentifier} return the family identifier (an integer) - -\item \method{getNumberOfAttributes} return the number of attributes of this family -\item \method{getAttributesIdentifiers} and \method{getAttributeIdentifier} return an integer array or an integer that represent attribut identifier. -\item \method{getAttributesValues} and \method{getAttributeValue} return an integer array or an integer that represent attribut value. -\item \method{getAttributesDescriptions} and \method{getAttributeDescription} return a string array or a string that represent attribut description. - -\item \method{getNumberOfGroups} return the number of groups which it belog to. -\item \method{getGroupsNames} and \method{getGroupName} return a string array or a string that represent the group name which it belog to. - -\end{itemize} - -\section{Case of GROUP object} - -A GROUP is a SUPPORT with some additionnal methods to find FAMILY that make up it : -\begin{itemize} -\item \method{getNumberOfFamilies} return the number of FAMILY that make up the GROUP ; -\item \method{getFamilies} and \method{getFamily} return a FAMILY array or a FAMILY that make up the GROUP. -\end{itemize} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{How to use Field} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Introduction} - -A field is characterized by its name (\method{getName}) and an optional description (\method{getDescription}). - -It is also characterized by this calculating moment : -\begin{itemize} -\item an iteration number (time step number) -\item an order number (use if there are internal iteration in a time step) -\item the time that correspond to this iteration number. -\end{itemize} - -By default, there are no iteration and order number defined (value -MED\_NOPDT and MED\_NONOR). - -A field contain values which apply on some nodes or elements (cell, face or edge). - -We find these informations from a SUPPORT object (see \method{getSupport}). - -Each field have a number of components (\method getNumberOfComponents) and all these components have a name (\method{getComponentsNames} and \method{getComponentName}), a description (\method{getComponentsDescriptions} and \method{getComponentDescription}) and an unit (\method{getMEDComponentsUnits} and \method{getMEDComponentUnit}). - -For unit you could use later UNIT (\myref{Unit}) objet to make a more general control on it. But the use of this class must be specified. - -To get values of a FIELD, you could use \method{getValue}, \method{getValueI} -and \method{getValueIJ}~: - -\begin{itemize} -\item First return a reference to all values in the given mode (full or no -interlace). -\item Second return a reference to $i^{th}$ element values or component values (in accordance with the given mode). -\item Third return the $j^{th}$ component of $i^{th}$ element. -\end{itemize} - -\fileCxx{FIELDgeneral.cxx} - -\filePython{FIELDgeneral.py} - -\section{Create a Field} - -It is simple to create a field object. You must know its SUPPORT and the number of components. - -\textbf{Example :} -\verb+FILED myField(mySupport,NumberOfComponents) ;+ - -You must now set a name (\method{setName}) and optionaly a description -(\method{setDescription}). - -By default there are no iteration and order number (negative values) and -time is null. You could change this by using \method{setIterationNumber}, -\method{setOrderNumber} and \method{setTime}. - -You \textbf{SHOULD} also set unit of your components with \method{setMEDComponentUnit} - -To set value, use \method{setValueIJ} to put new value of field. - -\fileCxx{FIELDcreate.cxx} - -\filePython{FIELDcreate.py} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{Other Classes} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -\section{class CELLMODEL} -\label{CellModel} - -To do - -\section{class UNIT} -\label{Unit} - -To do - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{Using drivers} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -The generic driver mecanism gives users the possibility to write/read -the content of an object according to a specified file format. The -semantic remains the same whatever the object is (MESH, FIELD, MED). -By the way it allows using several file formats for writting an object. - - -\section{Invoking a driver} - - -\subsection{Invoking a driver at creation object time} - -This is the simplest way of invoking a driver. The driver parameters -are given to the constructor of the object. Except for the MED object, -this way of invoking a driver assume you know exactly the name of -the MESH/FIELD you want read from a file of type . - -ex 1.1 : For a FIELD object, invoking FIELD myField(MED\_DRIVER,fileName,fieldName) -create a FIELD object and a driver which loads the mesh -from the MED file (Not implemented yet !). - -ex 1.2 : To remove the default driver previously created myField->rmDriver(); - -ex 2 : For a MESH object, invoking MESH myMesh(MED\_DRIVER,fileName,meshName) -create a MESH object and a driver which loads the mesh -from the MED file . - -ex 3 : For a MED object, invoking MED myMed(MED\_DRIVER,fileName) -create a MED object to explore the MED file . - -rem 1 : ex1 is equivalent to \ref{sec:invoking_a_driver_from_the_std_drv_method} -ex1. - -rem 2 : Since the driver has read the object, the associated file -is closed. You can reread the object with the default driver by calling -the read() method : myObject.read(). - -\fileCxx{MEDMEM_InvokingDriverAtObjectCreationTime.cxx} - -\filePython{MEDMEM_InvokingDriverAtObjectCreationTime.py} - -\subsection{Invoking a driver from the standard driver method of an object\label{sec:invoking_a_driver_from_the_std_drv_method}} - -This way of invoking a driver give the possiblility to add several -drivers to an exiting object. - -ex1 : First we create a FIELD without any driver FIELD~{*}~myField1~=~new~FIELD; -then we add a driver with int myDriver1 = myField1->addDriver(driverType1, -fileName1, fieldName1); for reading from file -with myField1->read(myDriver1); - -ex2 : We add a new driver of type int myDriver2 = myField1->addDriver(driverType2, -fileName2,fieldName2); in order to write myField1 in file -with name using command myField1->write(myDriver2); - -rem 1 : Files are openned then closed each time you call read() or -write() methods. - -rem 2 : If you use more than a driver you need to keep the driver -handlers (myDriverI ). - -\fileCxx{MEDMEM_InvokingDriverFromStandardObjectMethod.cxx} - -\filePython{MEDMEM_InvokingDriverFromStandardObjectMethod.py} - -\subsection{Invoking a driver and attaching it to an existing object} - -The methods exposed in the two previous sections always create drivers -in read/write access mode. Another way of creating a driver is to -create a driver with a specific access mode. - -ex1 : First we create a FIELD without any driver FIELD~{*}~myField1~=~new -FIELD(); then we create a read-only driver MED\_FIELD\_RDONLY\_DRIVER~myRdOnlyDriver(fileName1,myField1); -and attached it to myField1. Finally you must set the fieldName1 you -want to acess in fileName1 with myRdOnlyDriver->setFieldName(fieldName1); -in order to read the field with myRdOnlyDriver->open(); myRdOnlyDriver->read(); - -Don't forget to close the file with myRdOnlyDriver->close(). - -ToDo : By now when you create such specific drivers, the object doesn't -know anything about it. - -\fileCxx{MEDMEM_InvokingDriverByAttachingItToAnObject.cxx} - -\filePython{MEDMEM_InvokingDriverByAttachingItToAnObject.py} - -\section{Using the MED driver} - -The MED object provides the ability of : - -\begin{enumerate} -\item \noindent Obtainning a reference on the whole structure contained -in a file. -\item Obtainning the list of all the Meshes/Fields names contained in a -file. -\item Obtainning a Mesh/Field reference using a name. -\item Writting a whole set of independent objects with a simple command. -\end{enumerate} - -\subsection{Exploring files} - -In this first use case the user wants to explore the meshes \& fields -containned within a file of type given by the -parameter. - -ex 1 : Calling MED {*} myMed = new MED(driverType1, fileName1); create -a MED object which open fileName1, read all MESHes/FIELDs relations -then close the file. - -This is equivalent to MED~{*}~myMed~=~new~MED(); myDriver~=~myMed->addDriver(driverType1,fileName1); -myMed->readFileStruct(myDriver); - -ex 2 : To get the list of meshNames from a MED object, first ask the -object how many meshes it had by calling int numberOfMeshes~=~myMed->getNumberOfMeshes(); -then get the list with myMeshNames~=~new string{[}getMeshNames{]}; -myMed->getMeshNames(myMeshNames). - -Note you can also use the deque getMeshNames() method. - -ex 3 : To get a list of fieldNames from a MED object, first ask the -object how many fields it had by calling int numberOfFields~=~myMed->getNumberOfFields(); -then get the list with myFieldNames~=~new string{[}getFieldNames{]}; -myMed->getFieldNames(myFieldNames). - -ex 4 :To get a particular MESH use MESH {*} myMesh1 = myMED->getMesh(myMeshNames{[}0{]}) - -ex 5 :To get a particular FIELD you first need to know what (time -step, iteration number) list is used by calling deque~myField1DtIt~=~myMed->getFieldIteration(FieldName{[}0{]}) -; then you can ask for getting a specific FIELD with FIELD~{*}~myField1~=~myMED->getField(myFieldNames{[}0{]},myField1DtIt{[}0{]}.dt,myField1DtIt{[}0{]}.it). - -ex2 : To write the whole content of a MED object first add a driver -myDriver2~=~myMed.addDriver(driverType2,~fileName2); then ask for -writing the object myMed->write(myDriver2); (not implemented yet !) - -You can remove the driver with myMed->rmDriver(myDriver2); - -rem 1 : It is possible to use multiple drivers to read a set of FIELDs -/ MESHes from various file formats and writing the whole set through -a specific write.(not implemented yet !) - - -\subsubsection{Adding existing MESHes/FIELDs objects} - -Not yet implemented. - -\section{Using the VTK driver} - -This driver allow to save all MESH and FIELD objects in an ASCII file in -VTK format \cite{vtk}. - -You could use this driver only from a MED object, because VTK file format -impose to write objects in particular order. - -\textbf{C++ Example~:} -\begin{verbatim} -MED myMed(MED_DRIVER,"file.med"); -myMed.read(); -int id = myMed.addDriver(VTK_DRIVER,"file.vtk"); -myMed.write(id) ; -\end{verbatim} - -\section{Using the GIBI driver} - -This driver allow to load a mesh from a GIBI file (ASCII file with the extension '.sauve'), puting the mesh into a MESH object of MED. It's a read only driver and is applicable only to a MESH object. - -\textbf{C++ Example~:} -\begin{verbatim} -MESH * myMesh= new MESH() ; -GIBI_MESH_RDONLY_DRIVER myGibiMeshDriver("file.sauve", myMesh) ; -myGibiMeshDriver.open() ; -myGibiMeshDriver.read() ; -myGibiMeshDriver.close() ; -\end{verbatim} - +\input{MEDMEM_Content.tex} +% % ___________________________________________________________________________ % | | % | REFERENCES | % |___________________________________________________________________________| -% + \newpage %\thebibliography{biblio} \begin{thebibliography}{1} @@ -788,9 +118,18 @@ myGibiMeshDriver.close() ; \addcontentsline{toc}{chapter}{Bibliography} -\bibitem{RefManual} Reference Manual~: \verb+http://www-drn2.cea.fr/MED/MEDMEM/DOC/html/index.html+ +\bibitem{RefManualMedFile} +\newblock {Reference Manual for Med File~:} \\ +\newblock {\verb+http://www-drn2.cea.fr/MED/MEDMEM/DOC/html/index.html+} + +\bibitem{RefManualMedMemory} +\newblock {Med Memory Users Reference Manual~:} \\ +\newblock {\verb+file:://$MED_ROOT_DIR/share/salome/doc/html_ref_user/index.html+} \\ +\newblock {\verb+$MED_ROOT_DIR/share/salome/doc/MedMemory_user_2on1.pdf+} + -\bibitem{vtk} VTK home page~: \verb+http://public.kitware.com/VTK+ +\bibitem{vtk} +\newblock {VTK home page~: \verb+http://public.kitware.com/VTK+} \end{thebibliography} diff --git a/doc/MEDMEM/MESHINGexample.cxx b/doc/MEDMEM/MESHINGexample.cxx index 36ef5a7c9..07c943a02 100644 --- a/doc/MEDMEM/MESHINGexample.cxx +++ b/doc/MEDMEM/MESHINGexample.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Meshing.hxx" #include "MEDMEM_Group.hxx" diff --git a/doc/MEDMEM/MESHconnectivities.cxx b/doc/MEDMEM/MESHconnectivities.cxx index 947cd8598..3d441d876 100644 --- a/doc/MEDMEM/MESHconnectivities.cxx +++ b/doc/MEDMEM/MESHconnectivities.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Mesh.hxx" #include "MEDMEM_CellModel.hxx" diff --git a/doc/MEDMEM/MESHcoordinates.cxx b/doc/MEDMEM/MESHcoordinates.cxx index d836b635d..e52eaaa00 100644 --- a/doc/MEDMEM/MESHcoordinates.cxx +++ b/doc/MEDMEM/MESHcoordinates.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// #include "MEDMEM_Mesh.hxx" using namespace MEDMEM ; diff --git a/doc/MEDMEM/MESHgeneral.cxx b/doc/MEDMEM/MESHgeneral.cxx index 68994ae5d..a22f90058 100644 --- a/doc/MEDMEM/MESHgeneral.cxx +++ b/doc/MEDMEM/MESHgeneral.cxx @@ -1,22 +1,3 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ -// using namespace std; #include "MEDMEM_Mesh.hxx" diff --git a/doc/MEDMEM/Makefile.in b/doc/MEDMEM/Makefile.in index b06d7820e..e3fce0576 100644 --- a/doc/MEDMEM/Makefile.in +++ b/doc/MEDMEM/Makefile.in @@ -104,11 +104,8 @@ MedMemory_devel_2on1.pdf: # User Guide -MEDMEM_UsersGuide.ps: MEDMEM_UsersGuide.dvi - dvips -o MEDMEM_UsersGuide.ps MEDMEM_UsersGuide.dvi - -MEDMEM_UsersGuide.pdf: MEDMEM_UsersGuide.ps - ps2pdf MEDMEM_UsersGuide.ps MEDMEM_UsersGuide.pdf +MEDMEM_UsersGuide.ps: MEDMEM_UsersGuide.pdf + pdf2ps MEDMEM_UsersGuide.pdf MEDMEM_UsersGuide.ps MEDMEM_UsersGuide_2on1.ps: MEDMEM_UsersGuide.ps psnup -2 MEDMEM_UsersGuide.ps >MEDMEM_UsersGuide_2on1.ps @@ -116,17 +113,13 @@ MEDMEM_UsersGuide_2on1.ps: MEDMEM_UsersGuide.ps MEDMEM_UsersGuide_2on1.pdf: MEDMEM_UsersGuide_2on1.ps ps2pdf MEDMEM_UsersGuide_2on1.ps MEDMEM_UsersGuide_2on1.pdf - -MEDMEM_UML.eps:MEDMEM_UML.dia - dia -e $@ $< - -MEDMEM_UsersGuide.dvi: MEDMEM_UsersGuide.tex MEDMEM_UML.eps - echo "Running latex..." - latex $< +MEDMEM_UsersGuide.pdf: MEDMEM_UsersGuide.tex MEDMEM_Content.tex MEDMEM_UML_light.png MEDMEM_UML.png + echo "Running pdflatex..." + pdflatex $< #echo "Running makeindex..." #makeindex MEDMEM_UsersGuide.idx echo "Rerunning latex...." - latex $< + pdflatex $< latex_count=5 while egrep -s 'Rerun (LaTeX|to get cross-references right)' MEDMEM_UsersGuide.log && [ $latex_count -gt 0 ] ;\ do \ @@ -138,6 +131,15 @@ MEDMEM_UsersGuide.dvi: MEDMEM_UsersGuide.tex MEDMEM_UML.eps MEDMEM_UsersGuide.tex:MEDMEM_UsersGuide.tex.in cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_UsersGuide.tex ./config.status +MEDMEM_Content.tex:MEDMEM_Content.tex.in + cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_Content.tex ./config.status + +MEDMEM_UML_light.png:MEDMEM_UML_light.png.in + cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_UML_light.png ./config.status + +MEDMEM_UML.png:MEDMEM_UML.png.in + cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_UML.png ./config.status + # install procedure install: $(datadir)/doc ps_2on1 pdf_2on1 -- 2.39.2