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

trunk/esys2/finley/src/finleyC/Assemble_CopyElementData.c revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC trunk/finley/src/Assemble_CopyElementData.c revision 616 by elspeth, Wed Mar 22 02:46:56 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
2     ************************************************************
3     *          Copyright 2006 by ACcESS MNRF                   *
4     *                                                          *
5     *              http://www.access.edu.au                    *
6     *       Primary Business: Queensland, Australia            *
7     *  Licensed under the Open Software License version 3.0    *
8     *     http://www.opensource.org/licenses/osl-3.0.php       *
9     *                                                          *
10     ************************************************************
11    */
12  /**************************************************************/  /**************************************************************/
13    
14  /*    assemblage routines: copies data between elements       */  /*    assemblage routines: copies data between elements       */
15    
16  /**************************************************************/  /**************************************************************/
17    
 /*   Copyrights by ACcESS Australia, 2003,2004 */  
18  /*   author: gross@access.edu.au */  /*   author: gross@access.edu.au */
19  /*   Version: $Id$ */  /*   Version: $Id$ */
20    
21  /**************************************************************/  /**************************************************************/
22    
 #include "escript/Data/DataC.h"  
 #include "Util.h"  
 #include "Finley.h"  
23  #include "Assemble.h"  #include "Assemble.h"
24  #include "ElementFile.h"  #include "Util.h"
25  #ifdef _OPENMP  #ifdef _OPENMP
26  #include <omp.h>  #include <omp.h>
27  #endif  #endif
# Line 30  void Finley_Assemble_CopyElementData(Fin Line 35  void Finley_Assemble_CopyElementData(Fin
35      dim_t numQuad=elements->ReferenceElement->numQuadNodes;      dim_t numQuad=elements->ReferenceElement->numQuadNodes;
36      dim_t numComps=getDataPointSize(out);      dim_t numComps=getDataPointSize(out);
37      double *in_array,*out_array;      double *in_array,*out_array;
38        Finley_resetError();
39    
40      /* check out and in */      /* check out and in */
41      if (numComps!=getDataPointSize(in)) {      if (numComps!=getDataPointSize(in)) {
42         Finley_ErrorCode=TYPE_ERROR;         Finley_setError(TYPE_ERROR,"__FILE__: number of components of input and output Data do not match.");
43         sprintf(Finley_ErrorMsg,"number of components of input and output Data do not match.");      } else if (!numSamplesEqual(in,numQuad,numElements)) {
44      } else if (numSamplesEqual(out,numQuad,numElements)) {         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of input Data object");
45         Finley_ErrorCode=TYPE_ERROR;      } else if (!numSamplesEqual(out,numQuad,numElements)) {
46         sprintf(Finley_ErrorMsg,"illegal number of samples of output Data object");         Finley_setError(TYPE_ERROR,"__FILE__: illegal number of samples of output Data object");
     } else if (numSamplesEqual(in,numQuad,numElements)) {  
        Finley_ErrorCode=TYPE_ERROR;  
        sprintf(Finley_ErrorMsg,"illegal number of samples of input Data object");  
47      } else if (!isExpanded(out)) {      } else if (!isExpanded(out)) {
48         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.");  
49      }      }
50    
51      /* now we can start */      /* now we can start */
52    
53      if (Finley_ErrorCode==NO_ERROR) {      if (Finley_noError()) {
54           if (isExpanded(in)) {           if (isExpanded(in)) {
55               # pragma omp parallel for private(n) schedule(static)               # pragma omp parallel for private(n) schedule(static)
56               for (n=0;n<numElements;n++)               for (n=0;n<numElements;n++)
# Line 66  void Finley_Assemble_CopyElementData(Fin Line 68  void Finley_Assemble_CopyElementData(Fin
68  }  }
69  /*  /*
70   * $Log$   * $Log$
71     * Revision 1.4  2005/09/15 03:44:21  jgs
72     * Merge of development branch dev-02 back to main trunk on 2005-09-15
73     *
74     * Revision 1.3  2005/08/12 01:45:42  jgs
75     * erge of development branch dev-02 back to main trunk on 2005-08-12
76     *
77     * Revision 1.2.2.2  2005/09/07 06:26:17  gross
78     * the solver from finley are put into the standalone package paso now
79     *
80     * Revision 1.2.2.1  2005/08/02 05:29:11  gross
81     * bug in finley/src/Assemble_CopyElementData fixed
82     *
83   * Revision 1.2  2005/07/08 04:07:45  jgs   * Revision 1.2  2005/07/08 04:07:45  jgs
84   * Merge of development branch back to main trunk on 2005-07-08   * Merge of development branch back to main trunk on 2005-07-08
85   *   *

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

  ViewVC Help
Powered by ViewVC 1.1.26