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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5933 - (show annotations)
Wed Feb 17 23:53:30 2016 UTC (21 months, 4 weeks ago) by caltinay
File size: 3757 byte(s)
sync with trunk.

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
20 /* assembles the system of numEq PDEs into the stiffness matrix S right hand side F */
21 /* the shape functions for test and solution must be identical */
22
23
24 /* d_dirac_{k,m} u_m yand _dirac_k */
25
26 /* u has p.numComp components in a 3D domain. The shape functions for test and solution must be identical */
27 /* and row_NS == row_NN */
28
29 /* Shape of the coefficients: */
30
31 /* d_dirac = p.numEqu x p.numComp */
32 /* y_dirac = p.numEqu */
33
34
35 /************************************************************************************/
36
37 #define ESNEEDPYTHON
38 #include "esysUtils/first.h"
39
40 #include "Assemble.h"
41 #include "Util.h"
42 #ifdef _OPENMP
43 #include <omp.h>
44 #endif
45
46
47 /************************************************************************************/
48
49 void Dudley_Assemble_PDE_Points(Dudley_Assemble_Parameters p,
50 Dudley_ElementFile* elements,
51 escript::ASM_ptr mat, escript::Data* F,
52 const escript::Data* d_dirac, const escript::Data* y_dirac) {
53
54 index_t color, e, row_index;
55 __const double *d_dirac_p, *y_dirac_p;
56
57 double *F_p=(requireWrite(F), getSampleDataRW(F,0)); /* use comma, to get around the mixed code and declarations thing */
58
59 #pragma omp parallel private(color, d_dirac_p, y_dirac_p)
60 {
61 for (color=elements->minColor;color<=elements->maxColor;color++) {
62 /* open loop over all elements: */
63 #pragma omp for private(e) schedule(static)
64 for(e=0;e<elements->numElements;e++){
65 if (elements->Color[e]==color) {
66
67 d_dirac_p=getSampleDataRO(d_dirac, e);
68 y_dirac_p=getSampleDataRO(y_dirac, e);
69
70 row_index=p.row_DOF[elements->Nodes[INDEX2(0,e,p.NN)]];
71
72 if (NULL!=y_dirac_p) Dudley_Util_AddScatter(1,
73 &row_index,
74 p.numEqu,
75 y_dirac_p,
76 F_p,
77 p.row_DOF_UpperBound);
78
79 if (NULL!=d_dirac_p) Dudley_Assemble_addToSystemMatrix(mat,
80 1,
81 &row_index,
82 p.numEqu,
83 1,
84 &row_index,
85 p.numComp,
86 d_dirac_p);
87 } /* end color check */
88 } /* end element loop */
89 } /* end color loop */
90 } /* end parallel region */
91 }
92

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26