/[escript]/trunk/finley/src/Assemble_PDE_Points.cpp
ViewVC logotype

Contents of /trunk/finley/src/Assemble_PDE_Points.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4408 - (show annotations)
Tue May 14 06:58:43 2013 UTC (6 years, 3 months ago) by caltinay
File size: 2519 byte(s)
Mostly no-op - trying to get some consistency in style while going through a
few files.
Also some minor changes related to C->C++ (e.g. no need to copy vector to pass
to functions etc.)

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by 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 since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15
16
17 /****************************************************************************
18
19 Assembles the system of numEq PDEs into the stiffness matrix S and right
20 hand side F
21
22 d_dirac_{k,m} u_m and y_dirac_k
23
24 u has p.numComp components in a 3D domain.
25 The shape functions for test and solution must be identical and
26 row_NS == row_NN.
27
28 Shape of the coefficients:
29
30 d_dirac = p.numEqu x p.numComp
31 y_dirac = p.numEqu
32
33 *****************************************************************************/
34
35 #include "Assemble.h"
36 #include "Util.h"
37
38 void Finley_Assemble_PDE_Points(Finley_Assemble_Parameters p,
39 Finley_ElementFile* elements,
40 Paso_SystemMatrix* S, escriptDataC* F,
41 escriptDataC* d_dirac, escriptDataC* y_dirac)
42 {
43 requireWrite(F);
44 double *F_p=getSampleDataRW(F,0);
45
46 #pragma omp parallel
47 {
48 for (index_t color=elements->minColor;color<=elements->maxColor;color++) {
49 // loop over all elements
50 #pragma omp for schedule(static)
51 for(index_t e=0; e<elements->numElements; e++) {
52 if (elements->Color[e]==color) {
53 const double *d_dirac_p=getSampleDataRO(d_dirac, e);
54 const double *y_dirac_p=getSampleDataRO(y_dirac, e);
55 index_t row_index=p.row_DOF[elements->Nodes[INDEX2(0,e,p.NN)]];
56 if (NULL != y_dirac_p) {
57 Finley_Util_AddScatter(1, &row_index, p.numEqu,
58 y_dirac_p, F_p, p.row_DOF_UpperBound);
59 }
60 if (NULL != d_dirac_p) {
61 Finley_Assemble_addToSystemMatrix(S, 1, &row_index,
62 p.numEqu, 1, &row_index, p.numComp, d_dirac_p);
63 }
64 } /* end color check */
65 } /* end element loop */
66 } /* end color loop */
67 } /* end parallel region */
68 }
69

Properties

Name Value
svn:mergeinfo /branches/lapack2681/finley/src/Assemble_PDE_Points.cpp:2682-2741 /branches/pasowrap/finley/src/Assemble_PDE_Points.cpp:3661-3674 /branches/py3_attempt2/finley/src/Assemble_PDE_Points.cpp:3871-3891 /branches/restext/finley/src/Assemble_PDE_Points.cpp:2610-2624 /branches/ripleygmg_from_3668/finley/src/Assemble_PDE_Points.cpp:3669-3791 /branches/stage3.0/finley/src/Assemble_PDE_Points.cpp:2569-2590 /branches/symbolic_from_3470/finley/src/Assemble_PDE_Points.cpp:3471-3974 /release/3.0/finley/src/Assemble_PDE_Points.cpp:2591-2601 /trunk/finley/src/Assemble_PDE_Points.cpp:4257-4344

  ViewVC Help
Powered by ViewVC 1.1.26