/[escript]/branches/arrayview_from_1695_trunk/finley/src/Assemble_AverageElementData.c
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/finley/src/Assemble_AverageElementData.c

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

revision 147 by jgs, Fri Aug 12 01:45:47 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  /*    assemblage routines: copies data between elements       */  /*    assemblage routines: copies data between elements       */
17    
18  /**************************************************************/  /**************************************************************/
19    
 /*   Copyrights by ACcESS Australia, 2003,2004 */  
20  /*   author: gross@access.edu.au */  /*   author: gross@access.edu.au */
21  /*   Version: $Id$ */  /*   Version: $Id$ */
22    
23  /**************************************************************/  /**************************************************************/
24    
 #include "escript/Data/DataC.h"  
 #include "Util.h"  
 #include "Finley.h"  
25  #include "Assemble.h"  #include "Assemble.h"
26  #include "ElementFile.h"  #include "Util.h"
27  #ifdef _OPENMP  #ifdef _OPENMP
28  #include <omp.h>  #include <omp.h>
29  #endif  #endif
# Line 30  void Finley_Assemble_CopyElementData(Fin Line 37  void Finley_Assemble_CopyElementData(Fin
37      dim_t numQuad=elements->ReferenceElement->numQuadNodes;      dim_t numQuad=elements->ReferenceElement->numQuadNodes;
38      dim_t numComps=getDataPointSize(out);      dim_t numComps=getDataPointSize(out);
39      double *in_array,*out_array;      double *in_array,*out_array;
40        Finley_resetError();
41    
42      /* check out and in */      /* check out and in */
43      if (numComps!=getDataPointSize(in)) {      if (numComps!=getDataPointSize(in)) {
44         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: number of components of input and output Data do not match.");
        sprintf(Finley_ErrorMsg,"number of components of input and output Data do not match.");  
45      } else if (!numSamplesEqual(in,numQuad,numElements)) {      } else if (!numSamplesEqual(in,numQuad,numElements)) {
46         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of input Data object");
        sprintf(Finley_ErrorMsg,"illegal number of samples of input Data object");  
47      } else if (!numSamplesEqual(out,numQuad,numElements)) {      } else if (!numSamplesEqual(out,numQuad,numElements)) {
48         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of output Data object");
        sprintf(Finley_ErrorMsg,"illegal number of samples of output Data object");  
49      } else if (!isExpanded(out)) {      } else if (!isExpanded(out)) {
50         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: expanded Data object is expected for output data.");
        sprintf(Finley_ErrorMsg,"expanded Data object is expected for output data.");  
51      }      }
52    
53      /* now we can start */      /* now we can start */
54    
55      if (Finley_ErrorCode==NO_ERROR) {      if (Finley_noError()) {
56           if (isExpanded(in)) {           if (isExpanded(in)) {
57               # pragma omp parallel for private(n) schedule(static)               # pragma omp parallel for private(n) schedule(static)
58               for (n=0;n<numElements;n++)               for (n=0;n<numElements;n++)
# Line 66  void Finley_Assemble_CopyElementData(Fin Line 70  void Finley_Assemble_CopyElementData(Fin
70  }  }
71  /*  /*
72   * $Log$   * $Log$
73     * Revision 1.4  2005/09/15 03:44:21  jgs
74     * Merge of development branch dev-02 back to main trunk on 2005-09-15
75     *
76   * Revision 1.3  2005/08/12 01:45:42  jgs   * Revision 1.3  2005/08/12 01:45:42  jgs
77   * erge of development branch dev-02 back to main trunk on 2005-08-12   * erge of development branch dev-02 back to main trunk on 2005-08-12
78   *   *
79     * Revision 1.2.2.2  2005/09/07 06:26:17  gross
80     * the solver from finley are put into the standalone package paso now
81     *
82   * Revision 1.2.2.1  2005/08/02 05:29:11  gross   * Revision 1.2.2.1  2005/08/02 05:29:11  gross
83   * bug in finley/src/Assemble_CopyElementData fixed   * bug in finley/src/Assemble_CopyElementData fixed
84   *   *

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

  ViewVC Help
Powered by ViewVC 1.1.26