/[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 2898 - (show annotations)
Mon Feb 1 01:23:46 2010 UTC (9 years, 2 months ago) by caltinay
Original Path: trunk/finley/src/CPPAdapter/MeshAdapterFactory.h
File MIME type: text/plain
File size: 7330 byte(s)
Reverted the move of system_dep.h since it didn't solve the problem nicely.
Created a wrapper class for the needed functionality instead.

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26