getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Konstantinos Poulios
Subject: [Getfem-commits] (no subject)
Date: Fri, 30 Jun 2017 09:17:05 -0400 (EDT)

branch: devel-logari81
commit bf14faf273cfb96c2e5bd4e48c35035b423e82c5
Author: Konstantinos Poulios <address@hidden>
Date:   Fri Jun 30 15:16:29 2017 +0200

    add documentation for importing ANSYS meshes
---
 doc/sphinx/source/userdoc/bmesh.rst              | 27 ++++++++++++++++++------
 interface/src/gf_mesh.cc                         |  1 +
 interface/src/scilab/help/latex/getfemmatlab.tex |  4 +++-
 src/getfem/getfem_import.h                       | 13 ++++++++++--
 4 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/doc/sphinx/source/userdoc/bmesh.rst 
b/doc/sphinx/source/userdoc/bmesh.rst
index 580fb86..9569df6 100644
--- a/doc/sphinx/source/userdoc/bmesh.rst
+++ b/doc/sphinx/source/userdoc/bmesh.rst
@@ -486,17 +486,30 @@ The file :file:`getfem/getfem_import.h` provides the 
function::
   void import_mesh(const std::string& fmtfilename, mesh& m);
 
 Here the string ``fmtfilename`` must contain a descriptor of the
-file format ("gid", "gmsh", "am_fmt", "emc2_mesh", or "structured"),
-followed by a colon and the file name (if there is not format descriptor,
-it is assumed that the file is a native getfem mesh and the
-``mesh::read_from_file()`` method is used). Example::
+file format ("gid", "gmsh", "cdb", "noboite", "am_fmt", "emc2_mesh",
+or "structured"), followed by a colon and the file name (if there is
+not format descriptor, it is assumed that the file is a native getfem
+mesh and the ``mesh::read_from_file()`` method is used). Example::
 
    getfem::mesh m;
    getfem::import_mesh("gid:../tests/meshes/tripod.GiD.msh",m);
 
-The "gid" format is for meshes generated by `GiD`_. The "gmsh" is for
-meshes generated by the open-source mesh generator `Gmsh`_,
-the "noboite" format is for TetMesh-GHS3D, and the
+Alternatively the function::
+
+  void import_mesh(const std::string& filename, const std::string& fmt,
+                   mesh& m);
+
+can be used in an equivalent manner with the string ``fmt`` being one of
+the aforementioned format specifiers.
+
+The "gid" format specifier is for meshes generated by `GiD`_ and "gmsh"
+is for meshes generated by the open-source mesh generator `Gmsh`_.
+The "cdb" format specifier is for reading meshes from `ANSYS`_ models
+exported in blocked format with the CDWRITE command. Currently the
+`ANSYS`_ element types 42,45,73,82,87,89,90,92,95,162,182,183,185,186,187
+and 191 can be imported, this however does not include any finite element
+techology linked to these elements but only their geometry.
+The "noboite" format is for TetMesh-GHS3D, and the
 "am_fmt" and "emc2_mesh" are for files built with `EMC2`_ (but 2D only).
 
 The "structured" format is just a short specification for regular meshes:
diff --git a/interface/src/gf_mesh.cc b/interface/src/gf_mesh.cc
index 52dbb94..c59ea36 100644
--- a/interface/src/gf_mesh.cc
+++ b/interface/src/gf_mesh.cc
@@ -556,6 +556,7 @@ void gf_mesh(getfemint::mexargs_in& m_in,
 
       - 'gmsh' for a mesh created with `Gmsh`
       - 'gid' for a mesh created with `GiD`
+      - 'cdb' for a mesh created with `ANSYS`
       - 'am_fmt' for a mesh created with address@hidden/
     sub_command
       ("import", 2, 2, 0, 1,
diff --git a/interface/src/scilab/help/latex/getfemmatlab.tex 
b/interface/src/scilab/help/latex/getfemmatlab.tex
index 2245919..af17ac1 100644
--- a/interface/src/scilab/help/latex/getfemmatlab.tex
+++ b/interface/src/scilab/help/latex/getfemmatlab.tex
@@ -1297,13 +1297,15 @@ M = gf_mesh('clone', \tcmesh M0)
   @@s=gf_mesh_get(M,'char')@@.
 
   \sep{@@gf_mesh('import', format, filename)@@} \index{mesh import} import
-  a mesh from a file. For the moment, only three formats are
+  a mesh from a file. For the moment, only four formats are
   supported:
   \begin{itemize}
   \item mesh objects created with 
\WEB{http://www.geuz.org/gmsh}{gmsh}\index{gmsh} (GPL meshing/post processing 
tool): @@gf_mesh('import', 'gmsh', filename)@@. Note that gmsh meshes always 
use 3D points, even for planar meshes. However, you can remove the z-component 
of the planar mesh with @@gf_mesh_set(m, 'transform', [1 0 0; 0 1 0])@@. Use 
@@gf_mesh('import', 'gmshv2', filename)@@ for gmsh file-format version 2.0.
   \item mesh objects created with 
\WEB{http://gid.cimne.upc.es}{GiD}\index{GiD} (only
     limited version is free, but it is able to generate quadratic elements):
     @@gf_mesh('import', 'gid', filename)@@.
+  \item mesh objects as part of a model exported from ANSYS in blocked format 
with the CDWRITE command, can be imported with:
+    @@gf_mesh('import', 'cdb', filename)@@.
   \item 2D triangular meshes from 
\WEB{http://pauillac.inria.fr/cdrom/www/emc2/fra.htm}{emc2}\index{emc2}, saved 
with the am\_fmt format: @@gf_mesh('import', 'am_fmt', filename)@@.
   \end{itemize}
   Support for other file-formats should be quickly available.
diff --git a/src/getfem/getfem_import.h b/src/getfem/getfem_import.h
index 9cb1474..34f8f1b 100644
--- a/src/getfem/getfem_import.h
+++ b/src/getfem/getfem_import.h
@@ -54,6 +54,7 @@ namespace getfem {
       - "gid" for meshes generated by GiD http://gid.cimne.upc.es/
          -- mesh nodes are always 3D
 
+
       - "gmsh" for meshes generated by Gmsh http://www.geuz.org/gmsh/
        IMPORTANT NOTE: if you do not assign a physical surface/volume
        to your 3D mesh, the file will also contain the mesh of the
@@ -79,11 +80,14 @@ namespace getfem {
        in Gmsh, that which does not occur in GetFEM++ since there is
        only one "type of region".
 
-      - "am_fmt" for 2D meshes from emc2
-        [http://pauillac.inria.fr/cdrom/prog/unix/emc2/eng.htm]
 
       - "cdb" for meshes generated by ANSYS (in blocked format).
 
+       Currently, plane and solid elements of types 42,45,73,82,87,89,
+       90,92,95,162,182,183,185,186,187 and 191 are supported.
+       This however does not include any finite element techology linked
+       to these elements but only their geometry.
+
        By default GetFEM++ will define mesh regions corresponding to
        material ids found in the imported cdb file, if there are more
        than one material ids available.
@@ -94,6 +98,11 @@ namespace getfem {
        The recommended ANSYS command for generating a mesh file is:
 
        cdwrite,db,filename,cdb
+
+
+      - "am_fmt" for 2D meshes from emc2
+        [http://pauillac.inria.fr/cdrom/prog/unix/emc2/eng.htm]
+
   */
   void import_mesh(const std::string& filename, const std::string& format,
                   mesh& m);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]