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

Diff of /trunk/finley/src/Assemble_NodeCoordinates.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/finley/src/finley/Assemble_NodeCoordinates.c revision 201 by jgs, Wed Nov 23 04:10:21 2005 UTC trunk/finley/src/Assemble_NodeCoordinates.c revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC
# Line 1  Line 1 
 /*  
  ******************************************************************************  
  *                                                                            *  
  *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *  
  *                                                                            *  
  * This software is the property of ACcESS. No part of this code              *  
  * may be copied in any form or by any means without the expressed written    *  
  * consent of ACcESS.  Copying, use or modification of this software          *  
  * by any unauthorised person is illegal unless that person has a software    *  
  * license agreement with ACcESS.                                             *  
  *                                                                            *  
  ******************************************************************************  
 */  
1    
2  /**************************************************************/  /*******************************************************
3    *
4    * Copyright (c) 2003-2008 by University of Queensland
5    * Earth Systems Science Computational Center (ESSCC)
6    * http://www.uq.edu.au/esscc
7    *
8    * Primary Business: Queensland, Australia
9    * Licensed under the Open Software License version 3.0
10    * http://www.opensource.org/licenses/osl-3.0.php
11    *
12    *******************************************************/
13    
 /*    assemblage routines: copies node coordinates into an expanded Data Object */  
14    
15  /**************************************************************/  /**************************************************************/
16    
17  /*  Copyrights by ACcESS Australia 2003,2004,2005 */  /*    assemblage routines: copies node coordinates into an expanded Data Object */
 /*  Version: $Id$ */  
18    
19  /**************************************************************/  /**************************************************************/
20    
# Line 34  Line 29 
29  void Finley_Assemble_NodeCoordinates(Finley_NodeFile* nodes,escriptDataC* x) {  void Finley_Assemble_NodeCoordinates(Finley_NodeFile* nodes,escriptDataC* x) {
30    char error_msg[LenErrorMsg_MAX];    char error_msg[LenErrorMsg_MAX];
31    dim_t n;    dim_t n;
32      size_t dim_size;
33    Finley_resetError();    Finley_resetError();
34    if (nodes==NULL) return;    if (nodes==NULL) return;
35    if (! numSamplesEqual(x,1,nodes->numNodes)) {    if (! numSamplesEqual(x,1,nodes->numNodes)) {
36         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of Data object");         Finley_setError(TYPE_ERROR,"Finley_Assemble_NodeCoordinates: illegal number of samples of Data object");
37    } else if (getFunctionSpaceType(x)!=FINLEY_NODES) {    } else if (getFunctionSpaceType(x)!=FINLEY_NODES) {
38         Finley_setError(TYPE_ERROR,"__FILE__: Data object is not defined on nodes.");         Finley_setError(TYPE_ERROR,"Finley_Assemble_NodeCoordinates: Data object is not defined on nodes.");
39    } else if (! isExpanded(x)) {    } else if (! isExpanded(x)) {
40         Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object expected");         Finley_setError(TYPE_ERROR,"Finley_Assemble_NodeCoordinates: expanded Data object expected");
41    } else if (! isDataPointShapeEqual(x,1, &(nodes->numDim))) {    } else if (! isDataPointShapeEqual(x,1, &(nodes->numDim))) {
42         sprintf(error_msg,"__FILE__: Data object of shape (%d,) expected",nodes->numDim);         sprintf(error_msg,"Finley_Assemble_NodeCoordinates: Data object of shape (%d,) expected",nodes->numDim);
43         Finley_setError(TYPE_ERROR,error_msg);         Finley_setError(TYPE_ERROR,error_msg);
44    } else {    } else {
45           dim_size=nodes->numDim*sizeof(double);
46         #pragma omp parallel for private(n)         #pragma omp parallel for private(n)
47         for (n=0;n<nodes->numNodes;n++)         for (n=0;n<nodes->numNodes;n++)
48            Finley_copyDouble(nodes->numDim,&(nodes->Coordinates[INDEX2(0,n,nodes->numDim)]),getSampleData(x,n));            memcpy(getSampleDataFast(x,n),&(nodes->Coordinates[INDEX2(0,n,nodes->numDim)]),dim_size);
49    }    }
50  }  }
 /*  
  * $Log$  
  * Revision 1.3  2005/09/15 03:44:21  jgs  
  * Merge of development branch dev-02 back to main trunk on 2005-09-15  
  *  
  * Revision 1.2.2.1  2005/09/07 06:26:17  gross  
  * the solver from finley are put into the standalone package paso now  
  *  
  * Revision 1.2  2005/07/08 04:07:45  jgs  
  * Merge of development branch back to main trunk on 2005-07-08  
  *  
  * Revision 1.1.1.1.2.1  2005/06/29 02:34:46  gross  
  * some changes towards 64 integers in finley  
  *  
  * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
  * initial import of project esys2  
  *  
  * Revision 1.5  2004/08/26 12:03:52  gross  
  * Some other bug in Finley_Assemble_gradient fixed.  
  *  
  * Revision 1.4  2004/08/05 03:58:27  gross  
  * Bug in Assemble_NodeCoordinates fixed  
  *  
  * Revision 1.3  2004/07/30 04:37:06  gross  
  * escript and finley are linking now and RecMeshTest.py has been passed  
  *  
  * Revision 1.2  2004/07/21 05:00:54  gross  
  * name changes in DataC  
  *  
  * Revision 1.1  2004/07/02 04:21:13  gross  
  * Finley C code has been included  
  *  
  *  
  */  

Legend:
Removed from v.201  
changed lines
  Added in v.1811

  ViewVC Help
Powered by ViewVC 1.1.26