/[escript]/branches/arrayview_from_1695_trunk/finley/src/ElementFile.h
ViewVC logotype

Diff of /branches/arrayview_from_1695_trunk/finley/src/ElementFile.h

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

trunk/esys2/finley/src/finleyC/ElementFile.h revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC temp_trunk_copy/finley/src/ElementFile.h revision 1384 by phornby, Fri Jan 11 02:29:38 2008 UTC
# Line 1  Line 1 
1    
2  /* $Id$ */  /* $Id$ */
3    
4    /*******************************************************
5     *
6     *           Copyright 2003-2007 by ACceSS MNRF
7     *       Copyright 2007 by University of Queensland
8     *
9     *                http://esscc.uq.edu.au
10     *        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  #ifndef INC_FINLEY_ELEMENTFILE  #ifndef INC_FINLEY_ELEMENTFILE
17  #define INC_FINLEY_ELEMENTFILE  #define INC_FINLEY_ELEMENTFILE
18    
19  #include "Common.h"  #include "Finley.h"
20    #include "NodeFile.h"
21  #include "ReferenceElements.h"  #include "ReferenceElements.h"
22    #include "escript/DataC.h"
23    
24  struct Finley_ElementFile {  #ifdef PASO_MPI
25    #include "paso/Paso_MPI.h"
26    #endif
27    
28    struct Finley_ElementFile_Jacobeans {
29      Finley_Status_t status;               /* status of mesh when jacobeans where updated last time */
30      dim_t numDim;                         /* spatial dimension */
31      Finley_RefElement* ReferenceElement;  /* reference elemnt used to calculate jacobeans (this is a borrowd reference) */
32      double* volume;                       /* local volume */
33      double* DSDX;                         /* derivatives of shape functions in global coordinates at quadrature points*/
34    };
35    
36    Finley_RefElement* ReferenceElement;           /* the reference element, see  typedef struct Finley_ElementFile_Jacobeans Finley_ElementFile_Jacobeans;
                             Reference element.c */  
37    
38    Finley_RefElement* LinearReferenceElement;     /* the reference element for  struct Finley_ElementFile {
39                              the linear mesh. it is    Paso_MPIInfo *MPIInfo;
40                              vital that both are using    Paso_MPI_rank *Owner;
41                              the same quadrature  
42                              scheme */    Finley_RefElement* ReferenceElement;           /* the reference element, see Reference element.c */
43      Finley_RefElement* ReferenceElementReducedOrder;    /* the reference element with reduced integration order, see Reference element.c */
44      Finley_RefElement* LinearReferenceElement;     /* the reference element for the linear mesh. it is vital that it is using the same quadrature scheme like ReferenceElement*/
45      Finley_RefElement* LinearReferenceElementReducedOrder;  /* the reference element for the linear mesh. it is vital that it is using the same quadrature
46    \                                                                scheme like LinearReferenceElementReducedIntegration*/
47    
48    dim_t numElements;                             /* number of elements. */    dim_t numElements;                             /* number of elements. */
49        
# Line 32  struct Finley_ElementFile { Line 60  struct Finley_ElementFile {
60    index_t *Tag;                                /* Tag[i] is the tag of    index_t *Tag;                                /* Tag[i] is the tag of
61                              element i. */                              element i. */
62    
63    index_t *Nodes;                              /* Nodes[INDEX(k, i,    dim_t numNodes;                              /* number of nodes per element = ReferenceElement.Type.numNodes */
64                              ReferenceElement.Type.numNodes)    index_t *Nodes;                              /* Nodes[INDEX(k, i, numNodes)]
65                              is the k-the node in the                              is the k-the node in the
66                              i-the element. note that                              i-the element. note that
67                              in the way the nodes are                              in the way the nodes are
# Line 45  struct Finley_ElementFile { Line 73  struct Finley_ElementFile {
73                              mesh. */                              mesh. */
74    index_t minColor;                           /* minimum color */    index_t minColor;                           /* minimum color */
75    index_t maxColor;                           /* maximum color */    index_t maxColor;                           /* maximum color */
76    index_t *Color;                              /* assigns each element a color. elements with the same color     */    index_t *Color;                             /* assigns each element a color. elements with the same color     */
77                           /* are don't share a node so they can be processed simultaneously */                                /* are don't share a node so they can be processed simultaneously */
78                                                   /* at anytime Color must provide a valid value. In any case one can set  */                                                /* at anytime Color must provide a valid value. In any case one can set  */
79                                                   /* Color[e]=e  for all e */                                                /* Color[e]=e  for all e */
80    index_t order;                     /* order of the element */    index_t order;                   /* order of the element integration scheme*/
81      index_t reduced_order;                   /* order of the reduced element integration scheme*/
82    
83      Finley_ElementFile_Jacobeans* jacobeans;           /* element jacobeans */
84      Finley_ElementFile_Jacobeans* jacobeans_reducedS;  /* element jacobeans for reduced order of shape function*/
85      Finley_ElementFile_Jacobeans* jacobeans_reducedQ;  /* element jacobeans for reduced integration order*/
86      Finley_ElementFile_Jacobeans* jacobeans_reducedS_reducedQ;  /* element jacobeans for reduced integration order and  reduced order of shape function*/
87    
88  };  };
89    
90  typedef struct Finley_ElementFile Finley_ElementFile;  typedef struct Finley_ElementFile Finley_ElementFile;
91    Finley_ElementFile* Finley_ElementFile_alloc( ElementTypeId, index_t, index_t, Paso_MPIInfo* );
92    void Finley_ElementFile_free(Finley_ElementFile*);
93    void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t);
94    void Finley_ElementFile_freeTable(Finley_ElementFile*);
95    void Finley_ElementFile_setElementDistribution(Finley_ElementFile* in, dim_t* distribution);
96    dim_t Finley_ElementFile_getGlobalNumElements(Finley_ElementFile* in);
97    dim_t Finley_ElementFile_getMyNumElements(Finley_ElementFile* in);
98    index_t Finley_ElementFile_getFirstElement(Finley_ElementFile* in);
99    void Finley_ElementFile_distributeByRankOfDOF(Finley_ElementFile* self, Paso_MPI_rank* mpiRankOfDOF, index_t *Id);
100    
101  Finley_ElementFile* Finley_ElementFile_alloc(ElementTypeId,dim_t);  void Finley_ElementFile_createColoring(Finley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom);
102  void Finley_ElementFile_dealloc(Finley_ElementFile*);  void Finley_ElementFile_optimizeOrdering(Finley_ElementFile** in);
 void Finley_ElementFile_improveColoring(Finley_ElementFile* in,dim_t numNodes,dim_t* degreeOfFreedom);  
 void Finley_ElementFile_optimizeDistribution(Finley_ElementFile** in);  
