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

Annotation of /trunk/finley/src/Assemble_NodeCoordinates.c

Parent Directory Parent Directory | Revision Log Revision Log


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

1 jgs 150 /*
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 jgs 82
15     /**************************************************************/
16    
17     /* assemblage routines: copies node coordinates into an expanded Data Object */
18    
19     /**************************************************************/
20    
21 jgs 150 /* Copyrights by ACcESS Australia 2003,2004,2005 */
22     /* Version: $Id$ */
23 jgs 82
24     /**************************************************************/
25    
26     #include "Util.h"
27     #include "Assemble.h"
28     #ifdef _OPENMP
29     #include <omp.h>
30     #endif
31    
32     /**************************************************************/
33    
34     void Finley_Assemble_NodeCoordinates(Finley_NodeFile* nodes,escriptDataC* x) {
35 jgs 150 char error_msg[LenErrorMsg_MAX];
36 jgs 123 dim_t n;
37 jgs 150 Finley_resetError();
38 jgs 82 if (nodes==NULL) return;
39     if (! numSamplesEqual(x,1,nodes->numNodes)) {
40 jgs 150 Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of Data object");
41 jgs 82 } else if (getFunctionSpaceType(x)!=FINLEY_NODES) {
42 jgs 150 Finley_setError(TYPE_ERROR,"__FILE__: Data object is not defined on nodes.");
43 jgs 82 } else if (! isExpanded(x)) {
44 jgs 150 Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object expected");
45 jgs 82 } else if (! isDataPointShapeEqual(x,1, &(nodes->numDim))) {
46 jgs 150 sprintf(error_msg,"__FILE__: Data object of shape (%d,) expected",nodes->numDim);
47     Finley_setError(TYPE_ERROR,error_msg);
48 jgs 82 } else {
49     #pragma omp parallel for private(n)
50     for (n=0;n<nodes->numNodes;n++)
51     Finley_copyDouble(nodes->numDim,&(nodes->Coordinates[INDEX2(0,n,nodes->numDim)]),getSampleData(x,n));
52     }
53     }
54     /*
55     * $Log$
56 jgs 150 * Revision 1.3 2005/09/15 03:44:21 jgs
57     * Merge of development branch dev-02 back to main trunk on 2005-09-15
58     *
59     * Revision 1.2.2.1 2005/09/07 06:26:17 gross
60     * the solver from finley are put into the standalone package paso now
61     *
62 jgs 123 * Revision 1.2 2005/07/08 04:07:45 jgs
63     * Merge of development branch back to main trunk on 2005-07-08
64 jgs 82 *
65 jgs 123 * Revision 1.1.1.1.2.1 2005/06/29 02:34:46 gross
66     * some changes towards 64 integers in finley
67     *
68     * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
69     * initial import of project esys2
70     *
71 jgs 82 * Revision 1.5 2004/08/26 12:03:52 gross
72     * Some other bug in Finley_Assemble_gradient fixed.
73     *
74     * Revision 1.4 2004/08/05 03:58:27 gross
75     * Bug in Assemble_NodeCoordinates fixed
76     *
77     * Revision 1.3 2004/07/30 04:37:06 gross
78     * escript and finley are linking now and RecMeshTest.py has been passed
79     *
80     * Revision 1.2 2004/07/21 05:00:54 gross
81     * name changes in DataC
82     *
83     * Revision 1.1 2004/07/02 04:21:13 gross
84     * Finley C code has been included
85     *
86     *
87     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26