/[escript]/trunk/finley/src/Mesh.h
ViewVC logotype

Contents of /trunk/finley/src/Mesh.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 682 - (show annotations)
Mon Mar 27 02:43:09 2006 UTC (13 years, 5 months ago) by robwdcock
File MIME type: text/plain
File size: 5960 byte(s)
+ NEW BUILD SYSTEM

This commit contains the new build system with cross-platform support.
Most things work are before though you can have more control.

ENVIRONMENT settings have changed:
+ You no longer require LD_LIBRARY_PATH or PYTHONPATH to point to the
esysroot for building and testing performed via scons
+ ACcESS altix users: It is recommended you change your modules to load
the latest intel compiler and other libraries required by boost to match
the setup in svn (you can override). The correct modules are as follows

module load intel_cc.9.0.026
export
MODULEPATH=${MODULEPATH}:/data/raid2/toolspp4/modulefiles/gcc-3.3.6
module load boost/1.33.0/python-2.4.1
module load python/2.4.1
module load numarray/1.3.3


1 /*
2 ************************************************************
3 * Copyright 2006 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12 /* Version: $Id$ */
13
14
15 #ifndef INC_FINLEY_MESH
16 #define INC_FINLEY_MESH
17
18 /**************************************************************/
19
20 /* Finley: Mesh */
21
22 /* A mesh is built from nodes and elements which are describing the
23 domain, the surface and point sources. (the latter are needed to
24 establish links with other codes, in particular to particle
25 codes). The nodes are stored a Finley_NodeFile and elements in a
26 Finley_ElementFile. A Finley_NodeFile and three Finley_ElementFile
27 containing the elements describing the domain, surface and point
28 sources respectively. Notice that the surface elements do not
29 necessaryly cover the entire surface of the domain. */
30
31 /* The element type is fixed by the reference element, see
32 ReferenceElement.h. The numbering of the nodes starts with 0. */
33
34 /* Important: it is assumed that every node is appearing in at least
35 one element or surface element and that any node used in an
36 element, surface element or as a point is specified in the
37 Finley_Node, see also Finley_resolveNodeIds. */
38
39 /* In some cases it is useful to refer to a mesh entirly built from
40 order 1 (=linear) elements. The linear version of the mesh can be
41 accessed by referning to the first few nodes of each element
42 (thanks to the way the nodes are ordered). As the numbering of
43 these nodes is not continuous a relabeling vectors are introduced
44 in the Finley_NodeFile. This feature is not fully implemented
45 yet. */
46
47 /* allnodes and elements are tagged. the tag allows to group nodes and
48 elements. A typical application is to mark surface elements on a
49 certain portion of the domain with the same tag. All these surface
50 elements can then assigned the same value eg. for the pressure. */
51
52 /* Thespacial dimension is determined by the type of elements
53 used. The spacial dimension should be accessed by the function
54 Finley_Mesh_getDim. Notice that the element type also determines
55 the type of surface elements to be used. */
56
57 /**************************************************************/
58
59 #include "Finley.h"
60 #include "NodeFile.h"
61 #include "ElementFile.h"
62 #include "paso/SystemMatrixPattern.h"
63 #include "escript/DataC.h"
64
65 /**************************************************************/
66
67 /* this struct holds a mesh: */
68
69 struct Finley_Mesh {
70 char* Name; /* the name of the mesh */
71 index_t order; /* integration order */
72 dim_t reference_counter; /* counts the number of references to the mesh; */
73 Finley_NodeFile* Nodes; /* the table of the nodes */
74 Finley_ElementFile* Elements; /* the table of the elements */
75 Finley_ElementFile* FaceElements; /* the table of the face elements */
76 Finley_ElementFile* ContactElements; /* the table of the contact elements */
77 Finley_ElementFile* Points; /* the table of points (treated as elements of dimension 0) */
78
79 /* pointer to the sparse matrix pattern */
80
81 Paso_SystemMatrixPattern *FullFullPattern;
82 Paso_SystemMatrixPattern *FullReducedPattern;
83 Paso_SystemMatrixPattern *ReducedFullPattern;
84 Paso_SystemMatrixPattern *ReducedReducedPattern;
85 };
86
87 typedef struct Finley_Mesh Finley_Mesh;
88
89 /* these structures are used for matching surfaces elements: */
90
91 struct Finley_Mesh_findMatchingFaces_center{
92 index_t refId;
93 double x[MAX_numDim];
94 };
95 typedef struct Finley_Mesh_findMatchingFaces_center Finley_Mesh_findMatchingFaces_center;
96
97 /**************************************************************/
98
99 /* interfaces: */
100
101 Finley_Mesh* Finley_Mesh_alloc(char*,int,int);
102 Finley_Mesh* Finley_Mesh_reference(Finley_Mesh*);
103 void Finley_Mesh_dealloc(Finley_Mesh*);
104 dim_t Finley_Mesh_getDim(Finley_Mesh*);
105 dim_t Finley_Mesh_getNumNodes(Finley_Mesh*);
106 dim_t Finley_Mesh_getNumDegreesOfFreedom(Finley_Mesh*);
107 dim_t Finley_Mesh_getReducedNumDegreesOfFreedom(Finley_Mesh*);
108 Paso_SystemMatrixPattern* Finley_getPattern(Finley_Mesh *mesh,bool_t reduce_row_order, bool_t reduce_col_order);
109 Paso_SystemMatrixPattern* Finley_makePattern(Finley_Mesh *mesh,bool_t reduce_row_order, bool_t reduce_col_order);
110 void Finley_Mesh_write(Finley_Mesh*,char*);
111 Finley_Mesh* Finley_Mesh_read(char*,index_t);
112 void Finley_Mesh_setCoordinates(Finley_Mesh*,escriptDataC*);
113
114 void Finley_Mesh_prepare(Finley_Mesh* in);
115 void Finley_Mesh_prepareNodes(Finley_Mesh* in);
116 void Finley_Mesh_improveColoring(Finley_Mesh* in);
117 void Finley_Mesh_optimizeElementDistribution(Finley_Mesh* in);
118 void Finley_Mesh_resolveNodeIds(Finley_Mesh*);
119 Finley_Mesh* Finley_Mesh_merge(dim_t, Finley_Mesh**);
120
121 void Finley_Mesh_relableElementNodes(int*,int,Finley_Mesh*);
122 void Finley_Mesh_markNodes(int*,int,Finley_Mesh*,int);
123
124 void Finley_Mesh_glueFaces(Finley_Mesh* self,double safety_factor,double tolerance);
125 void Finley_Mesh_joinFaces(Finley_Mesh* self,double safety_factor,double tolerance);
126
127 int Finley_Mesh_findMatchingFaces_compar(const void*,const void*);
128 void Finley_Mesh_findMatchingFaces(Finley_NodeFile*,Finley_ElementFile *,double,double, int*, int*,int*,int*);
129 void Finley_Mesh_print(Finley_Mesh *in);
130 void Finley_Mesh_saveDX(const char * filename_p, Finley_Mesh *mesh_p, const dim_t num_data,char* *names_p,escriptDataC* *data_pp);
131 void Finley_Mesh_saveVTK(const char * filename_p, Finley_Mesh *mesh_p, const dim_t num_data,char* *names_p,escriptDataC* *data_pp);
132
133 #endif /* #ifndef INC_FINLEY_MESH */
134

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26