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

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

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

revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC
# Line 9  Line 9 
9  #include "escript/Data/DataC.h"  #include "escript/Data/DataC.h"
10    
11  struct Finley_NodeFile {  struct Finley_NodeFile {
12    maybelong numNodes;                      /* number of nodes */    dim_t numNodes;                      /* number of nodes */
13    maybelong numDim;                        /* spatial dimension */    dim_t numDim;                        /* spatial dimension */
14    maybelong *Id;                           /* Id[i] is the id number of node i. this number is not really    index_t *Id;                         /* Id[i] is the id number of node i. this number is not really
15                            used but useful when the nodes are                            used but useful when the nodes are
16                            relabled. see also Finley_resolveNodeIds. */                            relabled. see also Finley_resolveNodeIds. */
17                                             /* in the entire code the term 'node id' refers to i but nor to Id[i] */                                         /* in the entire code the term 'node id' refers to i but nor to Id[i] */
18                                             /* if not explicitly stated otherwise. */                                         /* if not explicitly stated otherwise. */
19    maybelong *Tag;                          /* Tag[i] is the tag of node i. */    index_t *Tag;                        /* Tag[i] is the tag of node i. */
20    double *Coordinates;                     /* Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of the */    double *Coordinates;                 /* Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of the */
21                                             /* node i. */                                         /* node i. */
22    maybelong* degreeOfFreedom;              /* degreeOfFreedom[i] is the degree of freedom assigned to node i */    index_t* degreeOfFreedom;            /* degreeOfFreedom[i] is the degree of freedom assigned to node i */
23                                             /* this index is used to consider periodic boundary conditions by assigning */                                         /* this index is used to consider periodic boundary conditions by assigning */
24                                             /* the same degreeOfFreedom to the same node */                                         /* the same degreeOfFreedom to the same node */
25    /* the following data are set by Finley_NodeFile_? */    /* the following data are set by Finley_NodeFile_? */
26    maybelong numDegreesOfFreedom;           /* number of degrees of freedom in the mesh (<=numNodes)*/    dim_t numDegreesOfFreedom;           /* number of degrees of freedom in the mesh (<=numNodes)*/
27                                             /* notice that numDegreesOfFreedom=max(degreeOfFreedom[:]) */                                         /* notice that numDegreesOfFreedom=max(degreeOfFreedom[:]) */
28    maybelong* reducedDegreeOfFreedom;       /* reducedDegreeOfFreedom[i] is the degree of freedom in the reduced version of the mesh */    index_t* reducedDegreeOfFreedom;     /* reducedDegreeOfFreedom[i] is the degree of freedom in the reduced version of the mesh */
29                                             /* assigned to node i. reducedDegreeOfFreedom[i]<0 indicates that the node is not appearing */                                         /* assigned to node i. reducedDegreeOfFreedom[i]<0 indicates that the node is not appearing */
30                                             /* as a degree of freedom in the reduced version of the mesh. */                                         /* as a degree of freedom in the reduced version of the mesh. */
31    maybelong reducedNumDegreesOfFreedom;    /* number of degrees of freedom in the reduced version of the mesh */    dim_t reducedNumDegreesOfFreedom;    /* number of degrees of freedom in the reduced version of the mesh */
32                                             /* notice that reducedNumDegreesOfFreedom=max(reducedDegreeOfFreedom[:]) */                                         /* notice that reducedNumDegreesOfFreedom=max(reducedDegreeOfFreedom[:]) */
33    /* this information is used by interfaces to postprocessing tools that can deal with linear elements only: */    /* this information is used by interfaces to postprocessing tools that can deal with linear elements only: */
34    maybelong reducedNumNodes;               /* returnes the number of nodes in the mesh when looking at the corners */    dim_t reducedNumNodes;               /* returnes the number of nodes in the mesh when looking at the corners */
35                                             /* of elements only                                                     */                                         /* of elements only                                                     */
36    maybelong *toReduced;                    /* toReduced[i] is the node id in the reduced mesh. if toReduced[i]<0 it means that the node does not appear in the reduced mesh */    index_t *toReduced;                  /* toReduced[i] is the node id in the reduced mesh. if toReduced[i]<0 it means that the node does not appear in the reduced mesh */
37  };  };
38    
39  typedef struct Finley_NodeFile Finley_NodeFile;  typedef struct Finley_NodeFile Finley_NodeFile;
40    
41  Finley_NodeFile * Finley_NodeFile_alloc(int);  Finley_NodeFile * Finley_NodeFile_alloc(dim_t);
42  void Finley_NodeFile_dealloc(Finley_NodeFile*);  void Finley_NodeFile_dealloc(Finley_NodeFile*);
43  void Finley_NodeFile_setIdRange(int*,int*,Finley_NodeFile*);  void Finley_NodeFile_setIdRange(index_t*,index_t*,Finley_NodeFile*);
44  void Finley_NodeFile_scatter(int*,Finley_NodeFile*,Finley_NodeFile*);  void Finley_NodeFile_scatter(index_t*,Finley_NodeFile*,Finley_NodeFile*);
45  void Finley_NodeFile_gather(int*,Finley_NodeFile*,Finley_NodeFile*);  void Finley_NodeFile_gather(index_t*,Finley_NodeFile*,Finley_NodeFile*);
46  void Finley_NodeFile_setCoordinates(Finley_NodeFile*,escriptDataC*);  void Finley_NodeFile_setCoordinates(Finley_NodeFile*,escriptDataC*);
47  void Finley_NodeFile_copyTable(int,Finley_NodeFile*,int,int,Finley_NodeFile*);  void Finley_NodeFile_copyTable(dim_t,Finley_NodeFile*,dim_t,dim_t,Finley_NodeFile*);
48  void Finley_NodeFile_allocTable(Finley_NodeFile*,int);  void Finley_NodeFile_allocTable(Finley_NodeFile*,dim_t);
49  void Finley_NodeFile_deallocTable(Finley_NodeFile*);  void Finley_NodeFile_deallocTable(Finley_NodeFile*);
50    
51  #endif  #endif
52    
53  /*  /*
54   * $Log$   * $Log$
55   * Revision 1.1  2004/10/26 06:53:57  jgs   * Revision 1.2  2005/07/08 04:07:55  jgs
56   * Initial revision   * Merge of development branch back to main trunk on 2005-07-08
57     *
58     * Revision 1.1.1.1.2.1  2005/06/29 02:34:54  gross
59     * some changes towards 64 integers in finley
60     *
61     * Revision 1.1.1.1  2004/10/26 06:53:57  jgs
62     * initial import of project esys2
63   *   *
64   * Revision 1.2  2004/07/02 04:21:13  gross   * Revision 1.2  2004/07/02 04:21:13  gross
65   * Finley C code has been included   * Finley C code has been included

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

  ViewVC Help
Powered by ViewVC 1.1.26