/[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 123 - (hide annotations)
Fri Jul 8 04:08:13 2005 UTC (14 years ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/Assemble_NodeCoordinates.c
File MIME type: text/plain
File size: 2366 byte(s)
Merge of development branch back to main trunk on 2005-07-08

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 jgs 123 dim_t n;
28 jgs 82 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 jgs 123 * Revision 1.2 2005/07/08 04:07:45 jgs
50     * Merge of development branch back to main trunk on 2005-07-08
51 jgs 82 *
52 jgs 123 * Revision 1.1.1.1.2.1 2005/06/29 02:34:46 gross
53     * some changes towards 64 integers in finley
54     *
55     * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
56     * initial import of project esys2
57     *
58 jgs 82 * Revision 1.5 2004/08/26 12:03:52 gross
59     * Some other bug in Finley_Assemble_gradient fixed.
60     *
61     * Revision 1.4 2004/08/05 03:58:27 gross
62     * Bug in Assemble_NodeCoordinates fixed
63     *
64     * Revision 1.3 2004/07/30 04:37:06 gross
65     * escript and finley are linking now and RecMeshTest.py has been passed
66     *
67     * Revision 1.2 2004/07/21 05:00:54 gross
68     * name changes in DataC
69     *
70     * Revision 1.1 2004/07/02 04:21:13 gross
71     * Finley C code has been included
72     *
73     *
74     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26