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

Contents of /trunk-mpi-branch/finley/src/CPPAdapter/MeshAdapterFactory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1223 - (show annotations)
Fri Aug 3 02:40:39 2007 UTC (11 years, 8 months ago) by gross
File MIME type: text/plain
File size: 6409 byte(s)
first attemt towards an improved MPI version.  

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 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
48 If reducedIntegrationOrder<0 the integration order is selected independently.
49 \param optimizeLabeling Input - switches on the optimization of node labels
50 */
51 FINLEY_DLL_API
52 escript::AbstractContinuousDomain* readMesh(const std::string& fileName,
53 int integrationOrder=-1,
54 int reducedIntegrationOrder=-1,
55 bool optimizeLabeling=true);
56 /**
57 \brief
58 Read a gmsh mesh file
59 \param fileName Input - The name of the file.
60 \param numDim Input - spatial dimension
61 \param integrationOrder Input - order of the quadrature scheme.
62 If integrationOrder<0 the integration order is selected independently.
63 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
64 If reducedIntegrationOrder<0 the integration order is selected independently.
65 \param optimizeLabeling Input - switches on the optimization of node labels
66 */
67 FINLEY_DLL_API
68 escript::AbstractContinuousDomain* readGmsh(const std::string& fileName,
69 int numDim,
70 int integrationOrder=-1,
71 int reducedIntegrationOrder=-1,
72 bool optimizeLabeling=true);
73 /**
74 \brief
75 Creates a rectangular mesh with n0 x n1 x n2 elements over the brick
76 [0,l0] x [0,l1] x [0,l2].
77
78 \param n0,n1,n2 Input - number of elements in each dimension
79 \param order Input - =1 or =2 gives the order of shape function
80 \param l0,l1,l2 Input - length of each side of brick
81 \param integrationOrder Input - order of the quadrature scheme.
82 If integrationOrder<0 the integration order is selected independently.
83 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
84 If reducedIntegrationOrder<0 the integration order is selected independently.
85 \param useElementsOnFace Input - whether or not to use elements on face
86 \param periodic0, periodic1, periodic2 Input - whether or not boundary
87 conditions of the dimension are periodic
88 */
89 FINLEY_DLL_API
90 escript::AbstractContinuousDomain* brick(int n0=1,int n1=1,int n2=1,int order=1,
91 double l0=1.0,double l1=1.0,double l2=1.0,
92 int periodic0=0,int periodic1=0,
93 int periodic2=0,
94 int integrationOrder=-1,
95 int reducedIntegrationOrder=-1,
96 int useElementsOnFace=0,
97 int useFullElementOrder=false);
98 /**
99 \brief
100 Creates a rectangular mesh with n0 x n1 elements over the brick
101 [0,l0] x [0,l1].
102
103 \param n0,n1 Input - number of elements in each dimension
104 \param order Input - =1 or =2 gives the order of shape function
105 \param l0,l1 Input - length of each side of brick
106 \param integrationOrder Input - order of the quadrature scheme.
107 If integrationOrder<0 the integration order is selected
108 independently.
109 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
110 If reducedIntegrationOrder<0 the integration order is selected independently.
111 \param periodic0, periodic1 Input - whether or not the boundary
112 conditions of the dimension are periodic
113 \param useElementsOnFace Input - whether or not to use elements on face
114 */
115 FINLEY_DLL_API
116 escript::AbstractContinuousDomain* rectangle(int n0=1,int n1=1,int order=1,
117 double l0=1.0, double l1=1.0,
118 int periodic0=false,int periodic1=false,
119 int integrationOrder=-1,
120 int reducedIntegrationOrder=-1,
121 int useElementsOnFace=false,
122 int useFullElementOrder=false);
123 /**
124 \brief
125 Merges a list of meshes into one list.
126 \param meshList Input - The list of meshes.
127 */
128 FINLEY_DLL_API
129 escript::AbstractContinuousDomain* meshMerge(const boost::python::list& meshList);
130 /**
131 \brief
132 Detects matching faces in the mesh, removes them from the mesh
133 and joins the elements touched by the face elements.
134 \param meshList Input - The list of meshes.
135 \param safetyFactor Input - ??
136 \param tolerance Input - ??
137 \param optimizeLabeling Input - switches on the optimization of node labels
138 */
139 FINLEY_DLL_API
140 escript::AbstractContinuousDomain* glueFaces(const boost::python::list& meshList,
141 double safetyFactor=0.2,
142 double tolerance=1.e-8,
143 bool optimizeLabeling=true);
144 /**
145 \brief
146 Detects matching faces in the mesh and replaces them by joint elements.
147 \param meshList Input - The list of meshes.
148 \param safetyFactor Input - ??
149 \param tolerance Input - ??
150 \param optimizeLabeling Input - switches on the optimization of node labels
151 */
152 FINLEY_DLL_API
153 escript::AbstractContinuousDomain* joinFaces(const boost::python::list& meshList,
154 double safetyFactor=0.2,
155 double tolerance=1.e-8,
156 bool optimizeLabeling=true);
157
158 } // end of namespace
159 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26