/[escript]/trunk/dudley/src/CPPAdapter/MeshAdapterFactory.h
ViewVC logotype

Contents of /trunk/dudley/src/CPPAdapter/MeshAdapterFactory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 934 - (show annotations)
Tue Jan 23 09:52:45 2007 UTC (12 years, 2 months ago) by gross
Original Path: trunk/finley/src/CPPAdapter/MeshAdapterFactory.h
File MIME type: text/plain
File size: 5880 byte(s)
gmsh file reader for finley
1 /* $Id$ */
2 /*
3 ************************************************************
4 * Copyright 2006 by ACcESS MNRF *
5 * *
6 * http://www.access.edu.au *
7 * Primary Business: Queensland, Australia *
8 * Licensed under the Open Software License version 3.0 *
9 * http://www.opensource.org/licenses/osl-3.0.php *
10 * *
11 ************************************************************
12 */
13
14 #if !defined finley_MeshAdapterFactory_20040526_H
15 #define finley_MeshAdapterFactory_20040526_H
16 #include "system_dep.h"
17
18 extern "C" {
19 #include "../Finley.h"
20 #include "../Mesh.h"
21 #include "../RectangularMesh.h"
22 }
23
24 #include "MeshAdapter.h"
25
26 #include "escript/AbstractContinuousDomain.h"
27
28 #include <boost/python/list.hpp>
29
30 #include <sstream>
31
32 namespace finley {
33 /**
34 \brief
35 A suite of factory methods for creating various MeshAdapters.
36
37 Description:
38 A suite of factory methods for creating various MeshAdapters.
39 */
40
41 /**
42 \brief
43 Read a mesh from a file
44 \param fileName Input - The name of the file.
45 \param integrationOrder Input - order of the quadrature scheme.
46 If integrationOrder<0 the integration order is selected independently.
47 */
48 FINLEY_DLL_API
49 escript::AbstractContinuousDomain* readMesh(const std::string& fileName,
50 int integrationOrder=-1);
51 /**
52 \brief
53 Read a gmsh mesh file
54 \param fileName Input - The name of the file.
55 \param numDim Input - spatial dimension
56 \param integrationOrder Input - order of the quadrature scheme.
57 If integrationOrder<0 the integration order is selected independently.
58 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
59 If reducedIntegrationOrder<0 the integration order is selected independently.
60 \param optimizeLabeling Input - switches on the optimization of node labels
61 */
62 FINLEY_DLL_API
63 escript::AbstractContinuousDomain* readGmsh(const std::string& fileName,
64 int numDim,
65 int integrationOrder=-1,
66 int reducedIntegrationOrder=-1,
67 bool optimizeLabeling=true);
68 /**
69 \brief
70 Creates a rectangular mesh with n0 x n1 x n2 elements over the brick
71 [0,l0] x [0,l1] x [0,l2].
72
73 \param n0,n1,n2 Input - number of elements in each dimension
74 \param order Input - =1 or =2 gives the order of shape function
75 \param l0,l1,l2 Input - length of each side of brick
76 \param integrationOrder Input - order of the quadrature scheme.
77 \param useElementsOnFace Input - whether or not to use elements on face
78 \param periodic0, periodic1, periodic2 Input - whether or not boundary
79 conditions of the dimension are periodic
80 */
81 FINLEY_DLL_API
82 escript::AbstractContinuousDomain* brick(int n0=1,int n1=1,int n2=1,int order=1,
83 double l0=1.0,double l1=1.0,double l2=1.0,
84 int periodic0=0,int periodic1=0,
85 int periodic2=0,
86 int integrationOrder=-1,
87 int useElementsOnFace=0);
88 /**
89 \brief
90 Creates a rectangular mesh with n0 x n1 elements over the brick
91 [0,l0] x [0,l1].
92
93 \param n0,n1 Input - number of elements in each dimension
94 \param order Input - =1 or =2 gives the order of shape function
95 \param l0,l1 Input - length of each side of brick
96 \param integrationOrder Input - order of the quadrature scheme.
97 If integrationOrder<0 the integration order is selected
98 independently.
99 \param periodic0, periodic1 Input - whether or not the boundary
100 conditions of the dimension are periodic
101 \param useElementsOnFace Input - whether or not to use elements on face
102 */
103 FINLEY_DLL_API
104 escript::AbstractContinuousDomain* rectangle(int n0=1,int n1=1,int order=1,
105 double l0=1.0, double l1=1.0,
106 int periodic0=false,int periodic1=false,
107 int integrationOrder=-1,
108 int useElementsOnFace=false);
109 /**
110 \brief
111 Creates an equidistant mesh with n elements over the interval [0,l].
112 \param n0 Input - number of elements
113 \param order Input - =1 or =2 gives the order of shape function.
114 \param l0 Input - length of the brick
115 \param integrationOrder Input - order of the quadrature scheme.
116 If integrationOrder<0 the integration order is selected
117 independently.
118 \param periodic0 Input - whether or not the boundary conditions are
119 periodic
120 \param useElementsOnFace Input - whether or not to use the elements
121 on the face
122 */
123 FINLEY_DLL_API
124 escript::AbstractContinuousDomain* interval(int n0=1,int order=1,double l0=1.0,
125 int periodic0=false,
126 int integrationOrder=-1,
127 int useElementsOnFace=false);
128 /**
129 \brief
130 Merges a list of meshes into one list.
131 \param meshList Input - The list of meshes.
132 */
133 FINLEY_DLL_API
134 escript::AbstractContinuousDomain* meshMerge(const boost::python::list& meshList);
135 /**
136 \brief
137 Detects matching faces in the mesh, removes them from the mesh
138 and joins the elements touched by the face elements.
139 \param meshList Input - The list of meshes.
140 \param safetyFactor Input - ??
141 \param tolerance Input - ??
142 */
143 FINLEY_DLL_API
144 escript::AbstractContinuousDomain* glueFaces(const boost::python::list& meshList,
145 double safetyFactor=0.2,
146 double tolerance=1.e-8);
147 /**
148 \brief
149 Detects matching faces in the mesh and replaces them by joint elements.
150 \param meshList Input - The list of meshes.
151 \param safetyFactor Input - ??
152 \param tolerance Input - ??
153 */
154 FINLEY_DLL_API
155 escript::AbstractContinuousDomain* joinFaces(const boost::python::list& meshList,
156 double safetyFactor=0.2,
157 double tolerance=1.e-8);
158
159 } // end of namespace
160 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26