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

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

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

revision 616 by elspeth, Wed Mar 22 02:46:56 2006 UTC revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC
# Line 1  Line 1 
1  /*  
2   ************************************************************  /*******************************************************
3   *          Copyright 2006 by ACcESS MNRF                   *  *
4   *                                                          *  * Copyright (c) 2003-2008 by University of Queensland
5   *              http://www.access.edu.au                    *  * Earth Systems Science Computational Center (ESSCC)
6   *       Primary Business: Queensland, Australia            *  * http://www.uq.edu.au/esscc
7   *  Licensed under the Open Software License version 3.0    *  *
8   *     http://www.opensource.org/licenses/osl-3.0.php       *  * 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    
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 18  Line 20 
20    
21  /**************************************************************/  /**************************************************************/
22    
 /*   Author: gross@access.edu.au */  
 /*   Version: $Id$ */  
   
 /**************************************************************/  
   
23  #include "NodeFile.h"  #include "NodeFile.h"
24  #include "Util.h"  #include "Util.h"
25    
# Line 31  Line 28 
28    
29  void Finley_NodeFile_setCoordinates(Finley_NodeFile* self,escriptDataC* newX) {  void Finley_NodeFile_setCoordinates(Finley_NodeFile* self,escriptDataC* newX) {
30    char error_msg[LenErrorMsg_MAX];    char error_msg[LenErrorMsg_MAX];
31     int n;    size_t numDim_size;
32      int n;
33     if (getDataPointSize(newX)!=self->numDim)  {     if (getDataPointSize(newX)!=self->numDim)  {
34        sprintf(error_msg,"__FILE__: dimension of new coordinates has to be %d.",self->numDim);        sprintf(error_msg,"Finley_NodeFile_setCoordinates: dimension of new coordinates has to be %d.",self->numDim);
35        Finley_setError(VALUE_ERROR,error_msg);        Finley_setError(VALUE_ERROR,error_msg);
36     } else if (! numSamplesEqual(newX,1,self->numNodes)) {     } else if (! numSamplesEqual(newX,1,self->numNodes)) {
37           sprintf(error_msg,"__FILE__: number of give nodes must to be %d.",self->numNodes);           sprintf(error_msg,"Finley_NodeFile_setCoordinates: number of give nodes must to be %d.",self->numNodes);
38           Finley_setError(VALUE_ERROR,error_msg);           Finley_setError(VALUE_ERROR,error_msg);
39     } else {     } else {
40              numDim_size=self->numDim*sizeof(double);
41              Finley_increaseStatus(self);
42            #pragma omp parallel for private(n) schedule(static)            #pragma omp parallel for private(n) schedule(static)
43            for (n=0;n<self->numNodes;n++)            for (n=0;n<self->numNodes;n++) {
44              Finley_copyDouble(self->numDim,getSampleData(newX,n),&(self->Coordinates[INDEX2(0,n,self->numDim)]));              memcpy(&(self->Coordinates[INDEX2(0,n,self->numDim)]), getSampleDataFast(newX,n), numDim_size);
45              }
46     }     }
47  }  }
 /*  
 * $Log$  
 * Revision 1.2  2005/09/15 03:44:23  jgs  
 * Merge of development branch dev-02 back to main trunk on 2005-09-15  
 *  
 * Revision 1.1.1.1.6.1  2005/09/07 06:26:20  gross  
 * the solver from finley are put into the standalone package paso now  
 *  
 * 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/07/21 05:00:54  gross  
 * name changes in DataC  
 *  
 * Revision 1.3  2004/07/02 04:21:13  gross  
 * Finley C code has been included  
 *  
 * Revision 1.2  2004/07/01 23:54:32  gross  
 * used DataC now  
 *  
 * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
 * Initial version of eys using boost-python.  
 *  
 *  
 */  

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

  ViewVC Help
Powered by ViewVC 1.1.26