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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 616 - (show annotations)
Wed Mar 22 02:46:56 2006 UTC (13 years, 6 months ago) by elspeth
File MIME type: text/plain
File size: 2497 byte(s)
Copyright added to more source files.

1 /*
2 ************************************************************
3 * Copyright 2006 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12
13 /**************************************************************/
14
15 /* Finley: Mesh: NodeFile */
16
17 /* copies the array newX into self->coordinates */
18
19 /**************************************************************/
20
21 /* Author: gross@access.edu.au */
22 /* Version: $Id$ */
23
24 /**************************************************************/
25
26 #include "NodeFile.h"
27 #include "Util.h"
28
29 /**************************************************************/
30
31
32 void Finley_NodeFile_setCoordinates(Finley_NodeFile* self,escriptDataC* newX) {
33 char error_msg[LenErrorMsg_MAX];
34 int n;
35 if (getDataPointSize(newX)!=self->numDim) {
36 sprintf(error_msg,"__FILE__: dimension of new coordinates has to be %d.",self->numDim);
37 Finley_setError(VALUE_ERROR,error_msg);
38 } else if (! numSamplesEqual(newX,1,self->numNodes)) {
39 sprintf(error_msg,"__FILE__: number of give nodes must to be %d.",self->numNodes);
40 Finley_setError(VALUE_ERROR,error_msg);
41 } else {
42 #pragma omp parallel for private(n) schedule(static)
43 for (n=0;n<self->numNodes;n++)
44 Finley_copyDouble(self->numDim,getSampleData(newX,n),&(self->Coordinates[INDEX2(0,n,self->numDim)]));
45 }
46 }
47 /*
48 * $Log$
49 * Revision 1.2 2005/09/15 03:44:23 jgs
50 * Merge of development branch dev-02 back to main trunk on 2005-09-15
51 *
52 * Revision 1.1.1.1.6.1 2005/09/07 06:26:20 gross
53 * the solver from finley are put into the standalone package paso now
54 *
55 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
56 * initial import of project esys2
57 *
58 * 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/07/21 05:00:54 gross
62 * name changes in DataC
63 *
64 * Revision 1.3 2004/07/02 04:21:13 gross
65 * Finley C code has been included
66 *
67 * Revision 1.2 2004/07/01 23:54:32 gross
68 * used DataC now
69 *
70 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
71 * Initial version of eys using boost-python.
72 *
73 *
74 */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26