/[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

revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
2     ******************************************************************************
3     *                                                                            *
4     *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *
5     *                                                                            *
6     * This software is the property of ACcESS. No part of this code              *
7     * may be copied in any form or by any means without the expressed written    *
8     * consent of ACcESS.  Copying, use or modification of this software          *
9     * by any unauthorised person is illegal unless that person has a software    *
10     * license agreement with ACcESS.                                             *
11     *                                                                            *
12     ******************************************************************************
13    */
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 6  Line 18 
18    
19  /**************************************************************/  /**************************************************************/
20    
21  /*   Copyrights by ACcESS Australia, 2003,2004 */  /*  Copyrights by ACcESS Australia 2003,2004,2005 */
22  /*   author: gross@access.edu.au */  /*  Version: $Id$ */
 /*   Version: $Id$ */  
23    
24  /**************************************************************/  /**************************************************************/
25    
 #include "escript/Data/DataC.h"  
26  #include "Util.h"  #include "Util.h"
 #include "Finley.h"  
27  #include "Assemble.h"  #include "Assemble.h"
 #include "NodeFile.h"  
28  #ifdef _OPENMP  #ifdef _OPENMP
29  #include <omp.h>  #include <omp.h>
30  #endif  #endif
# Line 24  Line 32 
32  /**************************************************************/  /**************************************************************/
33    
34  void Finley_Assemble_NodeCoordinates(Finley_NodeFile* nodes,escriptDataC* x) {  void Finley_Assemble_NodeCoordinates(Finley_NodeFile* nodes,escriptDataC* x) {
35      char error_msg[LenErrorMsg_MAX];
36    dim_t n;    dim_t n;
37      Finley_resetError();
38    if (nodes==NULL) return;    if (nodes==NULL) return;
39    if (! numSamplesEqual(x,1,nodes->numNodes)) {    if (! numSamplesEqual(x,1,nodes->numNodes)) {
40         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of Data object");
        sprintf(Finley_ErrorMsg,"illegal number of samples of Data object");  
41    } else if (getFunctionSpaceType(x)!=FINLEY_NODES) {    } else if (getFunctionSpaceType(x)!=FINLEY_NODES) {
42         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: Data object is not defined on nodes.");
        sprintf(Finley_ErrorMsg,"Data object is not defined on nodes.");  
43    } else if (! isExpanded(x)) {    } else if (! isExpanded(x)) {
44         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object expected");
        sprintf(Finley_ErrorMsg,"expanded Data object expected");  
45    } else if (! isDataPointShapeEqual(x,1, &(nodes->numDim))) {    } else if (! isDataPointShapeEqual(x,1, &(nodes->numDim))) {
46         Finley_ErrorCode=TYPE_ERROR;         sprintf(error_msg,"__FILE__: Data object of shape (%d,) expected",nodes->numDim);
47         sprintf(Finley_ErrorMsg,"Data object of shape (%d,) expected",nodes->numDim);         Finley_setError(TYPE_ERROR,error_msg);
48    } else {    } else {
49         #pragma omp parallel for private(n)         #pragma omp parallel for private(n)
50         for (n=0;n<nodes->numNodes;n++)         for (n=0;n<nodes->numNodes;n++)
# Line 46  void Finley_Assemble_NodeCoordinates(Fin Line 53  void Finley_Assemble_NodeCoordinates(Fin
53  }  }
54  /*  /*
55   * $Log$   * $Log$
56     * Revision 1.3  2005/09/15 03:44:21  jgs
57     * Merge of development branch dev-02 back to main trunk on 2005-09-15
58     *
59     * Revision 1.2.2.1  2005/09/07 06:26:17  gross
60     * the solver from finley are put into the standalone package paso now
61     *
62   * Revision 1.2  2005/07/08 04:07:45  jgs   * Revision 1.2  2005/07/08 04:07:45  jgs
63   * Merge of development branch back to main trunk on 2005-07-08   * Merge of development branch back to main trunk on 2005-07-08
64   *   *

Legend:
Removed from v.123  
changed lines
  Added in v.150

  ViewVC Help
Powered by ViewVC 1.1.26