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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26