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

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

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

trunk/finley/src/finley/Assemble_getSize.c revision 201 by jgs, Wed Nov 23 04:10:21 2005 UTC trunk/finley/src/Assemble_getSize.c revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC
# Line 1  Line 1 
1  /*  
2   ******************************************************************************  /* $Id$ */
3   *                                                                            *  
4   *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *  /*******************************************************
5   *                                                                            *   *
6   * This software is the property of ACcESS. No part of this code              *   *           Copyright 2003-2007 by ACceSS MNRF
7   * may be copied in any form or by any means without the expressed written    *   *       Copyright 2007 by University of Queensland
8   * consent of ACcESS.  Copying, use or modification of this software          *   *
9   * by any unauthorised person is illegal unless that person has a software    *   *                http://esscc.uq.edu.au
10   * license agreement with ACcESS.                                             *   *        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 22  Line 23 
23    
24  /**************************************************************/  /**************************************************************/
25    
 /*   Copyrights by ACcESS Australia, 2003,2004,2005 */  
 /*   author: gross@access.edu.au */  
 /*   version: $Id$ */  
   
 /**************************************************************/  
   
26  #include "Assemble.h"  #include "Assemble.h"
27  #include "Util.h"  #include "Util.h"
28  #ifdef _OPENMP  #ifdef _OPENMP
# Line 38  Line 33 
33  void Finley_Assemble_getSize(Finley_NodeFile* nodes, Finley_ElementFile* elements, escriptDataC* element_size) {  void Finley_Assemble_getSize(Finley_NodeFile* nodes, Finley_ElementFile* elements, escriptDataC* element_size) {
34    
35    double *local_X=NULL,*element_size_array;    double *local_X=NULL,*element_size_array;
36    dim_t e,n0,n1,q,i;    dim_t e,n0,n1,q,i, NVertices, NN, NS, numQuad, numDim;
37    index_t node_offset;    index_t node_offset;
38    double d,diff,min_diff;    double d,diff,min_diff;
39    Finley_resetError();    Finley_resetError();
40    
41    if (nodes==NULL || elements==NULL) return;    if (nodes==NULL || elements==NULL) return;
42    dim_t NVertices=elements->ReferenceElement->Type->numVertices;    NVertices=elements->ReferenceElement->Type->numVertices;
43    dim_t NN=elements->ReferenceElement->Type->numNodes;    NN=elements->ReferenceElement->Type->numNodes;
44    dim_t NS=elements->ReferenceElement->Type->numShapes;    NS=elements->ReferenceElement->Type->numShapes;
45    dim_t numQuad=elements->ReferenceElement->numQuadNodes;    numDim=nodes->numDim;
46    dim_t numDim=nodes->numDim;    
47      if (Finley_Assemble_reducedIntegrationOrder(element_size)) {
48          numQuad=elements->ReferenceElementReducedOrder->numQuadNodes;
49      } else {
50          numQuad=elements->ReferenceElement->numQuadNodes;
51      }
52    
53    /* set a few more parameters */    /* set a few more parameters */
54    
# Line 61  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_setError(TYPE_ERROR,"__FILE__: Gradient: Spatial and element dimension must match.");       Finley_setError(TYPE_ERROR,"Finley_Assemble_getSize: 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_setError(TYPE_ERROR,"__FILE__: illegal number of samples of element size Data object");         Finley_setError(TYPE_ERROR,"Finley_Assemble_getSize: 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_setError(TYPE_ERROR,"__FILE__: illegal data point shape of element size Data object");         Finley_setError(TYPE_ERROR,"Finley_Assemble_getSize: illegal data point shape of element size Data object");
69    }  else if (!isExpanded(element_size)) {    }  else if (!isExpanded(element_size)) {
70         Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object is expected for element size.");         Finley_setError(TYPE_ERROR,"Finley_Assemble_getSize: expanded Data object is expected for element size.");
71    }    }
72    /* now we can start: */    /* now we can start: */
73    

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

  ViewVC Help
Powered by ViewVC 1.1.26