/[escript]/trunk/finley/src/Assemble_RHSMatrix_Single.c
ViewVC logotype

Contents of /trunk/finley/src/Assemble_RHSMatrix_Single.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 201 - (show annotations)
Wed Nov 23 04:10:21 2005 UTC (14 years ago) by jgs
Original Path: trunk/finley/src/finley/Assemble_RHSMatrix_Single.c
File MIME type: text/plain
File size: 3890 byte(s)
copy finleyC and CPPAdapter to finley and finley/CPPAdapter to
facilitate scons builds

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 /**************************************************************/
16
17 /* Updates the element matrices: */
18
19 /* assembles the system of numEq components right hand side F */
20
21 /* -div X + Y */
22
23 /* -(X_i)_i + Y */
24
25 /* Shape of the coefficients: */
26
27 /* X = numDim */
28 /* Y = 1 */
29
30 /**************************************************************/
31
32 /* Author: gross@access.edu.au */
33 /* Version: $Id$ */
34
35 /**************************************************************/
36
37 #include "Assemble.h"
38
39 /**************************************************************/
40
41 void Finley_Assemble_RHSMatrix_Single(dim_t NS,dim_t numDim,dim_t numQuad,
42 double* S,double* DSDX,double* Vol,
43 dim_t NN, double* EM_F,
44 double* X, bool_t extendedX,
45 double* Y, bool_t extendedY) {
46 dim_t s,q,i;
47 double rtmp;
48
49 for (s=0;s<NS;s++) {
50 /**************************************************************/
51 /* process X: */
52 /**************************************************************/
53 if (NULL!=X) {
54 if (extendedX) {
55 for (i=0;i<numDim;i++) {
56 for (q=0;q<numQuad;q++) {
57 EM_F[INDEX2(0,s,1)]+=Vol[q]*DSDX[INDEX3(s,i,q,NS,numDim)]*X[INDEX2(i,q,numDim)];
58 }
59 }
60 } else {
61 for (i=0;i<numDim;i++) {
62 if (X[i]!=0.) {
63 rtmp=0;
64 for (q=0;q<numQuad;q++) rtmp+=Vol[q]*DSDX[INDEX3(s,i,q,NS,numDim)];
65 EM_F[INDEX2(0,s,1)]+=rtmp*X[i];
66 }
67 }
68 }
69 }
70 /**************************************************************/
71 /* process Y: */
72 /**************************************************************/
73 if (NULL!=Y) {
74 if (extendedY) {
75 for (q=0;q<numQuad;q++) EM_F[INDEX2(0,s,1)]+=Vol[q]*S[INDEX2(s,q,NS)]*Y[q];
76 } else {
77 if (Y[0]!=0.) {
78 rtmp=0;
79 for (q=0;q<numQuad;q++) rtmp+=Vol[q]*S[INDEX2(s,q,NS)];
80 EM_F[INDEX2(0,s,1)]+=rtmp*Y[0];
81 }
82 }
83 }
84 }
85 }
86
87 /*
88 * $Log$
89 * Revision 1.3 2005/09/15 03:44:21 jgs
90 * Merge of development branch dev-02 back to main trunk on 2005-09-15
91 *
92 * Revision 1.2.2.1 2005/09/07 06:26:17 gross
93 * the solver from finley are put into the standalone package paso now
94 *
95 * Revision 1.2 2005/07/08 04:07:46 jgs
96 * Merge of development branch back to main trunk on 2005-07-08
97 *
98 * Revision 1.1.1.1.2.1 2005/06/29 02:34:47 gross
99 * some changes towards 64 integers in finley
100 *
101 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
102 * initial import of project esys2
103 *
104 * Revision 1.2 2004/07/30 04:37:06 gross
105 * escript and finley are linking now and RecMeshTest.py has been passed
106 *
107 * Revision 1.1 2004/07/02 04:21:13 gross
108 * Finley C code has been included
109 *
110 *
111 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26