103  void Finley_ElementFile_setNodeRange(dim_t*,dim_t*,Finley_ElementFile*);  void Finley_ElementFile_setNodeRange(dim_t*,dim_t*,Finley_ElementFile*);
104  void Finley_ElementFile_relableNodes(dim_t*,dim_t,Finley_ElementFile*);  void Finley_ElementFile_relableNodes(dim_t*,dim_t,Finley_ElementFile*);
105  void Finley_ElementFile_markNodes(dim_t*,dim_t,Finley_ElementFile*,dim_t);  void Finley_ElementFile_markNodes(dim_t*,dim_t,Finley_ElementFile*,dim_t);
106  void Finley_ElementFile_scatter(dim_t*,Finley_ElementFile*,Finley_ElementFile*);  void Finley_ElementFile_scatter(dim_t*,Finley_ElementFile*,Finley_ElementFile*);
107  void Finley_ElementFile_gather(dim_t*,Finley_ElementFile*,Finley_ElementFile*);  void Finley_ElementFile_gather(dim_t*,Finley_ElementFile*,Finley_ElementFile*);
108  void Finley_ElementFile_copyTable(dim_t,Finley_ElementFile*,dim_t,dim_t,Finley_ElementFile*);  void Finley_ElementFile_copyTable(dim_t,Finley_ElementFile*,dim_t,dim_t,Finley_ElementFile*);
109  void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t);  void Finley_ElementFile_markDOFsConnectedToRange(index_t* mask,index_t offset,index_t marker,index_t firstDOF,index_t lastDOF,index_t *dofIndex,Finley_ElementFile*in ,bool_t useLinear);
110  void Finley_ElementFile_deallocTable(Finley_ElementFile*);  
111  void Finley_ElementFile_prepare(Finley_ElementFile** in,dim_t numNodes,dim_t* degreeOfFreedom);  void Finley_ElementFile_setTags(Finley_ElementFile*,const int,escriptDataC*);
112    Finley_ElementFile_Jacobeans* Finley_ElementFile_Jacobeans_alloc(Finley_RefElement*);
113    void Finley_ElementFile_Jacobeans_dealloc(Finley_ElementFile_Jacobeans*);
114    Finley_ElementFile_Jacobeans* Finley_ElementFile_borrowJacobeans(Finley_ElementFile*, Finley_NodeFile*, bool_t, bool_t);
115    
116    
117  #endif /* #ifndef INC_FINLEY_ELEMENTFILE */  #endif /* #ifndef INC_FINLEY_ELEMENTFILE */
118    
 /*  
  * $Log$  
  * Revision 1.2  2005/07/08 04:07:49  jgs  
  * Merge of development branch back to main trunk on 2005-07-08  
  *  
  * Revision 1.1.1.1.2.1  2005/06/29 02:34:49  gross  
  * some changes towards 64 integers in finley  
  *  
  * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
  * initial import of project esys2  
  *  
  * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
  * Initial version of eys using boost-python.  
  *  
  *  
 */  

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

  ViewVC Help
Powered by ViewVC 1.1.26