/[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 1872 - (show annotations)
Mon Oct 13 00:18:55 2008 UTC (11 years ago) by jfenwick
File MIME type: text/plain
File size: 7048 byte(s)
Closing the moreshared branch

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 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 */
100 FINLEY_DLL_API
101 // escript::AbstractContinuousDomain* brick(int n0=1,int n1=1,int n2=1,int order=1,
102 escript::Domain_ptr brick(int n0=1,int n1=1,int n2=1,int order=1,
103 double l0=1.0,double l1=1.0,double l2=1.0,
104 int periodic0=0,int periodic1=0,
105 int periodic2=0,
106 int integrationOrder=-1,
107 int reducedIntegrationOrder=-1,
108 int useElementsOnFace=0,
109 int useFullElementOrder=0,
110 int optimize=0);
111 /**
112 \brief
113 Creates a rectangular mesh with n0 x n1 elements over the brick
114 [0,l0] x [0,l1].
115
116 \param n0,n1 Input - number of elements in each dimension
117 \param order Input - =1 or =2 gives the order of shape function
118 \param l0,l1 Input - length of each side of brick
119 \param integrationOrder Input - order of the quadrature scheme.
120 If integrationOrder<0 the integration order is selected
121 independently.
122 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
123 If reducedIntegrationOrder<0 the integration order is selected independently.
124 \param periodic0, periodic1 Input - whether or not the boundary
125 conditions of the dimension are periodic
126 \param useElementsOnFace Input - whether or not to use elements on face
127 */
128 FINLEY_DLL_API
129 // escript::AbstractContinuousDomain* rectangle(int n0=1,int n1=1,int order=1,
130 escript::Domain_ptr rectangle(int n0=1,int n1=1,int order=1,
131 double l0=1.0, double l1=1.0,
132 int periodic0=false,int periodic1=false,
133 int integrationOrder=-1,
134 int reducedIntegrationOrder=-1,
135 int useElementsOnFace=0,
136 int useFullElementOrder=0,
137 int optimize=0);
138 /**
139 \brief
140 Merges a list of meshes into one list.
141 \param meshList Input - The list of meshes.
142 */
143 FINLEY_DLL_API
144 // escript::AbstractContinuousDomain* meshMerge(const boost::python::list& meshList);
145 escript::Domain_ptr meshMerge(const boost::python::list& meshList);
146 /**
147 \brief
148 Detects matching faces in the mesh, removes them from the mesh
149 and joins the elements touched by the face elements.
150 \param meshList Input - The list of meshes.
151 \param safetyFactor Input - ??
152 \param tolerance Input - ??
153 \param optimize Input - switches on the optimization of node labels
154 */
155 FINLEY_DLL_API
156 // escript::AbstractContinuousDomain* glueFaces(const boost::python::list& meshList,
157 escript::Domain_ptr glueFaces(const boost::python::list& meshList,
158 double safetyFactor=0.2,
159 double tolerance=1.e-8,
160 int optimize=0);
161 /**
162 \brief
163 Detects matching faces in the mesh and replaces them by joint elements.
164 \param meshList Input - The list of meshes.
165 \param safetyFactor Input - ??
166 \param tolerance Input - ??
167 \param optimize Input - switches on the optimization of node labels
168 */
169 FINLEY_DLL_API
170 // escript::AbstractContinuousDomain* joinFaces(const boost::python::list& meshList,
171 escript::Domain_ptr joinFaces(const boost::python::list& meshList,
172 double safetyFactor=0.2,
173 double tolerance=1.e-8,
174 int optimize=0);
175
176 } // end of namespace
177 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26