From 1420d125fc0f5a221732538d1bee83e7ee1bcd66 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 5 Apr 2013 05:53:20 +0000 Subject: [PATCH] MEDMEM suppression --- doc/MEDMEM/FIELDcreate.cxx | 88 -- doc/MEDMEM/FIELDcreate.py | 78 -- doc/MEDMEM/FIELDgeneral.cxx | 83 -- doc/MEDMEM/FIELDgeneral.py | 65 - doc/MEDMEM/HOWTO_Create_A_New_Driver.txt | 40 - doc/MEDMEM/MEDMEM_Content.tex.in | 934 ------------ ...MEM_InvokingDriverAtObjectCreationTime.cxx | 53 - ...DMEM_InvokingDriverAtObjectCreationTime.py | 47 - ..._InvokingDriverByAttachingItToAnObject.cxx | 86 -- ...M_InvokingDriverByAttachingItToAnObject.py | 73 - ...InvokingDriverFromStandardObjectMethod.cxx | 64 - ..._InvokingDriverFromStandardObjectMethod.py | 53 - doc/MEDMEM/MEDMEM_UML.png.in | Bin 6942 -> 0 bytes doc/MEDMEM/MEDMEM_UML_light.png.in | Bin 2803 -> 0 bytes doc/MEDMEM/MEDMEM_UsersGuide.lyx | 1248 ----------------- doc/MEDMEM/MEDMEM_UsersGuide.tex.in | 141 -- doc/MEDMEM/MESHINGexample.cxx | 286 ---- doc/MEDMEM/MESHINGexample.py | 489 ------- doc/MEDMEM/MESHconnectivities.cxx | 148 -- doc/MEDMEM/MESHconnectivities.py | 144 -- doc/MEDMEM/MESHcoordinates.cxx | 66 - doc/MEDMEM/MESHcoordinates.py | 54 - doc/MEDMEM/MESHgeneral.cxx | 52 - doc/MEDMEM/MESHgeneral.py | 41 - doc/MEDMEM/Makefile.am | 43 - doc/MEDMEM/TODO_Drivers.txt | 4 - 26 files changed, 4380 deletions(-) delete mode 100644 doc/MEDMEM/FIELDcreate.cxx delete mode 100644 doc/MEDMEM/FIELDcreate.py delete mode 100644 doc/MEDMEM/FIELDgeneral.cxx delete mode 100644 doc/MEDMEM/FIELDgeneral.py delete mode 100644 doc/MEDMEM/HOWTO_Create_A_New_Driver.txt delete mode 100644 doc/MEDMEM/MEDMEM_Content.tex.in delete mode 100644 doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx delete mode 100644 doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.py delete mode 100644 doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx delete mode 100644 doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.py delete mode 100644 doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx delete mode 100644 doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.py delete mode 100644 doc/MEDMEM/MEDMEM_UML.png.in delete mode 100644 doc/MEDMEM/MEDMEM_UML_light.png.in delete mode 100644 doc/MEDMEM/MEDMEM_UsersGuide.lyx delete mode 100644 doc/MEDMEM/MEDMEM_UsersGuide.tex.in delete mode 100644 doc/MEDMEM/MESHINGexample.cxx delete mode 100644 doc/MEDMEM/MESHINGexample.py delete mode 100644 doc/MEDMEM/MESHconnectivities.cxx delete mode 100644 doc/MEDMEM/MESHconnectivities.py delete mode 100644 doc/MEDMEM/MESHcoordinates.cxx delete mode 100644 doc/MEDMEM/MESHcoordinates.py delete mode 100644 doc/MEDMEM/MESHgeneral.cxx delete mode 100644 doc/MEDMEM/MESHgeneral.py delete mode 100644 doc/MEDMEM/Makefile.am delete mode 100644 doc/MEDMEM/TODO_Drivers.txt diff --git a/doc/MEDMEM/FIELDcreate.cxx b/doc/MEDMEM/FIELDcreate.cxx deleted file mode 100644 index 749af3517..000000000 --- a/doc/MEDMEM/FIELDcreate.cxx +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -// - -using namespace std; -#include "MEDMEM_Mesh.hxx" -#include "MEDMEM_Field.hxx" - -using namespace MEDMEM; -using namespace MED_EN ; - -int main (int argc, char ** argv) { - - const string MedFile = "pointe.med" ; - const string MeshName = "maa1" ; - - /* read MESH */ - MESH * myMesh = new MESH(MED_DRIVER,MedFile,MeshName) ; - - // we need a support : - const SUPPORT * mySupport = myMesh->getSupportOnAll(MED_CELL); - - /* create FIELD on mySupport, with 3 components */ - int NumberOfCompoennts = 3 ; - FIELD myField(mySupport,NumberOfCompoennts) ; - const string FieldName = "fieldcelldouble" ; - myField.setName(FieldName) ; - - // Components information - string * ComponentsNames = new string[NumberOfCompoennts] ; - ComponentsNames[0] = "Vx" ; - ComponentsNames[1] = "Vy" ; - ComponentsNames[2] = "Vz" ; - myField.setComponentsNames(ComponentsNames) ; - - string * ComponentsDescriptions = new string[NumberOfCompoennts] ; - ComponentsDescriptions[0] = "vitesse selon x" ; - ComponentsDescriptions[1] = "vitesse selon y" ; - ComponentsDescriptions[2] = "vitesse selon z" ; - myField.setComponentsDescriptions(ComponentsDescriptions) ; - - string * ComponentsUnits = new string[NumberOfCompoennts] ; - ComponentsUnits[0] = "m.s-1" ; - ComponentsUnits[1] = "m.s-1" ; - ComponentsUnits[2] = "m.s-1" ; - myField.setMEDComponentsUnits(ComponentsUnits) ; - - // Iteration information : - int IterationNumber = 10 ; // set value to MED_NOPDT if undefined (default) - myField.setIterationNumber(IterationNumber) ; - - int OrderNumber = 1 ; // set value to MED_NONOR if undefined (default) - myField.setOrderNumber(OrderNumber) ; - - double Time = 3.435678 ; // in second - myField.setTime(Time) ; - - // Value : - int NumberOfValue = mySupport->getNumberOfElements(MED_ALL_ELEMENTS); - for(int i=1; i<=NumberOfValue; i++) // i^th element - for (int j=1; j<=NumberOfCompoennts; j++) { // j^th component - double myValue = (i+j) * 0.1 ; - myField.setValueIJ(i,j,myValue); - } - - // save this new field - myField.write(MED_DRIVER,filename) ; - - return 0 ; -} diff --git a/doc/MEDMEM/FIELDcreate.py b/doc/MEDMEM/FIELDcreate.py deleted file mode 100644 index 4ad33dbb9..000000000 --- a/doc/MEDMEM/FIELDcreate.py +++ /dev/null @@ -1,78 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -# - -###################################################################### -# This Python script should be executed when the shared library is # -# generated using SWIG 1.3 (or higher) due to the fact that older # -# version could not handle the wrapping of several class constructor # -###################################################################### -# -from libMEDMEM_Swig import * - -MedFile = "pointe.med" -meshName = "maa1" - -myMesh = MESH(MED_DRIVER,MedFile,meshName) - -mySupport = myMesh.getSupportOnAll(MED_CELL) - -numberOfComponents = 3 -myField = FIELDDOUBLE(mySupport,numberOfComponents) -fieldName = "fieldcelldouble" -myField.setName(fieldName) - -for i in range(numberOfComponents): - if (i == 0): - name = "Vx" - desc = "vitesse selon x" - elif (i == 1): - name = "Vy" - desc = "vitesse selon y" - else: - name = "Vz" - desc = "vitesse selon z" - unit = "m. s-1" - ip1 = i+1 - myField.setComponentName(ip1,name) - myField.setComponentDescription(ip1,desc) - myField.setMEDComponentUnit(ip1,unit) - -iterationNumber = 10 -myField.setIterationNumber(iterationNumber) - -orderNumber = 1 -myField.setOrderNumber(orderNumber) - -time = 3.435678 -myField.setTime(time) - -numberOfValue = mySupport.getNumberOfElements(MED_ALL_ELEMENTS) - -for i in range(numberOfValue): - ip1 = i+1 - for j in range(numberOfComponents): - jp1 = j+1 - value = (ip1+jp1)*0.1 - myField.setValueIJ(ip1,jp1,value) - -id = myField.addDriver(MED_DRIVER) diff --git a/doc/MEDMEM/FIELDgeneral.cxx b/doc/MEDMEM/FIELDgeneral.cxx deleted file mode 100644 index 265ef8a30..000000000 --- a/doc/MEDMEM/FIELDgeneral.cxx +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -// - -using namespace std; -#include "MEDMEM_Mesh.hxx" -#include "MEDMEM_Field.hxx" - -using namespace MEDMEM; -using namespace MED_EN ; - -int main (int argc, char ** argv) { - - const string MedFile = "pointe.med" ; - const string MeshName = "maa1" ; - const string FieldName = "fieldcelldoublevector" ; - - /* read MESH */ - MESH * myMesh = new MESH(MED_DRIVER,MedFile,MeshName) ; - // myMesh->read() ; - - /* read FIELD */ - // we need a support : - const SUPPORT * mySupport = myMesh->getSupportOnAll(MED_CELL); - FIELD myField(mySupport,MED_DRIVER,MedFile,FieldName) ; - // myField.read() ; - - /* what in Field ? */ - // How many components - int NumberOfCompoennts = myField.getNumberOfComponents() ; - - const string * ComponentsNames = myField.getComponentsNames(); - const string * ComponentsDescriptions = myField.getComponentsDescriptions(); - const string * ComponentsUnits = myField.getMEDComponentsUnits(); - - for(int i=0;igetNumberOfElements(MED_ALL_ELEMENTS); - // Value - const double * Value = myField.getValue(); - for(int i=0; iremoveReference(); - - return 0 ; -} diff --git a/doc/MEDMEM/FIELDgeneral.py b/doc/MEDMEM/FIELDgeneral.py deleted file mode 100644 index 9a932a5d8..000000000 --- a/doc/MEDMEM/FIELDgeneral.py +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -# - -###################################################################### -# This Python script should be executed when the shared library is # -# generated using SWIG 1.3 (or higher) due to the fact that older # -# version could not handle the wrapping of several class constructor # -###################################################################### -# -from libMEDMEM_Swig import * - -MedFile = "pointe.med" -meshName = "maa1" -fieldName = "fieldcelldoublescalar" - -myMesh = MESH(MED_DRIVER,MedFile,meshName) - -mySupport = myMesh.getSupportOnAll(MED_CELL) - -myField = FIELDDOUBLE(mySupport,MED_DRIVER,MedFile,fieldName,-1,-1) - -numberOfComponents = myField.getNumberOfComponents() - -for i in range(numberOfComponents): - ip1 = i+1 - name = myField.getComponentName(ip1) - desc = myField.getComponentDescription(ip1) - unit = myField.getMEDComponentUnit(ip1) - - print "Component ",ip1 - print " - name : ",name - print " - decription : ",desc - print " - unit : ", unit - -iterationNumber = myField.getIterationNumber() -orderNumber = myField.getOrderNumber() -time = myField.getTime() -print "Iteration ",iterationNumber," at time ",time,\ - " (and order number ",orderNumber,")" - -numberOfValue = mySupport.getNumberOfElements(MED_ALL_ELEMENTS) -value = myField.getValue() - -for i in range(numberOfValue): - print " * ",value[i*numberOfComponents:(i+1)*numberOfComponents] diff --git a/doc/MEDMEM/HOWTO_Create_A_New_Driver.txt b/doc/MEDMEM/HOWTO_Create_A_New_Driver.txt deleted file mode 100644 index 660f6266c..000000000 --- a/doc/MEDMEM/HOWTO_Create_A_New_Driver.txt +++ /dev/null @@ -1,40 +0,0 @@ -Within MEDMEM_GenDriver.hxx : - /* Modify the following line to add a new driver type (step 1) */ - typedef enum { MED_DRIVER = 0, GIBI_DRIVER = 1, VTK_DRIVER = 254, NO_DRIVER = 255 } driverTypes; - -Note : MED Drivers with no Mesh or Field drivers must have a number of 255-i ! - -Within MEDMEM_Object.hxx - // Add your personnal driver header & line (step 2) - // At least one line must exist - // You have to respect the syntax. - #include "MEDMEM_TypeObjectDriver.hxx" - - friend class MED_OBJECT_RDONLY_DRIVER; - friend class MED_OBJECT_WRONLY_DRIVER; - friend class MED_OBJECT_RDWR_DRIVER; - - // Add a similar line for your personnal driver (step 3) - static INSTANCE_DE inst_med ; - -Within MEDMEM_Object.cxx - // Add a similar line for your personnal driver (step 3) - static INSTANCE_DE inst_med ; - - // Add your own driver in the driver list (step 4) - // Note the list must be coherent with the driver type list defined in MEDMEM_DRIVER.hxx. - const OBJECT::INSTANCE * const OBJECT::instances[] = { &OBJECT::inst_med } ; - -Within MEDMEM_TypeObjectDriver.hxx (ypu can use MEDMEM_TypeObjectDriver.hxx as a pattern for your driver !) - - // Faux : you have to create at least create a TYPE_OBJECT_RDWR_DRIVER even if it only throw an exception - // Faux : because RDONLY or WRONLY doesn't exists. - - Whatever is your driver : RDONLY,WRONLY,RDWR, you must inplement the write & read methods ( even if it only throw an exception) - -TODO : - -Gerer l'appartenance d'un driver type 3 Within l'objet - -Within les méthodes addDriver : - driver = instances[driverType]->run(fileName, this) ; --> Il faut vérifier que le numéro auquel on accède existe ! diff --git a/doc/MEDMEM/MEDMEM_Content.tex.in b/doc/MEDMEM/MEDMEM_Content.tex.in deleted file mode 100644 index f171e248c..000000000 --- a/doc/MEDMEM/MEDMEM_Content.tex.in +++ /dev/null @@ -1,934 +0,0 @@ -% ___________________________________________________________________________ -% | | -% | 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{sec:python}. - -\section{Naming conventions} -The naming conventions are rather straightforward, but the user used to the -Med-File semantics may find that there are a few noticeable differences (see -the following section). -\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} - -\section{Limitations and advantages regarding Med-File} -The Med Memory may only read meshes defined by their nodale connectivities. -Following this assumption, in Med File framework all elements defined -in the mesh should be stored as a {\bf MED\_MAILLE}. - -The Med Memory is able to read meshes defined by their nodale connectivities, -and where somme geometric faces are stored as a {\bf MED\_FACE} or a -{\bf MED\_ARETE} Med files. Which is not really Med File compliant. - -{\bf MED\_MAILLE}, {\bf MED\_FACE} and {\bf MED\_ARETE} should be taken in the -Med File sense. In future version, meshes defined by their descending -connectivities could be treated. - -The field notion in Med File and Med Memory is quite different. In Med memory -a field is of course its name, but as well its iteration number, its order -number and finally its corresponding sot of values. But in Med File a field is -only flagged by its name. - -\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+ (resp. -\verb+$MED_SRC_DIR+) is the Med Memory directory installation (resp. sources -directory). - -\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 (consult figure \ref{fig:uml_light} which gives -an UML diagram view of the main Med Memory classes~: -\begin{description} -\item[MED] the global container; -\item[MESH] the class containing 2D or 3D mesh objects; -\item[SUPPORT] the class containing mainly a list of mesh elements; -\item[FIELD] the class template containing list of values lying on a -particular support. -\end{description} -\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} -The API of those classes is quite sufficient for most of the component -integrations in the Salome platform. The use of the Med Memory libraries may -make easier the code coupling in the Salome framework. With these classes, it -is possible to~: -\begin{itemize} -\item read/write meshes and fields 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 that on the figure \ref{fig:uml_light} as well as \ref{fig:uml} that the -MED container controls the life cycle of all the objects it contains~: its -destructor 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 (resp. a mesh) will have no effect on the fields (resp. on the support) -which refer to it. But the user has to maintain the link~: a mesh agregates a -support which agregates a field. If the user has to delete Med Memory objects, -the field has to be deleted first, then the support and finally the mesh. - -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. It stores restricted list of elements used to set -boundary conditions, initial values. -\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 (consult -\cite{RefManualMedMemory}). 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. - -To write a complete MED object in an available writing format, on may use -{\method{addDriver}} and then {\method{write}}. - -For an example using these methods, one may see the Python scripts in the -directory \verb+$MED_ROOT_DIR/bin/salome/+,\verb+testMedObj.py+, or C++ -example program in the directory \verb+$MED_SRC_DIR/src/MEDMEM+, -\verb+duplicateMED.cxx+. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\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} - -Here is a small C++ example program which the Python version may be found in -\ref{MESHgeneral.py}. - -\fileCxx{MESHgeneral.cxx} - -\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} - -Here is a small C++ example program which the Python version may be found in -\ref{MESHcoordinates.py}. - -\fileCxx{MESHcoordinates.cxx} - -\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} - -\end{enumerate} - -Here is a small C++ example program which the Python version may be found in -\ref{MESHconnectivities.py}. - -\fileCxx{MESHconnectivities.cxx} - -\section{Information about FAMILY and GROUP} - -If one wants to get from a MESH object - - - - -To write a complete MESH object in an available writing format, on may use -{\method{addDriver}} and then {\method{write}}. - -For an example using these methods, one may see the Python scripts in the -directory \verb+$MED_ROOT_DIR/bin/salome/+,\verb+med_test1.py+, or C++ example -program in the directory \verb+$MED_SRC_DIR/src/MEDMEM+, \verb+med_test.cxx+. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\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} - -Here is a small C++ example program which the Python version may be found in -\ref{FIELDgeneral.py}. - -\fileCxx{FIELDgeneral.cxx} - -\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. - -Here is a small C++ example program which the Python version may be found in -\ref{FIELDcreate.py}. - -\fileCxx{FIELDcreate.cxx} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\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; -\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. - -Here is a small C++ example program which the Python version may be found in -\ref{MESHINGexample.py}. - -\fileCxx{MESHINGexample.cxx} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\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(). - -Here is a small C++ example program which the Python version may be found in -\ref{MEDMEM_InvokingDriverAtObjectCreationTime.py}. - -\fileCxx{MEDMEM_InvokingDriverAtObjectCreationTime.cxx} - -\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 ). - -Here is a small C++ example program which the Python version may be found in -\ref{MEDMEM_InvokingDriverFromStandardObjectMethod.py}. - -\fileCxx{MEDMEM_InvokingDriverFromStandardObjectMethod.cxx} - -\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. - -Here is a small C++ example program which the Python version may be found in -\ref{MEDMEM_InvokingDriverByAttachingItToAnObject.py}. - -\fileCxx{MEDMEM_InvokingDriverByAttachingItToAnObject.cxx} - -\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} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\chapter{Appendix: Python example scripts.}\label{sec:python} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -\section{Full Python example for \ref{MESHgeneral.cxx}~:} -\label{MESHgeneral.py} -\verbatiminput{@srcdir@/MESHgeneral.py} - -\section{Full Python example for \ref{MESHcoordinates.cxx}~:} -\label{MESHcoordinates.py} -\verbatiminput{@srcdir@/MESHcoordinates.py} - -\section{Full Python example for \ref{MESHconnectivities.cxx}~:} -\label{MESHconnectivities.py} -\verbatiminput{@srcdir@/MESHconnectivities.py} - -\section{Full Python example for \ref{FIELDgeneral.cxx}~:} -\label{FIELDgeneral.py} -\verbatiminput{@srcdir@/FIELDgeneral.py} - -\section{Full Python example for \ref{FIELDcreate.cxx}~:} -\label{FIELDcreate.py} -\verbatiminput{@srcdir@/FIELDcreate.py} - -\section{Full Python example for \ref{MESHINGexample.cxx}~:} -\label{MESHINGexample.py} -\verbatiminput{@srcdir@/MESHINGexample.py} - -\section{Full Python example for \ref{MEDMEM_InvokingDriverAtObjectCreationTime.cxx}~:} -\label{MEDMEM_InvokingDriverAtObjectCreationTime.py} -\verbatiminput{@srcdir@/MEDMEM_InvokingDriverAtObjectCreationTime.py} - -\section{Full Python example for \ref{MEDMEM_InvokingDriverFromStandardObjectMethod.cxx}~:} -\label{MEDMEM_InvokingDriverFromStandardObjectMethod.py} -\verbatiminput{@srcdir@/MEDMEM_InvokingDriverFromStandardObjectMethod.py} - -\section{Full Python example for \ref{MEDMEM_InvokingDriverByAttachingItToAnObject.cxx}~:} -\label{MEDMEM_InvokingDriverByAttachingItToAnObject.py} -\verbatiminput{@srcdir@/MEDMEM_InvokingDriverByAttachingItToAnObject.py} diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx b/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx deleted file mode 100644 index 39dfad160..000000000 --- a/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -// - -#include "MEDMEM_Exception.hxx" -#include "MEDMEM_define.hxx" - -#include "MEDMEM_Field.hxx" -#include "MEDMEM_Mesh.hxx" - -using namespace MEDMEM ; -using namespace MED_EN ; - -main () { - - const char * fileName = "pointe.med"; - const char * fieldName = "fieldcelldoublescalar"; - const char * meshName = "maa1"; - - try { - - // Test creation of drivers at object Creation time - - FIELD myField (MED_DRIVER,fileName,fieldName); - MESH myMesh (MED_DRIVER,fileName,meshName); - - // Test removal of drivers - myField.rmDriver(); - myMesh.rmDriver (); - - } catch (MEDEXCEPTION& ex){ - MESSAGE_MED(ex.what()) ; - } -} - diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.py b/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.py deleted file mode 100644 index b776e98c9..000000000 --- a/doc/MEDMEM/MEDMEM_InvokingDriverAtObjectCreationTime.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -# - -###################################################################### -# This Python script should be executed when the shared library is # -# generated using SWIG 1.3 (or higher) due to the fact that older # -# version could not handle the wrapping of several class constructor # -###################################################################### -# -from libMEDMEM_Swig import * - -medFile = "pointe.med" -fieldName = "fieldcelldouble" -meshName = "maa1" - -try: - print "Creation of MESH object" - myMesh = MESH(MED_DRIVER,medFile,meshName) - - print "Test the driver removal for MESH" - myMesh.rmDriver() - - print "End of Python script" - -except: - print "There is a problem somewhere !!" - print "Consult the error standart output of the python execution !!" diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx b/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx deleted file mode 100644 index 9293b2309..000000000 --- a/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.cxx +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -// - -#include "MEDMEM_Exception.hxx" -#include "MEDMEM_define.hxx" - -#include "MEDMEM_Field.hxx" -#include "MEDMEM_Mesh.hxx" -#include "MEDMEM_MedMeshDriver.hxx" - -using namespace MEDMEM ; -using namespace MED_EN ; - -main () { - - const char * fileName = "pointe.med"; - const char * fileName2 = "Field&MeshGeneratedPointe.med"; - const char * fileName3 = "MedGeneratedPointe.med"; - const char * fieldName = "fieldcelldoublescalar"; - const char * meshName = "maa1"; - - try { - // Test creation of drivers from the standard driver method of an object - { - FIELD * myField = new FIELD(); - MED_FIELD_RDONLY_DRIVER myRdOnlyDriver(fileName,myField); - myRdOnlyDriver.setFieldName(fieldName); - myRdOnlyDriver.open(); - myRdOnlyDriver.read(); - // try { myRdOnlyDriver.write(); } catch (MEDEXCEPTION& ex) - // { MESSAGE(ex.what()); } - MED_FIELD_WRONLY_DRIVER myWrOnlyDriver(fileName2,myField); - myWrOnlyDriver.open(); - myWrOnlyDriver.write(); - // try myWrOnlyDriver.read(); catch (MEDEXCEPTION& ex) - // { MESSAGE(ex.what()); } - myRdOnlyDriver.close(); - myWrOnlyDriver.close(); - delete myField; - } - - { - MESH * myMesh = new MESH(); - MED_MESH_RDONLY_DRIVER myRdOnlyDriver(fileName,myMesh); - myRdOnlyDriver.setMeshName(meshName); - myRdOnlyDriver.open(); - myRdOnlyDriver.read(); - myRdOnlyDriver.close(); - // try { myRdOnlyDriver.write(); } catch (MEDEXCEPTION& ex) - // { MESSAGE(ex.what()); } - MED_MESH_WRONLY_DRIVER myWrOnlyDriver(fileName2,myMesh); - myWrOnlyDriver.setMeshName(meshName); - myWrOnlyDriver.open(); - myWrOnlyDriver.write(); - // try myWrOnlyDriver.read(); catch (MEDEXCEPTION& ex) - // { MESSAGE(ex.what()); } - myRdOnlyDriver.close(); - myWrOnlyDriver.close(); - delete myMesh; - } - - - } catch (MEDEXCEPTION& ex){ - cout << "MAIN BLOCK EXCEPTION" << endl; - MESSAGE_MED(ex.what()) ; - } -} diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.py b/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.py deleted file mode 100644 index d92472fd2..000000000 --- a/doc/MEDMEM/MEDMEM_InvokingDriverByAttachingItToAnObject.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -# - -###################################################################### -# This Python script should be executed when the shared library is # -# generated using SWIG 1.3 (or higher) due to the fact that older # -# version could not handle the wrapping of several class constructor # -###################################################################### -# -from libMEDMEM_Swig import * - -medFile = "pointe.med" -medFile2 = "Field&MeshGeneratedPointe.med" -fieldName = "fieldcelldoublescalar" -meshName = "maa1" - -try: - myField = FIELDDOUBLE() - myRdOnlyDriver = MED_FIELDDOUBLE_RDONLY_DRIVER(medFile,myField) - myRdOnlyDriver.setFieldName(fieldName) - myRdOnlyDriver.open() - - myWrOnlyDriver = MED_FIELDDOUBLE_WRONLY_DRIVER(medFile2,myField) - myWrOnlyDriver.open() - - myRdOnlyDriver.close() - myWrOnlyDriver.close() - - print "Invoking field drivers OK" -except : - print "there is a problem in invoking field drivers !!" - print "Please consult the error standart output of the python execution !!" - -try: - myMesh = MESH() - - myRdOnlyDriver = MED_MESH_RDONLY_DRIVER(medFile,myMesh) - myRdOnlyDriver.setMeshName(meshName) - myRdOnlyDriver.open() - myRdOnlyDriver.read() - myRdOnlyDriver.close() - - myWrOnlyDriver = MED_MESH_WRONLY_DRIVER(medFile2,myMesh) - myWrOnlyDriver.setMeshName(meshName) - myWrOnlyDriver.open() - myWrOnlyDriver.write() - myWrOnlyDriver.close() - - print "Invoking mesh drivers OK" -except : - print "there is a problem in invoking mesh drivers !!" - print "Please consult the error standart output of the python execution !!" - diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx b/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx deleted file mode 100644 index 3d97f0c2c..000000000 --- a/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.cxx +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -// - -#include "MEDMEM_Exception.hxx" -#include "MEDMEM_define.hxx" - -#include "MEDMEM_Field.hxx" -#include "MEDMEM_Mesh.hxx" - -using namespace MEDMEM ; -using namespace MED_EN ; - -main () { - - const char * fileName = "pointe.med"; - const char * fileName2 = "fieldCellDoubleOfpointe.med"; - const char * fieldName = "fieldcelldoublescalar"; - const char * meshName = "maa1"; - - try { - // Test creation of drivers from the standard driver method of an object - FIELD * myField = new FIELD(); - int myDriver1 = myField->addDriver(MED_DRIVER, fileName, fieldName); - myField->read(); - //This test failed due to inadequate Support implementation - myField->rmDriver(); // TESTER LA VALIDITE DE myDriver2 !!!! - - int myDriver2 = myField->addDriver(MED_DRIVER, fileName2, fieldName); - myField->write(myDriver2); - //This test failed due to inadequate Support implementation - myField->rmDriver(myDriver2); - - MESH * myMesh = new MESH(); - int myDriver3 = myMesh->addDriver(MED_DRIVER, fileName, meshName); - myMesh->read(); - myMesh->rmDriver(); - - - myMesh->removeReference(); - myField->removeReference(); - - } catch (MEDEXCEPTION& ex){ - MESSAGE_MED(ex.what()) ; - } -} diff --git a/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.py b/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.py deleted file mode 100644 index b103a0b85..000000000 --- a/doc/MEDMEM/MEDMEM_InvokingDriverFromStandardObjectMethod.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -# - -###################################################################### -# This Python script should be executed when the shared library is # -# generated using SWIG 1.3 (or higher) due to the fact that older # -# version could not handle the wrapping of several class constructor # -###################################################################### -# -from libMEDMEM_Swig import * - -medFile = "pointe.med" -medFile2 = "fieldCellDoubleOfpointe.med" -fieldName = "fieldcelldoublescalar" -meshName = "maa1" - -try: - myField = FIELDDOUBLE() - - myDriver1 = myField.addDriver(MED_DRIVER,medFile,fieldName) - myField.rmDriver() - - myDriver2 = myField.addDriver(MED_DRIVER,medFile2,fieldName) - myField.rmDriver(myDriver2) - - myMesh = MESH() - myDriver3 = myMesh.addDriver(MED_DRIVER,medFile,meshName) - myMesh.read() - myMesh.rmDriver() - -except: - print "There is a problem somewhere !!" - print "Please consult the error standart output of the python execution !!" diff --git a/doc/MEDMEM/MEDMEM_UML.png.in b/doc/MEDMEM/MEDMEM_UML.png.in deleted file mode 100644 index 28418d122041560577d4b5e8e68227d82d52ca18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6942 zcmc&(2~-qEw;omr_K1pLGit;Dk_41ybpZiIHjTLb!l)=T0|FvOP*D?s5n?MiC`eFb z)u5<2Y=TiV2xH?2ZY;{;0w^E~xDf%7^}p2v6Z4Y){pWx0yz|bSIdiAF>fZ0(`&HHL zs)!X%_H1R2GKKB-@p( zRvA-Ql@|}LTxjc@K5IkS#mrleMfP)6M7t(y`G02_V#b>MA$+2|V!UUEvFtNNnvleJ@Uc= z+yg&8zR4}l}jL0HO)I4iybqYKbVCYGE-EEKS zeeq4>5HjRCc<5yQCyOu+Ihz#3cpmAL-m3C&2O6Ye`A{7mzO^)EKQ}`$;jb|XBa`M} z#`3sgPSdI0!5?@|x16b%X$CAx=DQB{wq5flUtl*sn*4(Tbe{dR>6L2IK{aY+=eHlg z1d+FXZ|KFmoE^W3B2LUICMq_S+p2Iy4KufRsP2%*yrsek>wR=H`T9HjibfQ%I1j8uy1F6SZH>6NeUw5FJEdObZfx zglh6MBj^h?X?}h<=`$)=^D;GY3R1mkFs36DjQxFl*BF8zDp|*G`C4qKB z`6?yjJBF^{au+fJU%YNqxS?!>Ihf;=SSoPB0F~6VRQN9#!1TYxFjlXW(0t>LLo_5p z1y@grngK0RBvJuEA}|2S7yq(XVZs5jF1r|l_jPOan9xPtAxXOq=1W@8JV9BCy7`#u zOgSg?wCK%qIK%|~(8^}*4Jctg`r90n+isKNLlhGJ8} zJ*nv+x`T_AX2`%F&4e@V;>8md$wHD?G+(0hWz!^;_^%f^6cZ-u?zn^xohyEctkQ`b zKM`;!tmBAp-APTDfq20gJC$0J@6M>^lf@wlD7mf+vyd;*de-o3q8_bRs)j3?s0S(( zAmS{_V!>|(*E&lR5sO=@*1|BTKo)*&crpcHu84v&T%s9nwkV_DD1{c~!2gZ%Fjoy( z$ol_}@&C}XQZ*E|Km`aJC6<+jZ8Tiymoruxw$X6$A#6VSn$ob1gi8i~Pv!EZIVoM! zrI$9HQM`W-#(OgKp@v?+!f1=3lPt3PTbzcSXQuz?KeZ`#K?Tx()wtacH~kH5%*;aU zr;PccMR|KmB-!PQN36-S7u420n_m2D_O*?P+AYe>t&!voKiq!lmR)#v2CqxB=sv4d zExlBYe)WjxF>q_6yQ1n{D=1fTz|~OD@MUH~a0)i1qy^;}DHZG*#)7v^w9W!f(Cby{ z-Gv*08#7$Mndg~>gW$*@+IE_J0HrdChZ zu%3d!P&Fogt)aQ;?^1p zuCcZHb*Z!t!y{Ad1}H-;%2Y4UNH5O=_d4PnHE^Q2Wx)c~ci$AwU$x_7Oyn5Bqz&;T z&iV1Vupw3+!Dtr|k+ZRf^(tC}heF;*%%Ax2rBDA}{ES^-m%b)=l`Ibt4!jgiCKY5D zcB=ZR`|f+$^^mK(&$SF@bm4p9b54gg-?c2xbwL1|o&te_M+>tce`slsh3qZK!l^mH zKPOpa&jW9Oh|CA#fL^E#eDsqT3pa`10Q=5~rE#E`elI4{H*e{?^i`2nLh$*rl8)tH z2B&pw6jnJ_Sh$?&NW52GIr&J5QS!OoUEc&({-fY(Xi?-AbCLhIg%!GPOO7Mkv*r@t zW+XN|(hy%M$lx|QghZNs{E$i$xZQcOBvcu=VbUWcPZvF|T;_#u$L%Wn6qkpU+K0c3 z*qa>tDE7ixOe^JXudcV%y3MJFw*mfLxZV3SjJJY5xYr~xwaegmOs{QLI#f9UmSWN2 zxi>T@aY#+uxnD4wtoeq5*9(k+XS??%df*Vna*kcg)*WpfI^J)WzR=!HxSRN@r!S-TyM*?Dm1^feN|UHm&!dzniNb8ocXQ64iy@&CYpwO6zTDadVy>F zasSIhUAqb%5+$vh=(z>e1O~uG5DbxS(x<3nBq6vefGKh+H}1gV9;fZ1Ct_meoi%L_ zobrS7KR5#+o_HP6nUJW4HCOdVzG+>OzcuRIgsx3Ez2NLicB9_}dhVy65?>B)noyM8 zxw9zocJ+8_LSuTbRg>s2@kooL{s@)HexcPL=bjPC*}BxnMv~15kSlH5@>?lB#s#ij(FVpNo+Px z&O&JsLwm7>m$}=W>8xS_n9i-=)?IFj6{+@aSdE?*6SIe#hO*A*)+UcZ8elf?Z0T){ zTcQfzT0|rJ5EwlUb?dm_>zywdkY#FSp*oe^s5s`SEFIs|zxnmW1M;AanQuNq1Q6yW zCEhGVQ;%8gPy{s@{iuF=0ez8iz%QBFl3B=fA5jxk%|+Hx!2T?LKC?fw^qB}o!4#7= zCIkS>=l;8owo|2;-<$7i{9+*M8w5zw@$>N2ump)Em*tAZ=x(83X($^30lE$+m@;wE9@Uwhbn`rK2d zjdDffEsxU&u;_G0}*jeFF#nBD5Z^jE0)+zP_9SWE8L4h}a^_!?ms?8r$VR!w!0Eu4tKvF|^J~YvE z`MlQ9Fl96NZ0wfF{of6VS7dyjk(Qp@!-+b$AGrzd0Z~skp(;s`K$!+6o*L_p8)f9e z3n^0y31gTL0$^dx6Kn&E1|Q%pi>Wfns8MxD#VaTc1qq6{qNKF)(`Je&aLlj8%w}>i z0V?4Alc`#{T1XGCK;3kcXM3@ULNQ*8dM-rG;!YZc-{3iI02my%9vBz62&xio%%g{cBOJD4Zb7 z1_692NtgM!{NchpSrj9JooD1I6~i3SFmZz7-P_tDs!ZOdRCi2%5Iuji6E$P!CIu7; zl7rc_yF0@)^W$K0tGq!X*bm%sMl#yWNr$(!`$85h#UN>-L8o#F_MeB}MR-kXOmIc$ z3Tsu3$>t%l<&1rYWqyBU*Ko-2liq#}YMjIw@lRCeU}e3^O*Zdi+Do^PWb)NXiAzsC zaZ!1MAG}r0k4Fv|2}0P-&8qi16zGZ(NAWUZVtX-hdK`lTLSIu7wlWG!s~NHB6%hmQNVgu?%4C^1vTuulC0Mz3&q{ zDj*u3J0g7LLyvXE7)-=$#z^v!Rz)1PTx%vZXV;%<`^P^;So8w@AQ3P#pyaY{XYgt$ zj&{$ojH*B26Jim+`j0V`FM*v8M;sA?@YfL9HiTH}s08oAqxezlWu16HwG zL>|-|UVZ5yom{31B9eqBWKj)wlv3_^k3qzK&<3k=PUt?8fm)Z1*n@1~;N{>_4~Cs0 z;u-Jq$Mq0RPdEqoy}$9flnfkRACKcEWHpUt~6xQ@3h93dgs!TZ36 zWL)h0<1RKc9z3~0P%(vhw(l+DWA12!L6|mZ8gzb|$7XAFHe$St(y#7rqsX#IcRaoX zDE3RA=8?t&X|I|Vx21k>ajfKfhb)rowjn1h{x*@J!zb(3h=^kNyfqWd`nY%+MrYk7 zgxRyX3*oqI{j=p$9@!tV@WSnng8vy9-M7w7?;wda554SqI;flSAeNlF52v~>h2b>O zq};UA5z>=nU2_~xu=wyuy9NzVqJYd0%5E>*9q$w7razazcpa025B-I9ZcS|;I?8}P z#b6kYaVoqKE68Br7z|Q%@W{*t1CY#c&{>l5)Zq8ia~~}~WO1q7Hap@rjFM!$xu$#8 z4-G}a1*fet?-T0=jk;?Sj*b*D4QD`$0GX}%v$zh4x8lbzP}Jnc9~{IvEQI_LoKgrJ(Om8G-{<0VWh zgFO@lMcq_z)!c5ec3L&h5xj*DQTJ(5ft&3>WyZ1;GvqOx1$rOpi9LV)!@LFIwYvAM zx^-#ThG>@4nf#`JsgutXzAY_ZV%M#5lgT6hPF}+G>1Pa$pt23F;htnB_haOlrJsI< z<%O#I(5-7N5BV?D1m3f7ih*;goC61(@Ik_xx;?V8U@ozhv^+?g$s>y*?Jq(y zAdUQdW3U1H)8jV|&f~#B7DgZTgab9C-PaqBuOY_2{Dx-nor1I}nOee?X1UTiT5BQM z0L*$6lja+YRt|%=F5qGeAVN5qP$1#oJ(PpU!dD7z6#w7i_K?tT6nF6_PsSCg0_6DU zz|-~M%1ST%AWg8=S2dX*9aOF)ej6?yOTvLvQ0-{wVA(*-w1E<-m>^=w;uNF-we`3n z412`%VSwY7H)tL(W~GBDm;?XqAar2)_k$L}2`V}|LoP}z z&0l8Tgp%Z=zvAv#k~xay@*&u$1udbl%|qfOM|Wc-=WhxuRQ8Ew|EG;mD~=9_ zsDK2gkWL$(VRheEhl?fWlR4Knc|{@2ASn3B!-hU0z(HWQzww1ygY+5Y%n7I)B^6}$ zp!Yeh8-)bE_(q=*CKXDJ!8&RI0Zt8JEs_e>Dd;T#T99xuw`MYC!w5OB8vTx5@J0lg zs7u$~acDspyzppm*r-MYA7Qrwjas1oF#v&&3LyiUZ^0ZnXRkGsAZa?*J@_c?RihD8 zB!kg8P)}r+F@-cBZ#<{-^G3L9kQ}iJzi%Ldbei7{UoRSdRdnQfZ_KsVA)Rj;JM=~X z;tfRAf#76Pdq_F9x5-~8eB`+I)kET9YHZCRW49#6%d39+t*vJC*L_LCRg;1PHXxj= z2OH_RzPSAu$38O?i$Iu#xFWw3;~lE^Hr|Tg16^>}P#g=}ip%0;^5=C<1FFoGO4n9A zrhkL88(mlU$R6~gUUksx@`g5Z)psgGaV2SMV7j@R(Fa}Izcv-T>D9ryf H_ppBgO>1_B diff --git a/doc/MEDMEM/MEDMEM_UML_light.png.in b/doc/MEDMEM/MEDMEM_UML_light.png.in deleted file mode 100644 index 8eff5fa9c564a18200e14ddeff717d653cc8eff1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2803 zcmb_eX;4$=8a_!#iV$zDNE1)otMqDG@RUT{t^@_QM&q7wNrX8XHWiQ(1Bh&1M_Z1O zK{SkFT`DSDfT&am5UL&(0|pQwifmf6mB^A&z(8`plLV?W{c-Qi{gXL--}^q#^R6Gq z)~#JJ)(LikAZYBWmA)Gwh&&y9TO7&Y_i9UO76dt!tn&5QBztOjF53TW{x~S0)v{^f zhJEMb!td5@n=v0Eji($EnTiV2P9oL8!>`_qp|?46$I%|| zt6v55H@?91!y-UW=XCaGo*5{cWHq~lBmhDhN0P&y!lnSfO9;XDwvnk6(ZHX^?s(_* zy=I^>JYxKZ{KsQhs`sX$M;6CPJak=cvKl+KBB7mq6>dA_1cUF=xpAWHqguuhTXv{o(;!-rc^~ON& z&XB^Xr5s7WjD%HoM9sEbtZr&ngnB!`IwpV9>AbK47ZzOqzPlNMlkdLiGgsdXF!a&{ zTK!TqMjWLextui|&TJw#9>sSwGgT4Z_%O2{E#m8@2hoq5#*IkzXC~vploFswkx?fT z=}+K${$)_QgFHy2^>wm%ek<-EXS`3x75Y4nZ(SDGF$1q6Fe;f_S%{IIadEAG5{xG8 zX=EzS;|T_Ek-u>CoN_ai&R>UWq!{8U%*5x9y&0O4QR%>?eQI9I{M+*&x*eW?$;z14 z0W<~?{?FxrnC5mB@h=6UbN&I}CJ1c&6qm=$0uid!ZvG4l0M`?3{E1^i=uP>Eq%%7i zC$8x>Z;efhXJms9N?g-y-fh|Se+!bc)*j1b&JiNixjsawwCMbWcWRlSXFZpFC0{Ub z>d&YP0>|y3@LD=ZV}X)rBa3FJsX_gkO9PpNW@R=}O{>8*C29t!8PL9M1?>sZLYG*AXDN*A;>_1Gb9eC+fi(g{tO8CB-l`F zkd^Kb@PTY7HppZV1ehTkiXE~P0?hxDFn}WVK|f*aBKJ7Kl#ikO83{ri(<&a{Ga9gr zijkg2|Gy%>67!DhMWpK%%XrY7VXW|%aA;D}dE{H{*iaXtN2kE?F7trx^F4l2Fl`Om zAwagyYIA+kGv|BM$=mNZ?l5&Aw!Dmt5AGk8~AP!~Ujyb3T5s z{QKgU+QqpfaR5o#8E@!&Ym$7q2UH-py+Ml|TOvRi8u#$;bc*9x^x`Ri4aBZkj}1OZ z!8Pt}uAHoRwA?eT^Txw&!9S_3B!?cSRb_RGjbWf@zvY3tl|oVys1*@P220hub^=!D z404v;I;?om-3-<_nb_6<$SoGt4Yw+3g|fRjhxWY;qenbVYF48hNlSFaxyfB*aWD7-cQ0@Teo=5*SDaazDDr3Y{3ryo0zNhDKtPW& zc&O|y8_ZNGAzKNCsf$d+!UTHGBSZ%WrF`lJwuAcY%J#@ztraCE%g~z8lzUZA_VJDA?(MDPa{a<*r$owy#UcF75{|^kD?aiIBCVW>>En)om!Y$d zdl`v?U80wA&Aco4%%{{F@&ik|X{nyDsv$kQ_heX4Ozxh`qH$-#20J`<{v0957EjMZyn?l}TaZi|J>&n)6dUPt0n%SyK7&4$z7#+kn!5&^18ulA|&FXx!E z(;|um(dieFUaqSp8~@?l4nxm5)giGy=dH9dRTSQH`%cN?MdOFmMFVR#iG%rrIae|p zlCZ5U-TjFRG#5af!@mJ7@JZ!CZ-UZ;{#h^)Y$*{h23U=r5k2Kr>;CJ@cSofpB^d2n zwT3lKRC}9*|4Dtsw)frqw(6GH7n$RgM3bk5NjC0H{O#*wUmOt0?!!OWL6VGwH1Y!5H@)4^wj^> zMN3SV6WGc%Rnx&d5z}l}GjHY`tNPxEG8ZDgpUAOYmu}Gx(Pe z*zpp^$gb8{(`OS4@&we5?ooRN2*RzWGc2 Gll}vI@+C+B diff --git a/doc/MEDMEM/MEDMEM_UsersGuide.lyx b/doc/MEDMEM/MEDMEM_UsersGuide.lyx deleted file mode 100644 index e0008ba8c..000000000 --- a/doc/MEDMEM/MEDMEM_UsersGuide.lyx +++ /dev/null @@ -1,1248 +0,0 @@ -#LyX 1.1 created this file. For more info see http://www.lyx.org/ -\lyxformat 218 -\textclass report -\begin_preamble -% Packages -%%\usepackage[french]{babel} -%\usepackage[T1]{fontenc} -%\usepackage{epsf} -%\usepackage[dvips]{graphicx} -%\usepackage{fancyhdr} -%\usepackage{pslatex} - -\usepackage[dvips,all,light]{draftcopy} - -\usepackage{verbatim} - -% ____________________________________________________________________________ -% | | -% | MISE EN PAGE | -% |____________________________________________________________________________| - -\draftcopyName{Projet}{200} - -\setlength{\oddsidemargin}{0cm} -\setlength{\marginparsep}{0cm} -\setlength{\marginparwidth}{0cm} - -\setlength{\textwidth}{15cm} - -\setlength{\topmargin}{0cm} -\setlength{\headheight}{0cm} -\setlength{\headsep}{0cm} - -\setlength{\textheight}{23cm} - -% ____________________________________________________________________________ -% | | -% | COMMANDES UTILISATEUR | -% |____________________________________________________________________________| - -\newcommand{\method}[1]{method \mbox{\textbf{#1}}} - -\newcommand{\myref}[1]{\ref{#1}, page \pageref{#1}} - -\newcommand{\fileCxx}[1]{ - \subsection{Full C++ example~: } - \label{#1} - \verbatiminput{#1} -} - -\newcommand{\filePython}[1]{ - \subsection{Full Python example~: } - \label{#1} - \verbatiminput{#1} -} - -% ____________________________________________________________________________ -% | | -% | LE DOCUMENT | -% |____________________________________________________________________________| -% -\title{User's Guide Of Med Memory} -\author{Patrick GOLDBRONN \and Eric Fayolle \and Nadir Bouhamou} - -% ____________________________________________________________________________ -% | | -% | DEBUT DU DOCUMENT | -% |____________________________________________________________________________| -% -\end_preamble -\language english -\inputencoding auto -\fontscheme default -\graphics default -\paperfontsize 11 -\spacing single -\papersize a4paper -\paperpackage a4 -\use_geometry 0 -\use_amsmath 0 -\paperorientation portrait -\secnumdepth 3 -\tocdepth 3 -\paragraph_separation skip -\defskip medskip -\quotes_language english -\quotes_times 2 -\papercolumns 1 -\papersides 1 -\paperpagestyle default - -\layout Standard - - -\latex latex - -\backslash -sloppy -\layout Standard - - -\latex latex - -\backslash -cleardoublepage -\newline - -\latex default - -\begin_inset LatexCommand \tableofcontents{} - -\end_inset - - -\layout Chapter - -Convention -\layout Itemize - -All numbering begin at one (take care of array index !) ; -\layout Itemize - -When you get a C type array with a -\family typewriter -get... - -\family default - 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 -\family typewriter -set... -\family default -. - -\layout Itemize - -Difference between local and global number\SpecialChar ~ -: when we talk about an element - number, we could see -\begin_inset Formula \( i^{th} \) -\end_inset - - quadrangle ( -\begin_inset Formula \( i^{th} \) -\end_inset - - in quadrangles array\SpecialChar ~ -: local numbering) or -\begin_inset Formula \( j^{th} \) -\end_inset - - element ( -\begin_inset Formula \( j^{th} \) -\end_inset - - in all elements array\SpecialChar ~ -: global numbering). - This two numbering are equivalent only if we have one geometric type. -\layout Chapter - -How to use MESH object -\layout Section - -General Information -\layout Standard - -We could get some general information about a MESH object such as\SpecialChar ~ -: -\layout Itemize - -name ( -\latex latex - -\backslash -method{getName} -\latex default -) -\layout Itemize - -a description ( -\latex latex - -\backslash -method{getDescription} -\latex default -) -\layout Itemize - -the space dimension ( -\latex latex - -\backslash -method{getSpaceDimension} -\latex default -) -\layout Itemize - -the mesh dimension ( -\latex latex - -\backslash -method{getMeshDimension} -\latex default -) -\layout Standard - - -\latex latex - -\backslash -fileCxx{MESHgeneral.cxx} - -\backslash -filePython{MESHgeneral.py} -\layout Section - -Information about nodes -\layout Enumerate - -I want to get the number of nodes\SpecialChar ~ -: Realy simple, use -\latex latex - -\backslash -method{getNumberOfNodes} -\latex default -. - -\layout Enumerate - -I want to get the coordinates components names\SpecialChar ~ -: use -\latex latex - -\backslash -method{getCoordinatesNames} -\latex default - which return a string array (one string for each space dimension) -\layout Enumerate - -I want to get the coordinates components units\SpecialChar ~ -: use -\latex latex - -\backslash -method{getCoordinatesUnits} -\latex default - which return a string array (one string for each space dimension) -\layout Enumerate - -I want to get the coordinates system\SpecialChar ~ -: use -\latex latex - -\backslash -method{getCoordinatesSystem} -\latex default - which return a string ( -\latex latex - -\backslash -verb+CARTESIAN+ -\latex default -, -\latex latex - -\backslash -verb+CYLINDRICAL+ -\latex default - or -\latex latex - -\backslash -verb+SPHERICAL+ -\latex default -). - -\layout Enumerate - -I want to get the nodes coordinates\SpecialChar ~ -: use -\latex latex - -\backslash -method{getCoordinates} -\latex default - which return a pointer to the coordinates array where values are interlace - or no. - -\series bold -Warning\SpecialChar ~ -: -\begin_deeper -\layout Itemize - -When we get coordinates in -\latex latex - -\backslash -verb+MED_NO_INTERLACE+ -\latex default - mode, we get an array where values are ordered like ( -\latex latex - -\backslash -verb+X1,X2,X..., Y1,Y..., Z1,Z...+ -\latex default -). - -\layout Itemize - -When we get coordinates in -\latex latex - -\backslash -verb+MED_FULL_INTERLACE+ -\latex default - mode, we get an array where values are ordered like ( -\latex latex - -\backslash -verb+X1,Y1,Z1, X2,Y2,Z2, ...+ -\latex default -). - -\end_deeper -\layout Enumerate - -I want to get one particular value of coordinate\SpecialChar ~ -: use -\latex latex - -\backslash -method{getCoordinate} -\latex default - which return the value of -\begin_inset Formula \( i^{th} \) -\end_inset - - node and -\begin_inset Formula \( j^{th} \) -\end_inset - - axis. -\layout Standard - - -\latex latex - -\backslash -fileCxx{MESHcoordinates.cxx} - -\backslash -filePython{MESHcoordinates.py} -\layout Section - -Information about cells -\layout Enumerate - -I want to get the number of geometric type for a mesh entity\SpecialChar ~ -: use -\latex latex - -\backslash -method{getNumberOfTypes} -\begin_deeper -\layout Standard - - -\series bold -C++ Example\SpecialChar ~ -: -\layout Standard - - -\latex latex - -\backslash -verb+int NumberOfCellsTypes = myMesh.getNumberOfTypes(MED_CELL);+ -\end_deeper -\layout Enumerate - -I want to get all geometric type for a mesh entity\SpecialChar ~ -: use -\latex latex - -\backslash -method{getTypes} -\latex default - to get an array of -\latex latex - -\backslash -verb+medGeometryElement+ -\latex default - (to use directly in others methods) or -\latex latex - -\backslash -method{getCellsTypes} -\latex default - to get an array of -\latex latex - -\backslash -verb+CELLMODEL+ -\latex default - (to ask mode information\SpecialChar ~ -: see CellModel) . -\begin_deeper -\layout Standard - - -\series bold -C++ Example\SpecialChar ~ -: -\layout Standard - - -\latex latex - -\backslash -verb+medGeometryElement * Types = myMesh.getTypes(MED_CELL);+ -\layout Standard - - -\latex latex - -\backslash -verb+CELLMODEL * CellsTypes = myMesh.getCellsTypes(MED_CELL);+ -\layout Standard - -(each arrays are size -\latex latex - -\backslash -verb+NumberOfCellsTypes+ -\latex default -) -\end_deeper -\layout Enumerate - -I want to get the number of cells\SpecialChar ~ -: use -\latex latex - -\backslash -method{getNumberOfElements} -\latex default - which return this information. - You must give the mesh entity ( -\latex latex - -\backslash -verb+MED_CELL+ -\latex default -, -\latex latex - -\backslash -verb+MED_FACE+ -\latex default -, -\latex latex - -\backslash -verb+MED_EDGE+ -\latex default - or -\latex latex - -\backslash -verb+MED_NODE+ -\latex default -) and a geometric type of this entity. -\begin_deeper -\layout Standard - - -\series bold -C++ Example\SpecialChar ~ -: -\layout Standard - - -\latex latex - -\backslash -verb+int NumberOfTriangle = myMesh.getNumberOfElements(MED_FACE,MED_TRIA3);+ -\layout Standard - - -\latex latex - -\backslash -verb+int NumberOfFace = myMesh.getNumberOfElements(MED_FACE,MED_ALL_ELEMENT);+ -\end_deeper -\layout Enumerate - -I want to get the geometric type of one element\SpecialChar ~ -: use -\latex latex - -\backslash -method{getElementType} -\latex default - which return a -\latex latex - -\backslash -verb+medGeometryElement+ -\latex default -. -\begin_deeper -\layout Standard - - -\series bold -C++ Example\SpecialChar ~ -: -\layout Standard - - -\latex latex - -\backslash -verb+medGeometryElement myType = myMesh.getElementType(MED_FACE,10);+ -\layout Standard - -Return the -\latex latex - -\backslash -verb+medGeometryElement+ -\latex default - of -\begin_inset Formula \( 10^{th} \) -\end_inset - - face. -\end_deeper -\layout Enumerate - -I want to get a connectivity\SpecialChar ~ -: use -\latex latex - -\backslash -method{getConnectivity} -\latex default - which return an array with connectivity values. -\begin_deeper -\layout Standard - - -\begin_inset LatexCommand \label{getConnectivity} - -\end_inset - - -\layout Standard - - -\series bold -C++ Example\SpecialChar ~ -: -\layout Standard - - -\latex latex - -\backslash -begin{verbatim} -\newline -int NumberOfTetrahedron = myMesh.getNumberOfElements(MED_CELL,MED_TETRA4); -\newline -int * TetrahedronConnectivity = -\newline - myMesh.getConnectivity(MED_FULL_ENTERLACE, -\newline - MED_NODAL, -\newline - MED_CELL, -\newline - MED_TETRA4); -\newline - -\backslash -end{verbatim} -\backslash -verb+TetrahedronConnectivity+ -\latex default - contain nodal connectivity of tetrahedron in mesh. - It is arranged in full enterlace mode and its size is -\latex latex - -\backslash -verb+NumberOfTetrahedron x 4+ -\latex default -. -\layout Standard - -If you want to get connectivity of all elements (with -\latex latex - -\backslash -verb+Type=MED_ALL_ELEMENTS+ -\latex default -), you must use the index array (return by -\latex latex - -\backslash -method{getConnectivityIndex} -\latex default -) to get connectivity for each elements (see example -\latex latex - -\backslash -myref{MESHconnectivities.cxx} -\latex default -). -\end_deeper -\layout Enumerate - -I want to get an element number from a connectivity\SpecialChar ~ -: use -\latex latex - -\backslash -method{getElementNumber} -\latex default - which return the global number of a given connectivity. -\begin_deeper -\layout Standard - - -\series bold -C++ Example\SpecialChar ~ -: -\layout Standard - - -\latex latex - -\backslash -verb+int * myElementConnectivity = {2,10,12,14};+ -\layout Standard - - -\latex latex - -\backslash -verb+int myNumber = myMesh.getElementNumber(MED_NODAL,MED_CELL,myElementConnectiv -ity);+ -\end_deeper -\layout Standard - - -\latex latex - -\backslash -fileCxx{MESHconnectivities.cxx} - -\backslash -filePyhton{MESHconnectivities.py} -\layout Chapter - -How to use SUPPORT object -\layout Section - -Create a SUPPORT object -\layout Standard - - -\begin_inset LatexCommand \label{CreateSupport} - -\end_inset - - -\layout Standard - -To create a SUPPORT object, you must give : -\layout Itemize - -a reference to a MESH object -\layout Itemize - -its name -\layout Itemize - -on which mesh entity it apply to -\layout Standard - - -\series bold -C++ example\SpecialChar ~ -: -\layout Standard - - -\latex latex - -\backslash -verb+SUPPORT mySupport(myMesh,''support sur toute les faces'',MED_FACE) - ;+ -\latex default - By default, this support is defined on all element of the given entity. -\layout Standard - -If you want a restricted SUPPORT, you must add manualy information about - what do you want\SpecialChar ~ -: -\layout Itemize - -is not on all elements\SpecialChar ~ -: -\latex latex - -\backslash -verb+mySupport.setAll(false);+ -\layout Itemize - -on how many geometric type\SpecialChar ~ -: -\newline - -\latex latex - -\backslash -verb+mySupport.setNumberOfGeometricType(myNumberOfGeometricType);+ -\layout Itemize - -on which geometric type\SpecialChar ~ -: -\newline - -\latex latex - -\backslash -verb+mySupport.setGeometricType(myGeometricType);+ -\layout Itemize - -Temporary : the Gauss point number for each geometric type\SpecialChar ~ -: -\newline - -\latex latex - -\backslash -verb+mySupport.setNumberOfGaussPoint(myNumberOfGaussPoint);+ -\layout Itemize - -the number of elements for each geometric type\SpecialChar ~ -: -\newline - -\latex latex - -\backslash -verb+mySupport.setNumberOfEntities(myNumberOfEntities);+ -\layout Itemize - -the total number of elements\SpecialChar ~ -: -\newline - -\latex latex - -\backslash -verb+mySupport.setTotalNumberOfEntities(myTotalNumberOfEntities);+ -\layout Itemize - -the array which contains elements for each geometric type\SpecialChar ~ -: -\newline - -\latex latex - -\backslash -verb+mySupport.setNumber(myNumber);+ -\layout Standard - -You could also use -\latex latex - -\backslash -method{setpartial} -\latex default - which set all you need. -\layout Section - -Use a SUPPORT object -\layout Standard - -You could get all basic information (as you set them in -\latex latex - -\backslash -myref{CreateSupport} -\latex default -)\SpecialChar ~ -: -\layout Itemize - - -\latex latex - -\backslash -verb+getName()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getDescription()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getMesh()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getEntity()+ -\layout Itemize - - -\latex latex - -\backslash -verb+isOnAllElements()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getNumberOfTypes()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getTypes()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getNumberOfGaussPoint()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getNumberOfGaussPoint(myGeometricType)+ -\layout Itemize - - -\latex latex - -\backslash -verb+getGeometricTypeNumber()+ -\layout Itemize - - -\latex latex - -\backslash -verb+getNumberOfElements(myGeometricType)+ -\layout Itemize - - -\latex latex - -\backslash -verb+getNumber(myGeometricType)+ -\layout Itemize - - -\latex latex - -\backslash -verb+getNumberIndex()+ -\layout Standard - -For details about this methods, see the reference manual -\begin_inset LatexCommand \ref{RefManual} - -\end_inset - -. -\layout Standard - -The use of -\latex latex - -\backslash -method{getNumber} -\latex default - and -\latex latex - -\backslash -method{getNumberIndex} -\latex default - are the same as -\latex latex - -\backslash -method{getConnectivity} -\latex default - and -\latex latex - -\backslash -method{getConnectivityIndex} -\latex default - (see item -\latex latex - -\backslash -myref{getConnectivity} -\layout Standard - -There is another particular method to blend another SUPPORT object into - it. -\layout Standard - -For exemple in C++ : -\latex latex - -\backslash -begin{verbatim} -\newline -SUPPORT mySupport ; -\newline -SUPPORT myOtherSupport ; -\newline -... -\newline -mySupport.blending(myOtherSupport) ; -\newline - -\backslash -end{verbatim} -\layout Standard - - -\latex latex - -\backslash -verb+mySupport+ -\latex default - contain now all elements defined originally in it, more those defined in - -\latex latex - -\backslash -verb+myOtherSupport+ -\latex default -. -\layout Section - -Case of FAMILY object -\layout Section - -Case of GROUP object -\layout Chapter - -How to use Field -\layout Standard - - -\latex latex - -\backslash -newpage -\newline -% -\backslash -thebibliography{biblio} -\layout Standard -\bibitem {RefManual} - -Reference Manual\SpecialChar ~ -: -\latex latex -http://www-drn2.cea.fr/MED/MEDMEM/DOC/html/index.html -\layout Chapter - -Using drivers -\layout Standard - -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. -\layout Section - -Invoking a driver -\layout Subsection - -Invoking a driver at creation object time -\layout Standard - -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 . -\layout Standard - -ex 1.1 : For a FIELD object, invoking FIELD myField(MED_DRIVER,fileName,f -ieldName) create a FIELD object and a driver which loads the mesh - from the MED file (Not implemented yet !). -\layout Standard - -ex 1.2 : To remove the default driver previously created myField->rmDriver(); -\layout Standard - -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 . -\layout Standard - -ex 3 : For a MED object, invoking MED myMed(MED_DRIVER,fileName) create - a MED object to explore the MED file . -\layout Standard - -rem 1 : ex1 is equivalent to -\begin_inset LatexCommand \ref{sec:invoking_a_driver_from_the_std_drv_method} - -\end_inset - - ex1. -\layout Standard - -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(). -\layout Standard - - -\latex latex - -\backslash -fileCxx{MEDMEM_InvokingDriverAtObjectCreationTime.cxx} -\layout Subsection - -Invoking a driver from the standard driver method of an object -\begin_inset LatexCommand \label{sec:invoking_a_driver_from_the_std_drv_method} - -\end_inset - - -\layout Standard - -This way of invoking a driver give the possiblility to add several drivers - to an exiting object. -\layout Standard - -ex1 : First we create a FIELD without any driver FIELD\SpecialChar ~ -*\SpecialChar ~ -myField1\SpecialChar ~ -=\SpecialChar ~ -new\SpecialChar ~ -FIELD -; then we add a driver with int myDriver1 = myField1->addDriver(driverTy -pe1, fileName1, fieldName1); for reading from file - with myField1->read(myDriver1); -\layout Standard - -ex2 : We add a new driver of type int myDriver2 = myField1->addDri -ver(driverType2, fileName2,fieldName2); in order to write myField1 in file - with name using command myField1->write(myDriver2); -\layout Standard - -rem 1 : Files are openned then closed each time you call read() or write() - methods. -\layout Standard - -rem 2 : If you use more than a driver you need to keep the driver handlers - (myDriverI ). -\layout Standard - - -\latex latex - -\backslash -fileCxx{MEDMEM_InvokingDriverFromStandardObjectMethod.cxx} -\layout Subsection - -Invoking a driver and attaching it to an existing object -\layout Standard - -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. -\layout Standard - -ex1 : First we create a FIELD without any driver FIELD\SpecialChar ~ -*\SpecialChar ~ -myField1\SpecialChar ~ -=\SpecialChar ~ -new - FIELD(); then we create a read-only driver MED_FIELD_RDONLY_DRIVER\SpecialChar ~ -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(); -\layout Standard - -Don't forget to close the file with myRdOnlyDriver->close(). -\layout Standard - -ToDo : By now when you create such specific drivers, the object doesn't - know anything about it. - -\layout Standard - - -\latex latex - -\backslash -fileCxx{MEDMEM_InvokingDriverByAttachingItToAnObject.cxx} -\layout Section - -Using the MED driver -\layout Standard - -The MED object provides the ability of : -\layout Enumerate -\noindent -Obtainning a reference on the whole structure contained in a file. -\layout Enumerate - -Obtainning the list of all the Meshes/Fields names contained in a file. -\layout Enumerate - -Obtainning a Mesh/Field reference using a name. -\layout Enumerate - -Writting a whole set of independent objects with a simple command. - -\layout Subsection - -Exploring files -\layout Standard - -In this first use case the user wants to explore the meshes & fields containned - within a file of type given by the parameter. -\layout Standard - -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. - -\layout Standard - -This is equivalent to MED\SpecialChar ~ -*\SpecialChar ~ -myMed\SpecialChar ~ -=\SpecialChar ~ -new\SpecialChar ~ -MED(); myDriver\SpecialChar ~ -=\SpecialChar ~ -myMed->addDriver(driverType1, -fileName1); myMed->readFileStruct(myDriver); -\layout Standard - -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\SpecialChar ~ -=\SpecialChar ~ -myMed->getNumberOfMeshes() -; then get the list with myMeshNames\SpecialChar ~ -=\SpecialChar ~ -new string[getMeshNames]; myMed->getMeshNam -es(myMeshNames). - -\layout Standard - -Note you can also use the deque getMeshNames() method. - -\layout Standard - -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\SpecialChar ~ -=\SpecialChar ~ -myMed->getNumberOfFields() -; then get the list with myFieldNames\SpecialChar ~ -=\SpecialChar ~ -new string[getFieldNames]; myMed->getField -Names(myFieldNames). -\layout Standard - -ex 4 :To get a particular MESH use MESH * myMesh1 = myMED->getMesh(myMeshNames[0 -]) -\layout Standard - -ex 5 :To get a particular FIELD you first need to know what (time step, - iteration number) list is used by calling deque\SpecialChar ~ -myField1DtIt\SpecialChar ~ -=\SpecialChar ~ -myMed->getF -ieldIteration(FieldName[0]) ; then you can ask for getting a specific FIELD - with FIELD\SpecialChar ~ -*\SpecialChar ~ -myField1\SpecialChar ~ -=\SpecialChar ~ -myMED->getField(myFieldNames[0],myField1DtIt[0].dt,myField1D -tIt[0].it). -\layout Standard - -ex2 : To write the whole content of a MED object first add a driver myDriver2\SpecialChar ~ -=\SpecialChar ~ -my -Med.addDriver(driverType2,\SpecialChar ~ -fileName2); then ask for writing the object myMed->writ -e(myDriver2); (not implemented yet !) -\layout Standard - -You can remove the driver with myMed->rmDriver(myDriver2); -\layout Standard - -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 !) -\layout Subsubsection - -Adding existing MESHes/FIELDs objects -\layout Standard - -Not yet implemented. -\the_end diff --git a/doc/MEDMEM/MEDMEM_UsersGuide.tex.in b/doc/MEDMEM/MEDMEM_UsersGuide.tex.in deleted file mode 100644 index a0ea7cd2a..000000000 --- a/doc/MEDMEM/MEDMEM_UsersGuide.tex.in +++ /dev/null @@ -1,141 +0,0 @@ -%% LyX 1.1 created this file. For more info, see http://www.lyx.org/. -%% Do not edit unless you really know what you are doing. -\documentclass[11pt,a4paper,english]{report} -\usepackage[T1]{fontenc} -\usepackage[latin1]{inputenc} -\usepackage{babel} -\usepackage{graphicx} \setcounter{secnumdepth}{3} -\setcounter{tocdepth}{3} -\setlength\parskip{\medskipamount} -\setlength\parindent{0pt} - -\makeatletter - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands. -\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. -% Packages -%%\usepackage[french]{babel} -%\usepackage{epsf} -%\usepackage[dvips]{graphicx} -%\usepackage{fancyhdr} -%\usepackage{pslatex} - -%\usepackage[dvips,all,light]{draftcopy} - -\usepackage{verbatim} - -% ___________________________________________________________________________ -% | | -% | MISE EN PAGE | -% |___________________________________________________________________________| -%\draftcopyName{Projet}{200} - -\setlength{\oddsidemargin}{0cm} -\setlength{\marginparsep}{0cm} -\setlength{\marginparwidth}{0cm} - -\setlength{\textwidth}{16cm} - -\setlength{\topmargin}{0cm} -\setlength{\headheight}{0cm} -\setlength{\headsep}{0cm} - -\setlength{\textheight}{24cm} - -% ___________________________________________________________________________ -% | | -% | COMMANDES UTILISATEUR | -% |___________________________________________________________________________| - -\newcommand{\method}[1]{method \mbox{\textbf{#1}}} - -\newcommand{\myref}[1]{\ref{#1}, page \pageref{#1}} - -\newcommand{\fileCxx}[1]{ - \subsection{Full C++ example~: } - \label{#1} - \verbatiminput{@srcdir@/#1} -} - -\newcommand{\filePython}[1]{ - \subsection{Full Python example~: } - \label{#1} - \verbatiminput{@srcdir@/#1} -} - - -% ___________________________________________________________________________ -% | | -% | LE DOCUMENT | -% |___________________________________________________________________________| -% -\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 \and Vincent Bergeaud} - -% ___________________________________________________________________________ -% | | -% | DEBUT DU DOCUMENT | -% |___________________________________________________________________________| -% - -\makeatother -\begin{document} -\sloppy - -\maketitle - - -% ___________________________________________________________________________ -% | | -% | TABLE DES MATIERES | -% |___________________________________________________________________________| -% -%\newpage -\cleardoublepage -\tableofcontents - -% ___________________________________________________________________________ -% | | -% | DOCUMENT PRINCIPAL | -% |___________________________________________________________________________| -% - -\input{MEDMEM_Content.tex} -% - -% ___________________________________________________________________________ -% | | -% | REFERENCES | -% |___________________________________________________________________________| - -\newpage -%\thebibliography{biblio} -\begin{thebibliography}{1} - -\addcontentsline{toc}{chapter}{\refname} - -\addcontentsline{toc}{chapter}{Bibliography} - -\bibitem{RefManualMedFile} -\newblock {Reference Manual for Med File~:} \\ -{\sc V. Lefebvre \and E. Fayolle} \\ -\newblock {Projet PAL: Définition du modèle d'échange de données MED V2.2} -\newblock {\it Note technique EDF/SINETICS} -\newblock {HI-26-03-012/A} \\ -\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} -\newblock {VTK home page~: \verb+http://public.kitware.com/VTK+} - -\end{thebibliography} - - -\end{document} diff --git a/doc/MEDMEM/MESHINGexample.cxx b/doc/MEDMEM/MESHINGexample.cxx deleted file mode 100644 index 45249d5ba..000000000 --- a/doc/MEDMEM/MESHINGexample.cxx +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -// - -#include "MEDMEM_Meshing.hxx" -#include "MEDMEM_Group.hxx" - -using namespace MEDMEM ; -using namespace MED_EN ; - -using namespace std; - -int main (int argc, char ** argv) { - - // filename to save the generated MESH - string filename = "meshing.med" ; - - MESHING* myMeshing = new MESHING; - myMeshing->setName("meshing") ; - - // define coordinates - - int SpaceDimension = 3 ; - int NumberOfNodes = 19 ; - double Coordinates[57] = { - 0.0, 0.0, 0.0, - 0.0, 0.0, 1.0, - 2.0, 0.0, 1.0, - 0.0, 2.0, 1.0, - -2.0, 0.0, 1.0, - 0.0, -2.0, 1.0, - 1.0, 1.0, 2.0, - -1.0, 1.0, 2.0, - -1.0, -1.0, 2.0, - 1.0, -1.0, 2.0, - 1.0, 1.0, 3.0, - -1.0, 1.0, 3.0, - -1.0, -1.0, 3.0, - 1.0, -1.0, 3.0, - 1.0, 1.0, 4.0, - -1.0, 1.0, 4.0, - -1.0, -1.0, 4.0, - 1.0, -1.0, 4.0, - 0.0, 0.0, 5.0 - }; - - myMeshing->setCoordinates(SpaceDimension,NumberOfNodes,Coordinates,"CARTESIAN",MED_FULL_INTERLACE); - - string Names[3] = { "X","Y","Z" } ; - myMeshing->setCoordinatesNames(Names); - - string Units[3] = { "cm","cm","cm" } ; - myMeshing->setCoordinatesUnits(Units) ; - - // define conectivities - - // cell part - - const int NumberOfTypes = 3 ; - medGeometryElement Types[NumberOfTypes] = {MED_TETRA4,MED_PYRA5,MED_HEXA8} ; - const int NumberOfElements[NumberOfTypes] = {12,2,2} ; - - myMeshing->setNumberOfTypes(NumberOfTypes,MED_CELL); - myMeshing->setTypes(Types,MED_CELL); - myMeshing->setNumberOfElements(NumberOfElements,MED_CELL); - - const int sizeTetra = 12*4 ; - int ConnectivityTetra[sizeTetra]= - { - 1,2,3,6, - 1,2,4,3, - 1,2,5,4, - 1,2,6,5, - 2,7,4,3, - 2,8,5,4, - 2,9,6,5, - 2,10,3,6, - 2,7,3,10, - 2,8,4,7, - 2,9,5,8, - 2,10,6,9 - }; - - myMeshing->setConnectivity(MED_CELL,MED_TETRA4,ConnectivityTetra); - - int ConnectivityPyra[2*5]= - { - 7,8,9,10,2, - 15,18,17,16,19 - }; - - myMeshing->setConnectivity(MED_CELL,MED_PYRA5,ConnectivityPyra); - - int ConnectivityHexa[2*8]= - { - 11,12,13,14,7,8,9,10, - 15,16,17,18,11,12,13,14 - }; - - myMeshing->setConnectivity(MED_CELL,MED_HEXA8,ConnectivityHexa); - - // face part - - const int NumberOfFacesTypes = 2 ; - medGeometryElement FacesTypes[NumberOfFacesTypes] = {MED_TRIA3,MED_QUAD4} ; - const int NumberOfFacesElements[NumberOfFacesTypes] = {4,4} ; - - myMeshing->setNumberOfTypes(NumberOfFacesTypes,MED_FACE); - myMeshing->setTypes(FacesTypes,MED_FACE); - myMeshing->setNumberOfElements(NumberOfFacesElements,MED_FACE); - - const int sizeTria = 3*4 ; - int ConnectivityTria[sizeTria]= - { - 1,4,3, - 1,5,4, - 1,6,5, - 1,3,6 - }; - - myMeshing->setConnectivity(MED_FACE,MED_TRIA3,ConnectivityTria); - - int ConnectivityQua[4*4]= - { - 7,8,9,10, - 11,12,13,14, - 11,7,8,12, - 12,8,9,13 - }; - - myMeshing->setConnectivity(MED_FACE,MED_QUAD4,ConnectivityQua); - - // edge part - - // not yet implemented : if set, results are unpredictable. - - // Some groups : - - // Node : - { - GROUP* myGroup = new GROUP; - myGroup->setName("SomeNodes"); - myGroup->setMesh(myMeshing); - myGroup->setEntity(MED_NODE); - myGroup->setNumberOfGeometricType(1); - medGeometryElement myTypes[1] = {MED_NONE}; - myGroup->setGeometricType(myTypes); - const int myNumberOfElements[1] = {4} ; - myGroup->setNumberOfElements(myNumberOfElements); - const int index[1+1] = {1,5} ; - const int value[4]= { 1,4,5,7} ; - myGroup->setNumber(index,value); - - myMeshing->addGroup(*myGroup); - myGroup->removeReference(); - } - { - GROUP* myGroup = new GROUP; - myGroup->setName("OtherNodes"); - myGroup->setMesh(myMeshing); - myGroup->setEntity(MED_NODE); - myGroup->setNumberOfGeometricType(1); - medGeometryElement myTypes[1] = {MED_NONE}; - myGroup->setGeometricType(myTypes); - const int myNumberOfElements[1] = {3} ; - myGroup->setNumberOfElements(myNumberOfElements); - const int index[1+1] = {1,4} ; - const int value[3]= { 2,3,6} ; - myGroup->setNumber(index,value); - - myMeshing->addGroup(*myGroup); - myGroup->removeReference(); - } - - // Cell : - { - GROUP* myGroup = new GROUP; - myGroup->setName("SomeCells"); - myGroup->setMesh(myMeshing); - myGroup->setEntity(MED_CELL); - myGroup->setNumberOfGeometricType(3); - medGeometryElement myTypes[3] = {MED_TETRA4,MED_PYRA5,MED_HEXA8}; - myGroup->setGeometricType(myTypes); - const int myNumberOfElements[3] = {4,1,2} ; - myGroup->setNumberOfElements(myNumberOfElements); - const int index[3+1] = {1,5,6,8} ; - const int value[4+1+2]= - { - 2,7,8,12, - 13, - 15,16 - }; - myGroup->setNumber(index,value); - - myMeshing->addGroup(*myGroup); - myGroup->removeReference(); - } - { - GROUP* myGroup = new GROUP; - myGroup->setName("OtherCells"); - myGroup->setMesh(myMeshing); - myGroup->setEntity(MED_CELL); - myGroup->setNumberOfGeometricType(2); - medGeometryElement myTypes[] = {MED_TETRA4,MED_PYRA5}; - myGroup->setGeometricType(myTypes); - const int myNumberOfElements[] = {4,1} ; - myGroup->setNumberOfElements(myNumberOfElements); - const int index[3+1] = {1,5,6} ; - const int value[4+1]= - { - 3,4,5,9, - 14 - }; - myGroup->setNumber(index,value); - - myMeshing->addGroup(*myGroup); - myGroup->removeReference(); - } - - // Face : - { - GROUP* myGroup = new GROUP; - myGroup->setName("SomeFaces"); - myGroup->setMesh(myMeshing); - myGroup->setEntity(MED_FACE); - myGroup->setNumberOfGeometricType(2); - medGeometryElement myTypes[2] = {MED_TRIA3,MED_QUAD4}; - myGroup->setGeometricType(myTypes); - const int myNumberOfElements[2] = {2,3} ; - myGroup->setNumberOfElements(myNumberOfElements); - const int index[2+1] = {1,3,6} ; - const int value[2+3]= - { - 2,4, - 5,6,8 - } ; - myGroup->setNumber(index,value); - - myMeshing->addGroup(*myGroup); - myGroup->removeReference(); - } - { - GROUP* myGroup = new GROUP; - myGroup->setName("OtherFaces"); - myGroup->setMesh(myMeshing); - myGroup->setEntity(MED_FACE); - myGroup->setNumberOfGeometricType(1); - medGeometryElement myTypes[1] = {MED_TRIA3}; - myGroup->setGeometricType(myTypes); - const int myNumberOfElements[1] = {2} ; - myGroup->setNumberOfElements(myNumberOfElements); - const int index[1+1] = {1,3} ; - const int value[2]= - { - 1,3 - } ; - myGroup->setNumber(index,value); - - myMeshing->addGroup(*myGroup); - myGroup->removeReference(); - } - - // all rigtht, we save it ! - - int id = myMeshing->addDriver(MED_DRIVER,filename,myMeshing->getName()); - myMeshing->write(id) ; - myMeshing->removeReference(); -} diff --git a/doc/MEDMEM/MESHINGexample.py b/doc/MEDMEM/MESHINGexample.py deleted file mode 100644 index 9d5937c34..000000000 --- a/doc/MEDMEM/MESHINGexample.py +++ /dev/null @@ -1,489 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -# - -################################################################################### -# This Python script uses the wrapped C++ class MESHING to buid a mesh from only -# primitive data like coordinates (Pythoin double array) and connectivity (Python -# integer arrays). It is the Python equivalent of the C++ program -# test_MEDMEM_Meshing.cxx in the ../MEDMEM directory of the SALOME distribution -################################################################################### -# -from libMEDMEM_Swig import * - -# files name to save the generated MESH(ING) in different format -# Med V2.1 Med V2.2 and vtk - -med21FileName = "toto21.med" - -med22FileName = "toto22.med" - -vtkFileName = "toto.vtk" - -myMeshing = MESHING() - -myMeshing.setName("meshing") - -# definition of the coordinates - -spaceDimension = 3 - -numberOfNodes = 19 - -coordinates = [ - 0.0, 0.0, 0.0 , - 0.0, 0.0, 1.0 , - 2.0, 0.0, 1.0 , - 0.0, 2.0, 1.0 , - -2.0, 0.0, 1.0 , - 0.0, -2.0, 1.0 , - 1.0, 1.0, 2.0 , - -1.0, 1.0, 2.0 , - -1.0, -1.0, 2.0, - 1.0, -1.0, 2.0 , - 1.0, 1.0, 3.0 , - -1.0, 1.0, 3.0 , - -1.0, -1.0, 3.0, - 1.0, -1.0, 3.0 , - 1.0, 1.0, 4.0 , - -1.0, 1.0, 4.0 , - -1.0, -1.0, 4.0, - 1.0, -1.0, 4.0 , - 0.0, 0.0, 5.0] - -myMeshing.setCoordinates(spaceDimension,numberOfNodes,coordinates,"CARTESIAN",MED_FULL_INTERLACE) - -for i in range(spaceDimension): - unit = "cm " - if (i == 0): - name = "X " - elif (i == 1): - name = "Y " - elif (i == 2): - name = "Z " - - myMeshing.setCoordinateName(name,i) - myMeshing.setCoordinateUnit(unit,i) - -# definition of connectivities -# cell part - -numberOfTypes = 3 -entity = MED_CELL - -types = [] -numberOfElements = [] - -types.append(MED_TETRA4) -numberOfElements.append(12) - -types.append(MED_PYRA5) -numberOfElements.append(2) - -types.append(MED_HEXA8) -numberOfElements.append(2) - -myMeshing.setNumberOfTypes(numberOfTypes,entity) -myMeshing.setTypes(types,entity) -myMeshing.setNumberOfElements(numberOfElements,entity) - -connectivityTetra = [ - 1,2,3,6 , - 1,2,4,3 , - 1,2,5,4 , - 1,2,6,5 , - 2,7,4,3 , - 2,8,5,4 , - 2,9,6,5 , - 2,10,3,6, - 2,7,3,10, - 2,8,4,7 , - 2,9,5,8 , - 2,10,6,9] - -myMeshing.setConnectivity(entity,types[0],connectivityTetra) - -connectivityPyra = [ - 7,8,9,10,2, - 15,18,17,16,19] - -myMeshing.setConnectivity(entity,types[1],connectivityPyra) - -connectivityHexa = [ - 11,12,13,14,7,8,9,10, - 15,16,17,18,11,12,13,14] - -myMeshing.setConnectivity(entity,types[2],connectivityPyra) - -# face part - -numberOfTypes = 2 -entity = MED_FACE - -types = [] -numberOfElements = [] - -types.append(MED_TRIA3) -numberOfElements.append(4) - -types.append(MED_QUAD4) -numberOfElements.append(4) - -myMeshing.setNumberOfTypes(numberOfTypes,entity) -myMeshing.setTypes(types,entity) -myMeshing.setNumberOfElements(numberOfElements,entity) - -connectivityTria = [ - 1,4,3, - 1,5,4, - 1,6,5, - 1,3,6] - -myMeshing.setConnectivity(entity,types[0],connectivityPyra) - -connectivityQuad = [ - 7,8,9,10 , - 11,12,13,14, - 11,7,8,12 , - 12,8,9,13] - -myMeshing.setConnectivity(entity,types[1],connectivityQuad) - -# edge part - -# adding GROUPs -# on Node - -myGroup = GROUP() -myGroup.setName("SomeNodes") -myGroup.setMesh(myMeshing) -myGroup.setEntity(MED_NODE) -myGroup.setNumberOfGeometricType(1) - -myTypes = [MED_NONE] -myGroup.setGeometricType(myTypes) - -myNumberOfElements = [4] -myGroup.setNumberOfElements(myNumberOfElements) - -index = [1,5] -values = [1,4,5,7] -myGroup.setNumber(index,values) - -myMeshing.addGroup(myGroup) - -myGroup = GROUP() -myGroup.setName("OtherNodes") -myGroup.setMesh(myMeshing) -myGroup.setEntity(MED_NODE) -myGroup.setNumberOfGeometricType(1) - -myTypes = [MED_NONE] -myGroup.setGeometricType(myTypes) - -myNumberOfElements = [3] -myGroup.setNumberOfElements(myNumberOfElements) - -index = [1,4] -values = [2,3,6] -myGroup.setNumber(index,values) - -myMeshing.addGroup(myGroup) - -# on Cell - -myGroup = GROUP() -myGroup.setName("SomeCells") -myGroup.setMesh(myMeshing) -myGroup.setEntity(MED_CELL) -myGroup.setNumberOfGeometricType(3) - -myTypes = [MED_TETRA4,MED_PYRA5,MED_HEXA8] -myGroup.setGeometricType(myTypes) - -myNumberOfElements = [4,1,2] -myGroup.setNumberOfElements(myNumberOfElements) - -index = [1,5,6,8] -values = [ - 2,7,8,12, - 13, - 15,16 - ] -myGroup.setNumber(index,values) - -myMeshing.addGroup(myGroup) - -myGroup = GROUP() -myGroup.setName("OtherCells") -myGroup.setMesh(myMeshing) -myGroup.setEntity(MED_CELL) -myGroup.setNumberOfGeometricType(2) - -myTypes = [MED_TETRA4,MED_PYRA5] -myGroup.setGeometricType(myTypes) - -myNumberOfElements = [4,1] -myGroup.setNumberOfElements(myNumberOfElements) - -index = [1,5,6] -values = [ - 3,4,5,9, - 14 - ] -myGroup.setNumber(index,values) - -myMeshing.addGroup(myGroup) - -# on Face - -myGroup = GROUP() -myGroup.setName("SomeFaces") -myGroup.setMesh(myMeshing) -myGroup.setEntity(MED_FACE) -myGroup.setNumberOfGeometricType(2) - -myTypes = [MED_TRIA3,MED_QUAD4] -myGroup.setGeometricType(myTypes) - -myNumberOfElements = [2,3] -myGroup.setNumberOfElements(myNumberOfElements) - -index = [1,3,6] -values = [ - 2,4, - 5,6,8 - ] -myGroup.setNumber(index,values) - -myMeshing.addGroup(myGroup) - -myGroup = GROUP() -myGroup.setName("OtherFaces") -myGroup.setMesh(myMeshing) -myGroup.setEntity(MED_FACE) -myGroup.setNumberOfGeometricType(1) - -myTypes = [MED_TRIA3] -myGroup.setGeometricType(myTypes) - -myNumberOfElements = [2] -myGroup.setNumberOfElements(myNumberOfElements) - -index = [1,3] -values = [ - 1,3 - ] -myGroup.setNumber(index,values) - -myMeshing.addGroup(myGroup) - -# saving of the generated mesh in MED and VTK format - -myMeshing.write(MED_DRIVER,med22FileName) - -myMeshing.write(VTK_DRIVER,vtkFileName) - -# we build now 8 fields : 4 fields double (integer) : -# 2 fields on nodes (cells) : -# 1 scalar (vector) - -supportOnNodes = myMeshing.getSupportOnAll(MED_NODE) -numberOfNodes = supportOnNodes.getNumberOfElements(MED_ALL_ELEMENTS) - -supportOnCells = myMeshing.getSupportOnAll(MED_CELL) -numberOfCells = supportOnCells.getNumberOfElements(MED_ALL_ELEMENTS) - -fieldDoubleScalarOnNodes = FIELDDOUBLE(supportOnNodes,1) -fieldDoubleScalarOnNodes.setName("fieldScalarDoubleNode") -fieldDoubleScalarOnNodes.setIterationNumber(-1) -fieldDoubleScalarOnNodes.setOrderNumber(-1) -fieldDoubleScalarOnNodes.setTime(0.0) - -fieldDoubleScalarOnNodes.setComponentName(1,"Vx") -fieldDoubleScalarOnNodes.setComponentDescription(1,"comp1") -fieldDoubleScalarOnNodes.setMEDComponentUnit(1,"unit1") - -fieldDoubleVectorOnNodes = FIELDDOUBLE(supportOnNodes,spaceDimension) -fieldDoubleVectorOnNodes.setName("fieldVectorDoubleNode") -fieldDoubleVectorOnNodes.setIterationNumber(-1) -fieldDoubleVectorOnNodes.setOrderNumber(-1) -fieldDoubleVectorOnNodes.setTime(0.0) - -fieldDoubleVectorOnNodes.setComponentName(1,"Vx") -fieldDoubleVectorOnNodes.setComponentDescription(1,"comp1") -fieldDoubleVectorOnNodes.setMEDComponentUnit(1,"unit1") -fieldDoubleVectorOnNodes.setComponentName(2,"Vy") -fieldDoubleVectorOnNodes.setComponentDescription(2,"comp2") -fieldDoubleVectorOnNodes.setMEDComponentUnit(2,"unit2") -fieldDoubleVectorOnNodes.setComponentName(3,"Vz") -fieldDoubleVectorOnNodes.setComponentDescription(3,"comp3") -fieldDoubleVectorOnNodes.setMEDComponentUnit(3,"unit3") - -fieldDoubleScalarOnCells = FIELDDOUBLE(supportOnCells,1) -fieldDoubleScalarOnCells.setName("fieldScalarDoubleCell") -fieldDoubleScalarOnCells.setIterationNumber(-1) -fieldDoubleScalarOnCells.setOrderNumber(-1) -fieldDoubleScalarOnCells.setTime(0.0) - -fieldDoubleScalarOnCells.setComponentName(1,"Vx") -fieldDoubleScalarOnCells.setComponentDescription(1,"comp1") -fieldDoubleScalarOnCells.setMEDComponentUnit(1,"unit1") - -fieldDoubleVectorOnCells = FIELDDOUBLE(supportOnCells,spaceDimension) -fieldDoubleVectorOnCells.setName("fieldVectorrDoubleCell") -fieldDoubleVectorOnCells.setIterationNumber(-1) -fieldDoubleVectorOnCells.setOrderNumber(-1) -fieldDoubleVectorOnCells.setTime(0.0) - -fieldDoubleVectorOnCells.setComponentName(1,"Vx") -fieldDoubleVectorOnCells.setComponentDescription(1,"comp1") -fieldDoubleVectorOnCells.setMEDComponentUnit(1,"unit1") -fieldDoubleVectorOnCells.setComponentName(2,"Vy") -fieldDoubleVectorOnCells.setComponentDescription(2,"comp2") -fieldDoubleVectorOnCells.setMEDComponentUnit(2,"unit2") -fieldDoubleVectorOnCells.setComponentName(3,"Vz") -fieldDoubleVectorOnCells.setComponentDescription(3,"comp3") -fieldDoubleVectorOnCells.setMEDComponentUnit(3,"unit3") - -fieldIntScalarOnNodes = FIELDINT(supportOnNodes,1) -fieldIntScalarOnNodes.setName("fieldScalarIntNode") -fieldIntScalarOnNodes.setIterationNumber(-1) -fieldIntScalarOnNodes.setOrderNumber(-1) -fieldIntScalarOnNodes.setTime(0.0) - -fieldIntScalarOnNodes.setComponentName(1,"Vx") -fieldIntScalarOnNodes.setComponentDescription(1,"comp1") -fieldIntScalarOnNodes.setMEDComponentUnit(1,"unit1") - -fieldIntVectorOnNodes = FIELDINT(supportOnNodes,spaceDimension) -fieldIntVectorOnNodes.setName("fieldVectorIntNode") -fieldIntVectorOnNodes.setIterationNumber(-1) -fieldIntVectorOnNodes.setOrderNumber(-1) -fieldIntVectorOnNodes.setTime(0.0) - -fieldIntVectorOnNodes.setComponentName(1,"Vx") -fieldIntVectorOnNodes.setComponentDescription(1,"comp1") -fieldIntVectorOnNodes.setMEDComponentUnit(1,"unit1") -fieldIntVectorOnNodes.setComponentName(2,"Vy") -fieldIntVectorOnNodes.setComponentDescription(2,"comp2") -fieldIntVectorOnNodes.setMEDComponentUnit(2,"unit2") -fieldIntVectorOnNodes.setComponentName(3,"Vz") -fieldIntVectorOnNodes.setComponentDescription(3,"comp3") -fieldIntVectorOnNodes.setMEDComponentUnit(3,"unit3") - -fieldIntScalarOnCells = FIELDINT(supportOnCells,1) -fieldIntScalarOnCells.setName("fieldScalarIntCell") -fieldIntScalarOnCells.setIterationNumber(-1) -fieldIntScalarOnCells.setOrderNumber(-1) -fieldIntScalarOnCells.setTime(0.0) - -fieldIntScalarOnCells.setComponentName(1,"Vx") -fieldIntScalarOnCells.setComponentDescription(1,"comp1") -fieldIntScalarOnCells.setMEDComponentUnit(1,"unit1") - -fieldIntVectorOnCells = FIELDINT(supportOnCells,spaceDimension) -fieldIntVectorOnCells.setName("fieldVectorrIntCell") -fieldIntVectorOnCells.setIterationNumber(-1) -fieldIntVectorOnCells.setOrderNumber(-1) -fieldIntVectorOnCells.setTime(0.0) - -fieldIntVectorOnCells.setComponentName(1,"Vx") -fieldIntVectorOnCells.setComponentDescription(1,"comp1") -fieldIntVectorOnCells.setMEDComponentUnit(1,"unit1") -fieldIntVectorOnCells.setComponentName(2,"Vy") -fieldIntVectorOnCells.setComponentDescription(2,"comp2") -fieldIntVectorOnCells.setMEDComponentUnit(2,"unit2") -fieldIntVectorOnCells.setComponentName(3,"Vz") -fieldIntVectorOnCells.setComponentDescription(3,"comp3") -fieldIntVectorOnCells.setMEDComponentUnit(3,"unit3") - -for i in range(numberOfNodes): - valueInt1 = i+1 - valueInt2 = i+2 - valueInt3 = i+3 - valueDbl1 = valueInt1*0.1 - valueDbl2 = valueInt2*0.1 - valueDbl3 = valueInt3*0.1 - fieldDoubleScalarOnNodes.setValueIJ(i+1,1,valueDbl1) - - fieldIntScalarOnNodes.setValueIJ(i+1,1,valueInt1) - - fieldDoubleVectorOnNodes.setValueIJ(i+1,1,valueDbl1) - fieldDoubleVectorOnNodes.setValueIJ(i+1,2,valueDbl2) - fieldDoubleVectorOnNodes.setValueIJ(i+1,3,valueDbl3) - - fieldIntVectorOnNodes.setValueIJ(i+1,1,valueInt1) - fieldIntVectorOnNodes.setValueIJ(i+1,2,valueInt2) - fieldIntVectorOnNodes.setValueIJ(i+1,3,valueInt3) - -for i in range(numberOfCells): - valueInt1 = i+1 - valueInt2 = i+2 - valueInt3 = i+3 - valueDbl1 = valueInt1*0.1 - valueDbl2 = valueInt2*0.1 - valueDbl3 = valueInt3*0.1 - fieldDoubleScalarOnCells.setValueIJ(i+1,1,valueDbl1) - - fieldIntScalarOnCells.setValueIJ(i+1,1,valueInt1) - - fieldDoubleVectorOnCells.setValueIJ(i+1,1,valueDbl1) - fieldDoubleVectorOnCells.setValueIJ(i+1,2,valueDbl2) - fieldDoubleVectorOnCells.setValueIJ(i+1,3,valueDbl3) - - fieldIntVectorOnCells.setValueIJ(i+1,1,valueInt1) - fieldIntVectorOnCells.setValueIJ(i+1,2,valueInt2) - fieldIntVectorOnCells.setValueIJ(i+1,3,valueInt3) - -fieldIntScalarOnNodes.write(MED_DRIVER,med21FileName) -fieldDoubleVectorOnNodes.write(MED_DRIVER,med21FileName) -fieldIntVectorOnNodes.write(MED_DRIVER,med21FileName) -fieldDoubleScalarOnCells.write(MED_DRIVER,med21FileName) -fieldIntScalarOnCells.write(MED_DRIVER,med21FileName) -fieldDoubleVectorOnCells.write(MED_DRIVER,med21FileName) -fieldIntVectorOnCells.write(MED_DRIVER,med21FileName) - - -idVtk = fieldDoubleScalarOnNodes.addDriver(VTK_DRIVER,vtkFileName,fieldDoubleScalarOnNodes.getName()) -fieldDoubleScalarOnNodes.writeAppend(idVtk) - -idVtk = fieldIntScalarOnNodes.addDriver(VTK_DRIVER,vtkFileName,fieldIntScalarOnNodes.getName()) -fieldIntScalarOnNodes.writeAppend(idVtk) - -idVtk = fieldDoubleVectorOnNodes.addDriver(VTK_DRIVER,vtkFileName,fieldDoubleVectorOnNodes.getName()) -fieldDoubleVectorOnNodes.writeAppend(idVtk) - -idVtk = fieldIntVectorOnNodes.addDriver(VTK_DRIVER,vtkFileName,fieldIntVectorOnNodes.getName()) -fieldIntVectorOnNodes.writeAppend(idVtk) - -idVtk = fieldDoubleScalarOnCells.addDriver(VTK_DRIVER,vtkFileName,fieldDoubleScalarOnCells.getName()) -fieldDoubleScalarOnCells.writeAppend(idVtk) - -idVtk = fieldIntScalarOnCells.addDriver(VTK_DRIVER,vtkFileName,fieldIntScalarOnCells.getName()) -fieldIntScalarOnCells.writeAppend(idVtk) - -idVtk = fieldDoubleVectorOnCells.addDriver(VTK_DRIVER,vtkFileName,fieldDoubleVectorOnCells.getName()) -fieldDoubleVectorOnCells.writeAppend(idVtk) - -idVtk = fieldIntVectorOnCells.addDriver(VTK_DRIVER,vtkFileName,fieldIntVectorOnCells.getName()) -fieldIntVectorOnCells.writeAppend(idVtk) diff --git a/doc/MEDMEM/MESHconnectivities.cxx b/doc/MEDMEM/MESHconnectivities.cxx deleted file mode 100644 index fdba7e641..000000000 --- a/doc/MEDMEM/MESHconnectivities.cxx +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 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/ or email : webmaster.salome@opencascade.com -// - -#include "MEDMEM_Mesh.hxx" - -using namespace MEDMEM ; -using namespace MED_EN ; - -int main (int argc, char ** argv) -{ - // const string MedFile = "polyedres.med" ; - // const string MeshName = "Erreur orientation" ; - // const string MedFile = "polygones.med" ; - // const string MeshName = "Bord" ; - const string MedFile = "pointe.med" ; - const string MeshName = "maa1" ; - MESH myMesh(MED_DRIVER,MedFile,MeshName) ; - - cout << "Mesh name : " << myMesh.getName() << endl << endl ; - - // we get all type for cell entity : - int NumberOfTypes = myMesh.getNumberOfTypes(MED_CELL) ; - cout << "Show Connectivity (Nodal) :" << endl ; - // this example use access with a specified medGeometryElement array - const medGeometryElement * Types = myMesh.getTypes(MED_CELL); - string * cellTypeNames = myMesh.getCellTypeNames(MED_CELL); - for (int i=0; irun(fileName, this) ; --> Il faut vérifier que le numéro auquel on accède existe ! -- 2.39.2