/[escript]/trunk/finley/src/ElementFile.h
ViewVC logotype

Diff of /trunk/finley/src/ElementFile.h

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

revision 2747 by jfenwick, Mon Jul 20 06:20:06 2009 UTC revision 2748 by gross, Tue Nov 17 07:32:59 2009 UTC
# Line 17  Line 17 
17    
18  #include "Finley.h"  #include "Finley.h"
19  #include "NodeFile.h"  #include "NodeFile.h"
20  #include "ReferenceElements.h"  #include "ReferenceElementSets.h"
21  #include "escript/DataC.h"  #include "escript/DataC.h"
22    
23  #ifdef PASO_MPI  #ifdef PASO_MPI
24  #include "paso/Paso_MPI.h"  #include "paso/Paso_MPI.h"
25  #endif  #endif
26    
27    
28  struct Finley_ElementFile_Jacobeans {  struct Finley_ElementFile_Jacobeans {
29    Finley_Status_t status;               /* status of mesh when jacobeans where updated last time */    Finley_Status_t status;               /* status of mesh when jacobeans where updated last time */
30    dim_t numDim;                         /* spatial dimension */    dim_t numDim;                         /* spatial dimension */
31    Finley_RefElement* ReferenceElement;  /* reference elemnt used to calculate jacobeans (this is a borrowd reference) */    Finley_ShapeFunction* BasisFunctions; /* basis function used */
32      dim_t numQuadTotal;           /* total number of quadrature nodes used to calculate jacobeans = numSub * BasisFunctions->numQuadNodes*/
33      dim_t numSides;                   /* number of sides (=1 normal, =2 contact) */
34      index_t* offsets;         /* offset to sides (borrowed reference) */
35      dim_t numSub;         /* number of subelements        */
36      dim_t numShapesTotal;         /* total number of shape functions =  BasisFunctions->numShapes * numSides */
37      index_t* node_selection;      /* local node selection list of length numSub * numShapesTotal  (borrowed reference)  */
38      dim_t numElements;            /* number of elements */
39    double* volume;                       /* local volume */    double* volume;                       /* local volume */
40    double* DSDX;                         /* derivatives of shape functions in global coordinates at quadrature points*/    double* DSDX;                         /* derivatives of shape functions in global coordinates at quadrature points*/
41  };  };
# Line 38  struct Finley_ElementFile { Line 46  struct Finley_ElementFile {
46    Paso_MPIInfo *MPIInfo;    Paso_MPIInfo *MPIInfo;
47    Paso_MPI_rank *Owner;    Paso_MPI_rank *Owner;
48    
49    Finley_RefElement* ReferenceElement;           /* the reference element, see Reference element.c */    Finley_ReferenceElementSet *referenceElementSet; /* the reference element to be used */
   Finley_RefElement* ReferenceElementReducedOrder;    /* the reference element with reduced integration order, see Reference element.c */  
   Finley_RefElement* LinearReferenceElement;     /* the reference element for the linear mesh. it is vital that it is using the same quadrature scheme like ReferenceElement*/  
   Finley_RefElement* LinearReferenceElementReducedOrder;  /* the reference element for the linear mesh. it is vital that it is using the same quadrature  
 \                                                                scheme like LinearReferenceElementReducedIntegration*/  
50    
51    dim_t numElements;                             /* number of elements. */    dim_t numElements;                             /* number of elements. */
52        
53    index_t *Id;                                 /* Id[i] is the id nmber of    index_t *Id;                                 /* Id[i] is the id nmber of
54                              node i. this number is not                                                  node i. this number is not
55                              used but useful when                                                  used but useful when
56                              elements are resorted. in                                                  elements are resorted. in
57                              the entire code the term                                                  the entire code the term
58                              'element id' refers to i                                                  'element id' refers to i
59                              but nor to Id[i] if not                                                  but nor to Id[i] if not
60                              explicitly stated                                                  explicitly stated
61                              otherwise. */                                                  otherwise. */
62    
63    index_t *Tag;                                /* Tag[i] is the tag of    index_t *Tag;                                /* Tag[i] is the tag of element i. */
                             element i. */  
64    
65    index_t *tagsInUse;                  /* array of tags which are actually used */    index_t *tagsInUse;                  /* array of tags which are actually used */
66    dim_t     numTagsInUse;               /* number of tags used */    dim_t     numTagsInUse;               /* number of tags used */
67    
68    
69    dim_t numNodes;                              /* number of nodes per element = ReferenceElement.Type.numNodes */    dim_t numNodes;                              /* number of nodes per element */
70    index_t *Nodes;                              /* Nodes[INDEX(k, i, numNodes)]    index_t *Nodes;                              /* Nodes[INDEX(k, i, numNodes)]
71                              is the k-the node in the                                                  is the k-the node in the
72                              i-the element. note that                                                  i-the element. note that
73                              in the way the nodes are                                                  in the way the nodes are
74                              ordered Nodes[INDEX(k, i,                                                  ordered Nodes[INDEX(k, i, numNodes)
75                              LinearReferenceElement.Type.numNodes)                                                  is k-the node of element i
76                              is k-the node of element i                                                  when refering to the
77                              when refering to the                                                  linear version of the
78                              linear version of the                                                  mesh. */
                             mesh. */  
