/[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 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC
# Line 1  Line 1 
1  /*  
2   ************************************************************  /* $Id$ */
3   *          Copyright 2006 by ACcESS MNRF                   *  
4   *                                                          *  /*******************************************************
5   *              http://www.access.edu.au                    *   *
6   *       Primary Business: Queensland, Australia            *   *           Copyright 2003-2007 by ACceSS MNRF
7   *  Licensed under the Open Software License version 3.0    *   *       Copyright 2007 by University of Queensland
8   *     http://www.opensource.org/licenses/osl-3.0.php       *   *
9   *                                                          *   *                http://esscc.uq.edu.au
10   ************************************************************   *        Primary Business: Queensland, Australia
11  */   *  Licensed under the Open Software License version 3.0
12     *     http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16  /**************************************************************/  /**************************************************************/
17    
# Line 18  Line 21 
21    
22  /**************************************************************/  /**************************************************************/
23    
 /*   Author: gross@access.edu.au */  
 /*   Version: $Id$ */  
   
 /**************************************************************/  
   
24  #include "NodeFile.h"  #include "NodeFile.h"
25  #include "Util.h"  #include "Util.h"
26    
# Line 31  Line 29 
29    
30  void Finley_NodeFile_setCoordinates(Finley_NodeFile* self,escriptDataC* newX) {  void Finley_NodeFile_setCoordinates(Finley_NodeFile* self,escriptDataC* newX) {
31    char error_msg[LenErrorMsg_MAX];    char error_msg[LenErrorMsg_MAX];
32     int n;    size_t numDim_size;
33      int n;
34     if (getDataPointSize(newX)!=self->numDim)  {     if (getDataPointSize(newX)!=self->numDim)  {
35        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);
36        Finley_setError(VALUE_ERROR,error_msg);        Finley_setError(VALUE_ERROR,error_msg);
37     } else if (! numSamplesEqual(newX,1,self->numNodes)) {     } else if (! numSamplesEqual(newX,1,self->numNodes)) {
38           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);
39           Finley_setError(VALUE_ERROR,error_msg);           Finley_setError(VALUE_ERROR,error_msg);
40     } else {     } else {
41              numDim_size=self->numDim*sizeof(double);
42              Finley_increaseStatus(self);
43            #pragma omp parallel for private(n) schedule(static)            #pragma omp parallel for private(n) schedule(static)
44            for (n=0;n<self->numNodes;n++)            for (n=0;n<self->numNodes;n++)
45              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);
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.1388

  ViewVC Help
Powered by ViewVC 1.1.26