1 |
/* $Id$ */ |
2 |
/* |
3 |
****************************************************************************** |
4 |
* * |
5 |
* COPYRIGHT ACcESS 2004 - All Rights Reserved * |
6 |
* * |
7 |
* This software is the property of ACcESS. No part of this code * |
8 |
* may be copied in any form or by any means without the expressed written * |
9 |
* consent of ACcESS. Copying, use or modification of this software * |
10 |
* by any unauthorised person is illegal unless that person has a software * |
11 |
* license agreement with ACcESS. * |
12 |
* * |
13 |
****************************************************************************** |
14 |
*/ |
15 |
|
16 |
#if !defined finley_MeshAdapterFactory_20040526_H |
17 |
#define finley_MeshAdapterFactory_20040526_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 "escriptcpp/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 |
Read a mesh from a file |
45 |
\param fileName Input - The name of the file. |
46 |
\param integrationOrder Input - order of the quadrature scheme. |
47 |
If integrationOrder<0 the integration order is selected independently. |
48 |
*/ |
49 |
escript::AbstractContinuousDomain* readMesh(const std::string& fileName, |
50 |
int integrationOrder=-1); |
51 |
/** |
52 |
\brief |
53 |
Creates a rectangular mesh with n0 x n1 x n2 elements over the brick |
54 |
[0,l0] x [0,l1] x [0,l2]. |
55 |
|
56 |
\param n0,n1,n2 Input - number of elements in each dimension |
57 |
\param order Input - =1 or =2 gives the order of shape function |
58 |
\param l0,l1,l2 Input - length of each side of brick |
59 |
\param integrationOrder Input - order of the quadrature scheme. |
60 |
\param useElementsOnFace Input - whether or not to use elements on face |
61 |
\param periodic0, periodic1, periodic2 Input - whether or not boundary |
62 |
conditions of the dimension are periodic |
63 |
*/ |
64 |
escript::AbstractContinuousDomain* brick(int n0=1,int n1=1,int n2=1,int order=1, |
65 |
double l0=1.0,double l1=1.0,double l2=1.0, |
66 |
int periodic0=0,int periodic1=0, |
67 |
int periodic2=0, |
68 |
int integrationOrder=-1, |
69 |
int useElementsOnFace=0); |
70 |
/** |
71 |
\brief |
72 |
Creates a rectangular mesh with n0 x n1 elements over the brick |
73 |
[0,l0] x [0,l1]. |
74 |
|
75 |
\param n0,n1 Input - number of elements in each dimension |
76 |
\param order Input - =1 or =2 gives the order of shape function |
77 |
\param l0,l1 Input - length of each side of brick |
78 |
\param integrationOrder Input - order of the quadrature scheme. |
79 |
If integrationOrder<0 the integration order is selected |
80 |
independently. |
81 |
\param periodic0, periodic1 Input - whether or not the boundary |
82 |
conditions of the dimension are periodic |
83 |
\param useElementsOnFace Input - whether or not to use elements on face |
84 |
*/ |
85 |
escript::AbstractContinuousDomain* rectangle(int n0=1,int n1=1,int order=1, |
86 |
double l0=1.0, double l1=1.0, |
87 |
int periodic0=false,int periodic1=false, |
88 |
int integrationOrder=-1, |
89 |
int useElementsOnFace=false); |
90 |
/** |
91 |
\brief |
92 |
Creates an equidistant mesh with n elements over the interval [0,l]. |
93 |
\param n0 Input - number of elements |
94 |
\param order Input - =1 or =2 gives the order of shape function. |
95 |
\param l0 Input - length of the brick |
96 |
\param integrationOrder Input - order of the quadrature scheme. |
97 |
If integrationOrder<0 the integration order is selected |
98 |
independently. |
99 |
\param periodic0 Input - whether or not the boundary conditions are |
100 |
periodic |
101 |
\param useElementsOnFace Input - whether or not to use the elements |
102 |
on the face |
103 |
*/ |
104 |
escript::AbstractContinuousDomain* interval(int n0=1,int order=1,double l0=1.0, |
105 |
int periodic0=false, |
106 |
int integrationOrder=-1, |
107 |
int useElementsOnFace=false); |
108 |
/** |
109 |
\brief |
110 |
Merges a list of meshes into one list. |
111 |
\param meshList Input - The list of meshes. |
112 |
*/ |
113 |
escript::AbstractContinuousDomain* meshMerge(const boost::python::list& meshList); |
114 |
/** |
115 |
\brief |
116 |
Detects matching faces in the mesh, removes them from the mesh |
117 |
and joins the elements touched by the face elements. |
118 |
\param meshList Input - The list of meshes. |
119 |
\param safetyFactor Input - ?? |
120 |
\param tolerance Input - ?? |
121 |
*/ |
122 |
escript::AbstractContinuousDomain* glueFaces(const boost::python::list& meshList, |
123 |
double safetyFactor=0.2, |
124 |
double tolerance=100.*std::numeric_limits<double>::epsilon()); |
125 |
/** |
126 |
\brief |
127 |
Detects matching faces in the mesh and replaces them by joint elements. |
128 |
\param meshList Input - The list of meshes. |
129 |
\param safetyFactor Input - ?? |
130 |
\param tolerance Input - ?? |
131 |
*/ |
132 |
escript::AbstractContinuousDomain* joinFaces(const boost::python::list& meshList, |
133 |
double safetyFactor=0.2, |
134 |
double tolerance=100.*std::numeric_limits<double>::epsilon()); |
135 |
|
136 |
} // end of namespace |
137 |
#endif |