79    index_t minColor;                           /* minimum color */    index_t minColor;                           /* minimum color */
80    index_t maxColor;                           /* maximum color */    index_t maxColor;                           /* maximum color */
81    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    
82                                /* are don't share a node so they can be processed simultaneously */                                                   are don't share a node so they can be processed simultaneously
83                                                /* 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  
84                                                /* Color[e]=e  for all e */                                                   Color[e]=e  for all e */
85    index_t order;                   /* order of the element integration scheme*/    index_t order;                                /* order of the element integration scheme*/
86    index_t reduced_order;                   /* order of the reduced element integration scheme*/    index_t reduced_order;                        /* order of the reduced element integration scheme*/
87    
88    Finley_ElementFile_Jacobeans* jacobeans;           /* element jacobeans */    Finley_ElementFile_Jacobeans* jacobeans;           /* jacobeans of the shape function used for solution approximation */
89    Finley_ElementFile_Jacobeans* jacobeans_reducedS;  /* element jacobeans for reduced order of shape function*/    Finley_ElementFile_Jacobeans* jacobeans_reducedS;  /* jacobeans of the shape function used for solution approximation for reduced order of shape function*/
90    Finley_ElementFile_Jacobeans* jacobeans_reducedQ;  /* element jacobeans for reduced integration order*/    Finley_ElementFile_Jacobeans* jacobeans_reducedQ;  /* jacobeans of the shape function used for solution approximation for reduced integration order*/
91    Finley_ElementFile_Jacobeans* jacobeans_reducedS_reducedQ;  /* element jacobeans for reduced integration order and  reduced order of shape function*/    Finley_ElementFile_Jacobeans* jacobeans_reducedS_reducedQ;  /* jacobeans of the shape function used for solution approximation for reduced integration order and  reduced order of shape function*/
92    
93  };  };
94    
95  typedef struct Finley_ElementFile Finley_ElementFile;  typedef struct Finley_ElementFile Finley_ElementFile;
96  Finley_ElementFile* Finley_ElementFile_alloc( ElementTypeId, index_t, index_t, Paso_MPIInfo* );  Finley_ElementFile* Finley_ElementFile_alloc(Finley_ReferenceElementSet* referenceElementSet, Paso_MPIInfo *MPIInfo);
97  void Finley_ElementFile_free(Finley_ElementFile*);  void Finley_ElementFile_free(Finley_ElementFile*);
98  void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t);  void Finley_ElementFile_allocTable(Finley_ElementFile*,dim_t);
99  void Finley_ElementFile_freeTable(Finley_ElementFile*);  void Finley_ElementFile_freeTable(Finley_ElementFile*);
# Line 111  void Finley_ElementFile_gather(dim_t*,Fi Line 113  void Finley_ElementFile_gather(dim_t*,Fi
113  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*);
114  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);  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);
115    
116  void Finley_ElementFile_setTags(Finley_ElementFile*,const int,escriptDataC*);  void Finley_ElementFile_setTags(Finley_ElementFile* ,const int, escriptDataC*);
117  Finley_ElementFile_Jacobeans* Finley_ElementFile_Jacobeans_alloc(Finley_RefElement*);  Finley_ElementFile_Jacobeans* Finley_ElementFile_Jacobeans_alloc(Finley_ShapeFunction* );
118  void Finley_ElementFile_Jacobeans_dealloc(Finley_ElementFile_Jacobeans*);  void Finley_ElementFile_Jacobeans_dealloc(Finley_ElementFile_Jacobeans*);
119  Finley_ElementFile_Jacobeans* Finley_ElementFile_borrowJacobeans(Finley_ElementFile*, Finley_NodeFile*, bool_t, bool_t);  Finley_ElementFile_Jacobeans* Finley_ElementFile_borrowJacobeans(Finley_ElementFile*, Finley_NodeFile*, bool_t, bool_t);
120  void Finley_ElementFile_setTagsInUse(Finley_ElementFile* in);  void Finley_ElementFile_setTagsInUse(Finley_ElementFile* in);

Legend:
Removed from v.2747  
changed lines
  Added in v.2748

  ViewVC Help
Powered by ViewVC 1.1.26