/[escript]/branches/trilinos_from_5897/dudley/src/Assemble.h
ViewVC logotype

Contents of /branches/trilinos_from_5897/dudley/src/Assemble.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6079 - (show annotations)
Mon Mar 21 12:22:38 2016 UTC (2 years, 10 months ago) by caltinay
File MIME type: text/plain
File size: 7697 byte(s)
Big commit - making dudley much more like finley to make it more
managable. Fixed quite a few issues that had been fixed in finley.
Disposed of all ReducedNode/ReducedDOF entities that dudley never supported.
Compiles and passes tests.

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The University of Queensland
5 * http://www.uq.edu.au
6 *
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 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 /****************************************************************************
18
19 Assemblage routines: header file
20
21 *****************************************************************************/
22
23 #ifndef __DUDLEY_ASSEMBLE_H__
24 #define __DUDLEY_ASSEMBLE_H__
25
26 #include "Dudley.h"
27 #include "ElementFile.h"
28 #include "NodeFile.h"
29 #include "escript/AbstractSystemMatrix.h"
30
31 namespace dudley {
32
33 struct AssembleParameters
34 {
35 // number of quadrature nodes
36 int numQuad;
37 // number of spatial dimensions
38 int numDim;
39 // leading dimension of element node table
40 int NN;
41 // number of elements
42 dim_t numElements;
43
44 int numEqu;
45 const index_t* row_DOF;
46 dim_t row_DOF_UpperBound;
47 const ElementFile_Jacobians* row_jac;
48 int numShapes;
49
50 int numComp;
51 const index_t* col_DOF;
52 dim_t col_DOF_UpperBound;
53
54 const double* shapeFns;
55 };
56
57 void Assemble_getAssembleParameters(const NodeFile*, const ElementFile*,
58 escript::ASM_ptr, const escript::Data&,
59 bool, AssembleParameters*);
60
61 void Assemble_PDE(const NodeFile* nodes, const ElementFile* elements,
62 escript::ASM_ptr S, escript::Data& F,
63 const escript::Data& A, const escript::Data& B,
64 const escript::Data& C, const escript::Data& D,
65 const escript::Data& X, const escript::Data& Y);
66
67 void Assemble_PDE_Points(const AssembleParameters& p, const ElementFile*,
68 escript::ASM_ptr S, escript::Data& F,
69 const escript::Data& d_dirac,
70 const escript::Data& y_dirac);
71
72 void Assemble_PDE_Single_2D(const AssembleParameters& p, const ElementFile*,
73 escript::ASM_ptr S, escript::Data& F,
74 const escript::Data& A, const escript::Data& B,
75 const escript::Data& C, const escript::Data& D,
76 const escript::Data& X, const escript::Data& Y);
77
78 void Assemble_PDE_Single_3D(const AssembleParameters& p, const ElementFile*,
79 escript::ASM_ptr S, escript::Data& F,
80 const escript::Data& A, const escript::Data& B,
81 const escript::Data& C, const escript::Data& D,
82 const escript::Data& X, const escript::Data& Y);
83
84 void Assemble_PDE_System_2D(const AssembleParameters& p, const ElementFile*,
85 escript::ASM_ptr S, escript::Data& F,
86 const escript::Data& A, const escript::Data& B,
87 const escript::Data& C, const escript::Data& D,
88 const escript::Data& X, const escript::Data& Y);
89
90 void Assemble_PDE_System_3D(const AssembleParameters& p, const ElementFile*,
91 escript::ASM_ptr S, escript::Data& F,
92 const escript::Data& A, const escript::Data& B,
93 const escript::Data& C, const escript::Data& D,
94 const escript::Data& X, const escript::Data& Y);
95
96
97 /// Adds the matrix array[Equa,Sol,NN,NN] onto the matrix S.
98 /// The rows/columns are given by i_Equa+Equa*Nodes_Equa[Nodes[j_Equa]]
99 /// (i_Equa=0:Equa; j_Equa=0:NN_Equa).
100 /// The routine has to be called from a parallel region and assumes that
101 /// Equa=Sol=1, i.e. array is fully packed.
102 void Assemble_addToSystemMatrix(escript::ASM_ptr S, dim_t NN_Equa,
103 const index_t* Nodes_Equa, dim_t num_Equa,
104 dim_t NN_Sol, const index_t* Nodes_Sol,
105 dim_t num_Sol, const double* array);
106
107 /// Assembles the mass matrix in lumped form.
108 /// The coefficient D has to be defined on the integration points or not
109 /// present. `lumpedMat` has to be initialized before the routine is called.
110 void Assemble_LumpedSystem(const NodeFile* nodes, const ElementFile* elements,
111 escript::Data& lumpedMat, const escript::Data& D,
112 bool useHRZ);
113
114 /// averages data
115 void Assemble_AverageElementData(const ElementFile* elements,
116 escript::Data& out, const escript::Data& in);
117
118 /// copies data between different types of elements
119 void Assemble_CopyElementData(const ElementFile* elements, escript::Data& out,
120 const escript::Data& in);
121
122 /// copies data between different types of nodal representations
123 void Assemble_CopyNodalData(const NodeFile* nodes, escript::Data& out,
124 const escript::Data& in);
125
126 /// copies node coordinates into expanded Data object `x`
127 void Assemble_NodeCoordinates(const NodeFile* nodes, escript::Data& x);
128
129 /// calculates the normal vector at quadrature points on face elements
130 void Assemble_getNormal(const NodeFile* nodes, const ElementFile* elements,
131 escript::Data& normals);
132
133 /// calculates the minimum distance between two vertices of elements and
134 /// assigns the value to each quadrature point in `size`
135 void Assemble_getSize(const NodeFile* nodes, const ElementFile* elements,
136 escript::Data& size);
137
138 /// Assemblage of Jacobians: calculates the gradient of nodal data at
139 /// quadrature points
140 void Assemble_gradient(const NodeFile* nodes, const ElementFile* elements,
141 escript::Data& gradient, const escript::Data& data);
142
143 /// integrates data on quadrature points
144 void Assemble_integrate(const NodeFile* nodes, const ElementFile* elements,
145 const escript::Data& data, std::vector<double>& integrals);
146
147 /// interpolates nodal data in a data array onto elements (=integration points)
148 void Assemble_interpolate(const NodeFile* nodes, const ElementFile* elements,
149 const escript::Data& data, escript::Data& output);
150
151 void Assemble_jacobians_2D(const double* coordinates, int numQuad,
152 dim_t numElements, int numNodes,
153 const index_t* nodes, double* dTdX, double* absD,
154 double* quadWeight, const index_t* elementId);
155
156 void Assemble_jacobians_2D_M1D_E1D(const double* coordinates, int numQuad,
157 dim_t numElements, int numNodes,
158 const index_t* nodes, double* dTdX, double* absD,
159 double* quadWeight, const index_t* elementId);
160
161 void Assemble_jacobians_3D(const double* coordinates, int numQuad,
162 dim_t numElements, int numNodes,
163 const index_t* nodes, double* dTdX, double* abs_D,
164 double* quadWeight, const index_t* elementId);
165
166 void Assemble_jacobians_3D_M2D_E2D(const double* coordinates, int numQuad,
167 dim_t numElements, int numNodes,
168 const index_t* nodes, double* dTdX, double* absD,
169 double* quadWeight, const index_t* elementId);
170
171
172 } // namespace dudley
173
174 #endif // __DUDLEY_ASSEMBLE_H__
175

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26