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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 jgs 82 /* $Id$ */
2     /**************************************************************/
3    
4     /* Finley: Mesh: NodeFile */
5    
6     /* copies the array newX into self->coordinates */
7    
8     /**************************************************************/
9    
10     /* Copyrights by ACcESS Australia 2003/04 */
11     /* Author: gross@access.edu.au */
12     /* Version: $Id$ */
13    
14     /**************************************************************/
15    
16     #include "Common.h"
17     #include "Finley.h"
18     #include "NodeFile.h"
19     #include "Util.h"
20     #include "escript/Data/DataC.h"
21    
22     /**************************************************************/
23    
24    
25     void Finley_NodeFile_setCoordinates(Finley_NodeFile* self,escriptDataC* newX) {
26     int n;
27     if (getDataPointSize(newX)!=self->numDim) {
28     Finley_ErrorCode=VALUE_ERROR;
29     sprintf(Finley_ErrorMsg,"dimension of new coordinates has to be %d.",self->numDim);
30     } else if (! numSamplesEqual(newX,1,self->numNodes)) {
31     Finley_ErrorCode=VALUE_ERROR;
32     sprintf(Finley_ErrorMsg,"number of give nodes must to be %d.",self->numNodes);
33     } else {
34     #pragma omp parallel for private(n) schedule(static)
35     for (n=0;n<self->numNodes;n++)
36     Finley_copyDouble(self->numDim,getSampleData(newX,n),&(self->Coordinates[INDEX2(0,n,self->numDim)]));
37     }
38     }
39     /*
40     * $Log$
41     * Revision 1.1 2004/10/26 06:53:57 jgs
42     * Initial revision
43     *
44     * Revision 1.5 2004/08/26 12:03:52 gross
45     * Some other bug in Finley_Assemble_gradient fixed.
46     *
47     * Revision 1.4 2004/07/21 05:00:54 gross
48     * name changes in DataC
49     *
50     * Revision 1.3 2004/07/02 04:21:13 gross
51     * Finley C code has been included
52     *
53     * Revision 1.2 2004/07/01 23:54:32 gross
54     * used DataC now
55     *
56     * Revision 1.1.1.1 2004/06/24 04:00:40 johng
57     * Initial version of eys using boost-python.
58     *
59     *
60     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26