/[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 616 - (hide annotations)
Wed Mar 22 02:46:56 2006 UTC (13 years, 4 months ago) by elspeth
File MIME type: text/plain
File size: 3144 byte(s)
Copyright added to more source files.

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26