/[escript]/temp/finley/src/Assemble_setNormal.c
ViewVC logotype

Diff of /temp/finley/src/Assemble_setNormal.c

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

revision 149 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 */  /*  Author: gross@access.edu.au */
22  /*   author: gross@access.edu.au */  /*  Version: $Id$ */
 /*   Version: $Id$ */  
23    
24  /**************************************************************/  /**************************************************************/
25    
 #include "escript/Data/DataC.h"  
 #include "Finley.h"  
26  #include "Assemble.h"  #include "Assemble.h"
 #include "NodeFile.h"  
 #include "ElementFile.h"  
27  #include "Util.h"  #include "Util.h"
28  #ifdef _OPENMP  #ifdef _OPENMP
29  #include <omp.h>  #include <omp.h>
# Line 35  void Finley_Assemble_setNormal(Finley_No Line 42  void Finley_Assemble_setNormal(Finley_No
42    dim_t numDim=nodes->numDim;    dim_t numDim=nodes->numDim;
43    dim_t numQuad=elements->ReferenceElement->numQuadNodes;    dim_t numQuad=elements->ReferenceElement->numQuadNodes;
44    dim_t numDim_local=elements->ReferenceElement->Type->numDim;    dim_t numDim_local=elements->ReferenceElement->Type->numDim;
45      Finley_resetError();
46    
47    /* set some parameter */    /* set some parameter */
48    
# Line 47  void Finley_Assemble_setNormal(Finley_No Line 55  void Finley_Assemble_setNormal(Finley_No
55    }    }
56    /* check the dimensions of normal */    /* check the dimensions of normal */
57    if (! (numDim==numDim_local || numDim-1==numDim_local)) {    if (! (numDim==numDim_local || numDim-1==numDim_local)) {
58         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: Cannot calculate normal vector");
        sprintf(Finley_ErrorMsg,"Cannot calculate normal vector");  
59    } else if (! isDataPointShapeEqual(normal,1,&(numDim))) {    } else if (! isDataPointShapeEqual(normal,1,&(numDim))) {
60         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of normal Data object");
        sprintf(Finley_ErrorMsg,"illegal number of samples of normal Data object");  
61    } else if (! numSamplesEqual(normal,numQuad,elements->numElements)) {    } else if (! numSamplesEqual(normal,numQuad,elements->numElements)) {
62         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of normal Data object");
        sprintf(Finley_ErrorMsg,"illegal number of samples of normal Data object");  
63    } else if (! isDataPointShapeEqual(normal,1,&(numDim))) {    } else if (! isDataPointShapeEqual(normal,1,&(numDim))) {
64         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal point data shape of normal Data object");
        sprintf(Finley_ErrorMsg,"illegal point data shape of normal Data object");  
65    }  else if (!isExpanded(normal)) {    }  else if (!isExpanded(normal)) {
66         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object is expected for normal.");
        sprintf(Finley_ErrorMsg,"expanded Data object is expected for normal.");  
67    }    }
68        
69    /* now we can start */    /* now we can start */
70      if (Finley_ErrorCode==NO_ERROR) {      if (Finley_noError()) {
71            #pragma omp parallel private(local_X,dVdv)            #pragma omp parallel private(local_X,dVdv)
72            {            {
73               local_X=dVdv=NULL;               local_X=dVdv=NULL;
# Line 92  void Finley_Assemble_setNormal(Finley_No Line 95  void Finley_Assemble_setNormal(Finley_No
95  }  }
96  /*  /*
97   * $Log$   * $Log$
98     * Revision 1.6  2005/09/15 03:44:21  jgs
99     * Merge of development branch dev-02 back to main trunk on 2005-09-15
100     *
101     * Revision 1.5.2.1  2005/09/07 06:26:18  gross
102     * the solver from finley are put into the standalone package paso now
103     *
104   * Revision 1.5  2005/07/08 04:07:48  jgs   * Revision 1.5  2005/07/08 04:07:48  jgs
105   * Merge of development branch back to main trunk on 2005-07-08   * Merge of development branch back to main trunk on 2005-07-08
106   *   *

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

  ViewVC Help
Powered by ViewVC 1.1.26