/[escript]/branches/trilinos_from_5897/dudley/src/ElementFile_jacobians.cpp
ViewVC logotype

Contents of /branches/trilinos_from_5897/dudley/src/ElementFile_jacobians.cpp

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 size: 3502 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 #include "ElementFile.h"
18 #include "Assemble.h"
19 #include "ShapeTable.h"
20
21 namespace dudley {
22
23 ElementFile_Jacobians::ElementFile_Jacobians() :
24 status(DUDLEY_INITIAL_STATUS - 1),
25 numDim(0),
26 numQuad(0),
27 numElements(0),
28 absD(NULL),
29 quadweight(0),
30 DSDX(NULL)
31 {
32 }
33
34 ElementFile_Jacobians::~ElementFile_Jacobians()
35 {
36 delete[] DSDX;
37 delete[] absD;
38 }
39
40 ElementFile_Jacobians* ElementFile::borrowJacobians(const NodeFile* nodes,
41 bool reducedIntegrationOrder) const
42 {
43 ElementFile_Jacobians* out =
44 (reducedIntegrationOrder ? jacobians_reducedQ : jacobians);
45
46 if (out->status < nodes->status) {
47 out->numDim = nodes->numDim;
48 out->numQuad = QuadNums[numDim][!reducedIntegrationOrder];
49 out->numShapes = numDim + 1;
50 out->numElements = numElements;
51 if (out->DSDX == NULL)
52 out->DSDX = new double[out->numElements * out->numShapes * out->numDim * out->numQuad];
53 if (out->absD == NULL)
54 out->absD = new double[out->numElements];
55
56 /*========================== dim = 2 ============================= */
57 if (out->numDim == 2) {
58 if (numLocalDim == 1) {
59 Assemble_jacobians_2D_M1D_E1D(nodes->Coordinates, out->numQuad,
60 numElements, numNodes, Nodes, out->DSDX, out->absD,
61 &out->quadweight, Id);
62 } else if (numLocalDim == 2) {
63 Assemble_jacobians_2D(nodes->Coordinates, out->numQuad,
64 numElements, numNodes, Nodes, out->DSDX, out->absD,
65 &out->quadweight, Id);
66 } else {
67 throw DudleyException("ElementFile::borrowJacobians: local "
68 "dimension in a 2D domain has to be 1 or 2.");
69 }
70 /*========================== dim = 3 ============================= */
71 } else if (out->numDim == 3) {
72 if (numLocalDim == 2) {
73 Assemble_jacobians_3D_M2D_E2D(nodes->Coordinates, out->numQuad,
74 numElements, numNodes, Nodes, out->DSDX, out->absD,
75 &out->quadweight, Id);
76 } else if (numLocalDim == 3) {
77 Assemble_jacobians_3D(nodes->Coordinates, out->numQuad,
78 numElements, numNodes, Nodes, out->DSDX, out->absD,
79 &out->quadweight, Id);
80 } else {
81 throw DudleyException("ElementFile::borrowJacobians: local "
82 "dimension in a 3D domain has to be 2 or 3.");
83 }
84 } else {
85 throw DudleyException("ElementFile::borrowJacobians: number of "
86 "spatial dimensions has to be 2 or 3.");
87 }
88 out->status = nodes->status;
89 }
90 return out;
91 }
92
93 } // namespace dudley
94

Properties

Name Value
svn:mergeinfo /branches/4.0fordebian/dudley/src/ElementFile_jacobeans.cpp:5567-5588 /branches/4.0fordebian/dudley/src/ElementFile_jacobians.cpp:5567-5588 /branches/complex/dudley/src/ElementFile_jacobians.cpp:5866-5937 /branches/diaplayground/dudley/src/ElementFile_jacobians.cpp:4940-5147 /branches/lapack2681/finley/src/ElementFile_jacobeans.cpp:2682-2741 /branches/lapack2681/finley/src/ElementFile_jacobians.cpp:2682-2741 /branches/pasowrap/dudley/src/ElementFile_jacobeans.cpp:3661-3674 /branches/pasowrap/dudley/src/ElementFile_jacobians.cpp:3661-3674 /branches/py3_attempt2/dudley/src/ElementFile_jacobeans.cpp:3871-3891 /branches/py3_attempt2/dudley/src/ElementFile_jacobians.cpp:3871-3891 /branches/restext/finley/src/ElementFile_jacobeans.cpp:2610-2624 /branches/restext/finley/src/ElementFile_jacobians.cpp:2610-2624 /branches/ripleygmg_from_3668/dudley/src/ElementFile_jacobeans.cpp:3669-3791 /branches/ripleygmg_from_3668/dudley/src/ElementFile_jacobians.cpp:3669-3791 /branches/stage3.0/finley/src/ElementFile_jacobeans.cpp:2569-2590 /branches/stage3.0/finley/src/ElementFile_jacobians.cpp:2569-2590 /branches/symbolic_from_3470/dudley/src/ElementFile_jacobeans.cpp:3471-3974 /branches/symbolic_from_3470/dudley/src/ElementFile_jacobians.cpp:3471-3974 /branches/symbolic_from_3470/ripley/test/python/dudley/src/ElementFile_jacobeans.cpp:3517-3974 /branches/symbolic_from_3470/ripley/test/python/dudley/src/ElementFile_jacobians.cpp:3517-3974 /release/3.0/finley/src/ElementFile_jacobeans.cpp:2591-2601 /release/3.0/finley/src/ElementFile_jacobians.cpp:2591-2601 /release/4.0/dudley/src/ElementFile_jacobeans.cpp:5380-5406 /release/4.0/dudley/src/ElementFile_jacobians.cpp:5380-5406 /trunk/dudley/src/ElementFile_jacobeans.cpp:4257-4344 /trunk/dudley/src/ElementFile_jacobians.cpp:5898-5962,5982-6007 /trunk/ripley/test/python/dudley/src/ElementFile_jacobeans.cpp:3480-3515 /trunk/ripley/test/python/dudley/src/ElementFile_jacobians.cpp:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26