1 |
jgs |
82 |
/* |
2 |
|
|
****************************************************************************** |
3 |
|
|
* * |
4 |
|
|
* COPYRIGHT ACcESS 2004 - All Rights Reserved * |
5 |
|
|
* * |
6 |
|
|
* This software is the property of ACcESS. No part of this code * |
7 |
|
|
* may be copied in any form or by any means without the expressed written * |
8 |
|
|
* consent of ACcESS. Copying, use or modification of this software * |
9 |
|
|
* by any unauthorised person is illegal unless that person has a software * |
10 |
|
|
* license agreement with ACcESS. * |
11 |
|
|
* * |
12 |
|
|
****************************************************************************** |
13 |
|
|
*/ |
14 |
|
|
|
15 |
|
|
#if !defined finley_MeshAdapterFactory_20040526_H |
16 |
|
|
#define finley_MeshAdapterFactory_20040526_H |
17 |
|
|
|
18 |
|
|
#include "finley/CPPAdapter/MeshAdapter.h" |
19 |
|
|
|
20 |
|
|
#include "escript/Data/AbstractContinuousDomain.h" |
21 |
|
|
|
22 |
|
|
#include <boost/python/list.hpp> |
23 |
|
|
|
24 |
|
|
namespace finley { |
25 |
|
|
/** |
26 |
|
|
\brief |
27 |
|
|
A suite of factory methods for creating various MeshAdapters. |
28 |
|
|
|
29 |
|
|
Description: |
30 |
|
|
A suite of factory methods for creating various MeshAdapters. |
31 |
|
|
*/ |
32 |
|
|
|
33 |
|
|
/** |
34 |
|
|
\brief |
35 |
|
|
Read a mesh from a file |
36 |
|
|
\param fileName Input - The name of the file. |
37 |
|
|
*/ |
38 |
|
|
escript::AbstractContinuousDomain* readMesh(const std::string& fileName, |
39 |
|
|
int integrationOrder=-1); |
40 |
|
|
/** |
41 |
|
|
\brief |
42 |
|
|
Creates a rectangular mesh with n1 x n2 x n3 elements over the brick |
43 |
|
|
[0,l1] x [0,l2] x [0,l3]. |
44 |
|
|
|
45 |
|
|
\param n1,n2,n3 Input - |
46 |
|
|
\param order Input - =1 or =2 gives the order of shape function |
47 |
|
|
\param l1,l2,l3 Input - |
48 |
|
|
\param integrationOrder Input - order of the quadrature scheme. |
49 |
|
|
*/ |
50 |
|
|
escript::AbstractContinuousDomain* brick(int n1=1,int n2=1,int n3=1,int order=1, |
51 |
|
|
double l1=1.0,double l2=1.0,double l3=1.0, |
52 |
|
|
int periodic0=0,int periodic1=0, |
53 |
|
|
int periodic2=0, |
54 |
|
|
int integrationOrder=-1, |
55 |
|
|
int useElementsOnFace=0); |
56 |
|
|
/** |
57 |
|
|
\brdirief |
58 |
|
|
Creates a rectangular mesh with n1 x n2 elements over the brick |
59 |
|
|
[0,l1] x [0,l2]. |
60 |
|
|
|
61 |
|
|
\param n1,n2 Input - |
62 |
|
|
\param order Input - =1 or =2 gives the order of shape function |
63 |
|
|
\param l1,l2 Input - |
64 |
|
|
\param integrationOrder Input - order of the quadrature scheme. |
65 |
|
|
If integrationOrder<0 the integration order is selected |
66 |
|
|
independently. |
67 |
|
|
*/ |
68 |
|
|
escript::AbstractContinuousDomain* rectangle(int n1=1,int n2=1,int order=1, |
69 |
|
|
double l1=1.0, double l2=1.0, |
70 |
|
|
int periodic0=false,int periodic1=false, |
71 |
|
|
int integrationOrder=-1, |
72 |
|
|
int useElementsOnFace=false); |
73 |
|
|
/** |
74 |
|
|
\brief |
75 |
|
|
Creates an equidistant mesh with n elements over the interval [0,l]. |
76 |
|
|
\param n1 Input - |
77 |
|
|
\param order Input - =1 or =2 gives the order of shape function. |
78 |
|
|
\param integrationOrder Input - order of the quadrature scheme. |
79 |
|
|
If integrationOrder<0 the integration order is selected |
80 |
|
|
independently. |
81 |
|
|
*/ |
82 |
|
|
escript::AbstractContinuousDomain* interval(int n1=1,int order=1,double l1=1.0, |
83 |
|
|
int periodic0=false, |
84 |
|
|
int integrationOrder=-1, |
85 |
|
|
int useElementsOnFace=false); |
86 |
|
|
/** |
87 |
|
|
\brief |
88 |
|
|
Merges a list of meshes into one list. |
89 |
|
|
\param meshList Input - The list of meshes. |
90 |
|
|
*/ |
91 |
|
|
escript::AbstractContinuousDomain* meshMerge(const boost::python::list& meshList); |
92 |
|
|
/** |
93 |
|
|
\brief |
94 |
|
|
Detects matching faces in the mesh, removes them from the mesh |
95 |
|
|
and joins the elements touched by the face elements. |
96 |
|
|
\param meshList Input - The list of meshes. |
97 |
|
|
\param safetyFacto Input - ?? |
98 |
|
|
\param tolerance Input - ?? |
99 |
|
|
*/ |
100 |
|
|
escript::AbstractContinuousDomain* glueFaces(const boost::python::list& meshList, |
101 |
|
|
double safetyFactor=0.2, |
102 |
|
|
double tolerance=std::numeric_limits<double>::epsilon()); |
103 |
|
|
/** |
104 |
|
|
\brief |
105 |
|
|
Detects matching faces in the mesh and replaces them by joint elements. |
106 |
|
|
\param meshList Input - The list of meshes. |
107 |
|
|
\param safetyFacto Input - ?? |
108 |
|
|
\param tolerance Input - ?? |
109 |
|
|
*/ |
110 |
|
|
escript::AbstractContinuousDomain* joinFaces(const boost::python::list& meshList, |
111 |
|
|
double safety_factor=0.2, |
112 |
|
|
double tolerance=std::numeric_limits<double>::epsilon()); |
113 |
|
|
|
114 |
|
|
} // end of namespace |
115 |
|
|
#endif |