1 |
/* |
2 |
****************************************************************************** |
3 |
* * |
4 |
* COPYRIGHT ACcESS 2003,2004,2005 - 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 |
/* Version: $Id$ */ |
16 |
|
17 |
#ifndef INC_FINLEY_ELEMENTFILE |
18 |
#define INC_FINLEY_ELEMENTFILE |
19 |
|
20 |
#include "Finley.h" |
21 |
#include "ReferenceElements.h" |
22 |
#include "DataC.h" |
23 |
|
24 |
struct Finley_ElementFile { |
25 |
|
26 |
Finley_RefElement* ReferenceElement; /* the reference element, see |
27 |
Reference element.c */ |
28 |
|
29 |
Finley_RefElement* LinearReferenceElement; /* the reference element for |
30 |
the linear mesh. it is |
31 |
vital that both are using |
32 |
the same quadrature |
33 |
scheme */ |
34 |
|
35 |
dim_t numElements; /* number of elements. */ |
36 |
|
37 |
index_t *Id; /* Id[i] is the id nmber of |
38 |
node i. this number is not |
39 |
used but useful when |
40 |
elements are resorted. in |
41 |
the entire code the term |
42 |
'element id' refers to i |
43 |
but nor to Id[i] if not |
44 |
explicitly stated |
45 |
otherwise. */ |
46 |
|
47 |
index_t *Tag; /* Tag[i] is the tag of |
48 |
element i. */ |
49 |
|
50 |
index_t *Nodes; /* Nodes[INDEX(k, i, |
51 |
ReferenceElement.Type.numNodes) |
52 |
is the k-the node in the |
53 |
i-the element. note that |
54 |
in the way the nodes are |
55 |
ordered Nodes[INDEX(k, i, |
56 |
LinearReferenceElement.Type.numNodes) |
57 |
is k-the node of element i |
58 |
when refering to the |
59 |
linear version of the |
60 |
mesh. */ |
61 |
index_t minColor; /* minimum color */ |
62 |
index_t maxColor; /* maximum color */ |
63 |
index_t *Color; /* assigns each element a color. elements with the same color */ |
64 |
/* are don't share a node so they can be processed simultaneously */ |
65 |
/* at anytime Color must provide a valid value. In any case one can set */ |
66 |
/* Color[e]=e for all e */ |
67 |
index_t order; /* order of the element */ |
68 |
|
69 |
bool_t volume_is_valid; /* true if volume and DvDV are valid */ |
70 |
double* volume; /* local volume */ |
71 |
double* DvDV; /* inverse jacobean of element parametrization at quadrature points*/ |
72 |
bool_t DSDV_is_valid; /* true is DSDV is valid */ |
73 |
double* DSDV; /* derivatives of shape functions in global coordinates at quadrature points*/ |
74 |
bool_t DSLinearDV_is_valid; /* true if DSLinearDV is valid */ |
75 |
double* DSLinearDV; /* derivatives of linear shape functions in gloabl coordinates at quadrature points*/ |
76 |
bool_t X_is_valid; /* true if X is valid */ |
77 |
double* X; /* global coordniates of quadrature points */ |
78 |
}; |
79 |
|
80 |
typedef struct Finley_ElementFile Finley_ElementFile; |
81 |
|
82 |
Finley_ElementFile* Finley_ElementFile_alloc(ElementTypeId,dim_t); |
83 |
void Finley_ElementFile_dealloc(Finley_ElementFile*); |
84 |
void Finley_ElementFile_setCoordinates(Finley_ElementFile*,escriptDataC*); |
85 |
void Finley_ElementFile_improveColoring(Finley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom); |
86 |
void Finley_ElementFile_optimizeDistribution(Finley_ElementFile** in); |
87 |
void Finley_ElementFile_setNodeRange(dim_t*,dim_t*,Finley_ElementFile*); |
88 |
void Finley_ElementFile_relableNodes(dim_t*,dim_t,Finley_ElementFile*); |
89 |
void Finley_ElementFile_markNodes(dim_t*,dim_t,Finley_ElementFile*,dim_t); |
90 |
void Finley_ElementFile_scatter(dim_t*,Finley_ElementFile*,Finley_ElementFile*); |
91 |
void Finley_ElementFile_gather(dim_t*,Finley_ElementFile*,Finley_ElementFile*); |
92 |
void Finley_ElementFile_copyTable(dim_t,Finley_ElementFile*,dim_t,dim_t,Finley_ElementFile*); |
93 |
void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t); |
94 |
void Finley_ElementFile_deallocTable(Finley_ElementFile*); |
95 |
void Finley_ElementFile_prepare(Finley_ElementFile** in,dim_t numNodes,dim_t* degreeOfFreedom); |
96 |
|
97 |
#endif /* #ifndef INC_FINLEY_ELEMENTFILE */ |
98 |
|
99 |
/* |
100 |
* $Log$ |
101 |
* Revision 1.3 2005/09/15 03:44:21 jgs |
102 |
* Merge of development branch dev-02 back to main trunk on 2005-09-15 |
103 |
* |
104 |
* Revision 1.2.2.1 2005/09/07 06:26:18 gross |
105 |
* the solver from finley are put into the standalone package paso now |
106 |
* |
107 |
* Revision 1.2 2005/07/08 04:07:49 jgs |
108 |
* Merge of development branch back to main trunk on 2005-07-08 |
109 |
* |
110 |
* Revision 1.1.1.1.2.1 2005/06/29 02:34:49 gross |
111 |
* some changes towards 64 integers in finley |
112 |
* |
113 |
* Revision 1.1.1.1 2004/10/26 06:53:57 jgs |
114 |
* initial import of project esys2 |
115 |
* |
116 |
* Revision 1.1.1.1 2004/06/24 04:00:40 johng |
117 |
* Initial version of eys using boost-python. |
118 |
* |
119 |
* |
120 |
*/ |