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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (hide annotations)
Tue Oct 26 06:53:54 2004 UTC (15 years, 8 months ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/Assemble_NodeCoordinates.c
File MIME type: text/plain
File size: 2141 byte(s)
Initial revision

1 jgs 82 /* $Id$ */
2    
3     /**************************************************************/
4    
5     /* assemblage routines: copies node coordinates into an expanded Data Object */
6    
7     /**************************************************************/
8    
9     /* Copyrights by ACcESS Australia, 2003,2004 */
10     /* author: gross@access.edu.au */
11     /* Version: $Id$ */
12    
13     /**************************************************************/
14    
15     #include "escript/Data/DataC.h"
16     #include "Util.h"
17     #include "Finley.h"
18     #include "Assemble.h"
19     #include "NodeFile.h"
20     #ifdef _OPENMP
21     #include <omp.h>
22     #endif
23    
24     /**************************************************************/
25    
26     void Finley_Assemble_NodeCoordinates(Finley_NodeFile* nodes,escriptDataC* x) {
27     maybelong n;
28     if (nodes==NULL) return;
29     if (! numSamplesEqual(x,1,nodes->numNodes)) {
30     Finley_ErrorCode=TYPE_ERROR;
31     sprintf(Finley_ErrorMsg,"illegal number of samples of Data object");
32     } else if (getFunctionSpaceType(x)!=FINLEY_NODES) {
33     Finley_ErrorCode=TYPE_ERROR;
34     sprintf(Finley_ErrorMsg,"Data object is not defined on nodes.");
35     } else if (! isExpanded(x)) {
36     Finley_ErrorCode=TYPE_ERROR;
37     sprintf(Finley_ErrorMsg,"expanded Data object expected");
38     } else if (! isDataPointShapeEqual(x,1, &(nodes->numDim))) {
39     Finley_ErrorCode=TYPE_ERROR;
40     sprintf(Finley_ErrorMsg,"Data object of shape (%d,) expected",nodes->numDim);
41     } else {
42     #pragma omp parallel for private(n)
43     for (n=0;n<nodes->numNodes;n++)
44     Finley_copyDouble(nodes->numDim,&(nodes->Coordinates[INDEX2(0,n,nodes->numDim)]),getSampleData(x,n));
45     }
46     }
47     /*
48     * $Log$
49     * Revision 1.1 2004/10/26 06:53:57 jgs
50     * Initial revision
51     *
52     * Revision 1.5 2004/08/26 12:03:52 gross
53     * Some other bug in Finley_Assemble_gradient fixed.
54     *
55     * Revision 1.4 2004/08/05 03:58:27 gross
56     * Bug in Assemble_NodeCoordinates fixed
57     *
58     * Revision 1.3 2004/07/30 04:37:06 gross
59     * escript and finley are linking now and RecMeshTest.py has been passed
60     *
61     * Revision 1.2 2004/07/21 05:00:54 gross
62     * name changes in DataC
63     *
64     * Revision 1.1 2004/07/02 04:21:13 gross
65     * Finley C code has been included
66     *
67     *
68     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26