/[escript]/trunk/finley/src/finleyC/Assemble_getSize.c
ViewVC logotype

Diff of /trunk/finley/src/finleyC/Assemble_getSize.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 10  Line 22 
22    
23  /**************************************************************/  /**************************************************************/
24    
25  /*   Copyrights by ACcESS Australia, 2003,2004 */  /*   Copyrights by ACcESS Australia, 2003,2004,2005 */
26  /*   author: gross@access.edu.au */  /*   author: gross@access.edu.au */
27  /*   Version: $Id$ */  /*   version: $Id$ */
28    
29  /**************************************************************/  /**************************************************************/
30    
 #include "escript/Data/DataC.h"  
 #include "Finley.h"  
31  #include "Assemble.h"  #include "Assemble.h"
 #include "NodeFile.h"  
 #include "ElementFile.h"  
32  #include "Util.h"  #include "Util.h"
33  #ifdef _OPENMP  #ifdef _OPENMP
34  #include <omp.h>  #include <omp.h>
# Line 33  void Finley_Assemble_getSize(Finley_Node Line 41  void Finley_Assemble_getSize(Finley_Node
41    dim_t e,n0,n1,q,i;    dim_t e,n0,n1,q,i;
42    index_t node_offset;    index_t node_offset;
43    double d,diff,min_diff;    double d,diff,min_diff;
44      Finley_resetError();
45    
46    if (nodes==NULL || elements==NULL) return;    if (nodes==NULL || elements==NULL) return;
47    dim_t NVertices=elements->ReferenceElement->Type->numVertices;    dim_t NVertices=elements->ReferenceElement->Type->numVertices;
# Line 52  void Finley_Assemble_getSize(Finley_Node Line 61  void Finley_Assemble_getSize(Finley_Node
61    /* check the dimensions of element_size */    /* check the dimensions of element_size */
62    
63    if (numDim!=elements->ReferenceElement->Type->numDim) {    if (numDim!=elements->ReferenceElement->Type->numDim) {
64       Finley_ErrorCode=TYPE_ERROR;       Finley_setError(TYPE_ERROR,"__FILE__: Gradient: Spatial and element dimension must match.");
      sprintf(Finley_ErrorMsg,"Gradient: Spatial and element dimension must match.");  
65    } else if (! numSamplesEqual(element_size,numQuad,elements->numElements)) {    } else if (! numSamplesEqual(element_size,numQuad,elements->numElements)) {
66         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of element size Data object");
        sprintf(Finley_ErrorMsg,"illegal number of samples of element size Data object");  
67    } else if (! isDataPointShapeEqual(element_size,0,&(numDim))) {    } else if (! isDataPointShapeEqual(element_size,0,&(numDim))) {
68         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal data point shape of element size Data object");
        sprintf(Finley_ErrorMsg,"illegal data point shape of element size Data object");  
69    }  else if (!isExpanded(element_size)) {    }  else if (!isExpanded(element_size)) {
70         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object is expected for element size.");
        sprintf(Finley_ErrorMsg,"expanded Data object is expected for element size.");  
71    }    }
72    /* now we can start: */    /* now we can start: */
73    
74    if (Finley_ErrorCode==NO_ERROR) {    if (Finley_noError()) {
75          #pragma omp parallel private(local_X)          #pragma omp parallel private(local_X)
76          {          {
77         /* allocation of work arrays */         /* allocation of work arrays */
# Line 106  void Finley_Assemble_getSize(Finley_Node Line 111  void Finley_Assemble_getSize(Finley_Node
111  }  }
112  /*  /*
113   * $Log$   * $Log$
114     * Revision 1.7  2005/09/15 03:44:21  jgs
115     * Merge of development branch dev-02 back to main trunk on 2005-09-15
116     *
117     * Revision 1.6.2.1  2005/09/07 06:26:17  gross
118     * the solver from finley are put into the standalone package paso now
119     *
120   * Revision 1.6  2005/07/08 04:07:47  jgs   * Revision 1.6  2005/07/08 04:07:47  jgs
121   * Merge of development branch back to main trunk on 2005-07-08   * Merge of development branch back to main trunk on 2005-07-08
122   *   *

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

  ViewVC Help
Powered by ViewVC 1.1.26