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

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

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

trunk/esys2/finley/src/finleyC/Mesh.h revision 100 by jgs, Wed Dec 15 03:48:48 2004 UTC trunk/finley/src/Mesh.h revision 1044 by gross, Mon Mar 19 07:29:31 2007 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    /* Version: $Id$ */
13    
14    
15  #ifndef INC_FINLEY_MESH  #ifndef INC_FINLEY_MESH
16  #define INC_FINLEY_MESH  #define INC_FINLEY_MESH
# Line 44  Line 56 
56    
57  /**************************************************************/  /**************************************************************/
58    
59    #include "Finley.h"
60  #include "NodeFile.h"  #include "NodeFile.h"
61  #include "ElementFile.h"  #include "ElementFile.h"
62  #include "escript/Data/DataC.h"  #include "TagMap.h"
63    #include "paso/SystemMatrixPattern.h"
64    #include "escript/DataC.h"
65    
66    #ifdef PASO_MPI
67    #include "paso/Paso_MPI.h"
68    #endif
69    
70  /**************************************************************/  /**************************************************************/
71    
# Line 54  Line 73 
73    
74  struct Finley_Mesh {  struct Finley_Mesh {
75    char* Name;                           /* the name of the mesh */    char* Name;                           /* the name of the mesh */
76    int order;                            /* integration order */    index_t order;                        /* integration order */
77    int reference_counter;                /* counts the number of references to the mesh; */    dim_t reference_counter;              /* counts the number of references to the mesh; */
78    Finley_NodeFile* Nodes;               /* the table of the nodes */    Finley_NodeFile* Nodes;               /* the table of the nodes */
79    Finley_ElementFile* Elements;         /* the table of the elements */    Finley_ElementFile* Elements;         /* the table of the elements */
80    Finley_ElementFile* FaceElements;     /* the table of the face elements */    Finley_ElementFile* FaceElements;     /* the table of the face elements */
81    Finley_ElementFile* ContactElements;  /* the table of the contact elements */    Finley_ElementFile* ContactElements;  /* the table of the contact elements */
82    Finley_ElementFile* Points;           /* the table of points (treated as elements of dimension 0) */    Finley_ElementFile* Points;           /* the table of points (treated as elements of dimension 0) */
83      Finley_TagMap* TagMap;                /* the tag map mapping names to tag keys */
84    
85      /* pointer to the sparse matrix pattern */
86    
87      Paso_SystemMatrixPattern *FullFullPattern;
88      Paso_SystemMatrixPattern *FullReducedPattern;
89      Paso_SystemMatrixPattern *ReducedFullPattern;
90      Paso_SystemMatrixPattern *ReducedReducedPattern;
91    #ifdef PASO_MPI
92      Paso_MPIInfo *MPIInfo;
93    #endif
94  };  };
95    
96  typedef struct Finley_Mesh Finley_Mesh;  typedef struct Finley_Mesh Finley_Mesh;
# Line 68  typedef struct Finley_Mesh Finley_Mesh; Line 98  typedef struct Finley_Mesh Finley_Mesh;
98  /* these structures are used for matching surfaces elements: */  /* these structures are used for matching surfaces elements: */
99    
100  struct Finley_Mesh_findMatchingFaces_center{  struct Finley_Mesh_findMatchingFaces_center{
101     int refId;     index_t refId;
102     double x[MAX_numDim];     double x[MAX_numDim];
103  };  };
104  typedef struct Finley_Mesh_findMatchingFaces_center Finley_Mesh_findMatchingFaces_center;  typedef struct Finley_Mesh_findMatchingFaces_center Finley_Mesh_findMatchingFaces_center;
# Line 76  typedef struct Finley_Mesh_findMatchingF Line 106  typedef struct Finley_Mesh_findMatchingF
106  /**************************************************************/  /**************************************************************/
107    
108  /*  interfaces: */  /*  interfaces: */
109    #ifndef PASO_MPI
110  Finley_Mesh* Finley_Mesh_alloc(char*,int,int);  Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order);
111    #else
112    Finley_Mesh* Finley_Mesh_alloc(char* name,dim_t numDim, index_t order, Paso_MPIInfo *mpi_info);
113    void Finley_Mesh_resolveDegreeOfFreedomOrder( Finley_Mesh *in, bool_t doReduced );
114    void print_mesh_statistics( Finley_Mesh *out, bool_t reduced  );
115    #endif
116    void Finley_Mesh_prepareElementDistribution( Finley_Mesh *in );
117    /*Finley_Mesh* Finley_Mesh_alloc(char*,int,int);*/
118    Finley_Mesh* Finley_Mesh_reference(Finley_Mesh*);
119  void Finley_Mesh_dealloc(Finley_Mesh*);  void Finley_Mesh_dealloc(Finley_Mesh*);
120  int Finley_Mesh_getDim(Finley_Mesh*);  dim_t Finley_Mesh_getDim(Finley_Mesh*);
121  int Finley_Mesh_getNumNodes(Finley_Mesh*);  dim_t Finley_Mesh_getNumNodes(Finley_Mesh*);
122  int Finley_Mesh_getNumDegreesOfFreedom(Finley_Mesh*);  dim_t Finley_Mesh_getNumDegreesOfFreedom(Finley_Mesh*);
123  int Finley_Mesh_getReducedNumDegreesOfFreedom(Finley_Mesh*);  dim_t Finley_Mesh_getReducedNumDegreesOfFreedom(Finley_Mesh*);
124    Paso_SystemMatrixPattern* Finley_getPattern(Finley_Mesh *mesh,bool_t reduce_row_order, bool_t reduce_col_order);
125    Paso_SystemMatrixPattern* Finley_makePattern(Finley_Mesh *mesh,bool_t reduce_row_order, bool_t reduce_col_order);
126  void Finley_Mesh_write(Finley_Mesh*,char*);  void Finley_Mesh_write(Finley_Mesh*,char*);
127  Finley_Mesh* Finley_Mesh_read(char*,int);  Finley_Mesh* Finley_Mesh_read(char*,index_t);
128    Finley_Mesh* Finley_Mesh_readGmsh(char*,index_t, index_t, index_t, bool_t);
129    void Finley_Mesh_setCoordinates(Finley_Mesh*,escriptDataC*);
130    
131  void Finley_Mesh_prepare(Finley_Mesh* in);  void Finley_Mesh_prepare(Finley_Mesh* in);
132    bool_t Finley_Mesh_isPrepared(Finley_Mesh*);
133  void Finley_Mesh_prepareNodes(Finley_Mesh* in);  void Finley_Mesh_prepareNodes(Finley_Mesh* in);
134  void Finley_Mesh_improveColoring(Finley_Mesh* in);  void Finley_Mesh_improveColoring(Finley_Mesh* in);
135  void Finley_Mesh_optimizeElementDistribution(Finley_Mesh* in);  void Finley_Mesh_optimizeElementDistribution(Finley_Mesh* in);
136  void  Finley_Mesh_resolveNodeIds(Finley_Mesh*);  void  Finley_Mesh_resolveNodeIds(Finley_Mesh*);
137  Finley_Mesh* Finley_Mesh_merge(int, Finley_Mesh**);  Finley_Mesh* Finley_Mesh_merge(dim_t, Finley_Mesh**);
138    
139  void Finley_Mesh_relableElementNodes(int*,int,Finley_Mesh*);  void Finley_Mesh_relableElementNodes(int*,int,Finley_Mesh*);
140  void Finley_Mesh_markNodes(int*,int,Finley_Mesh*,int);  void Finley_Mesh_markNodes(int*,int,Finley_Mesh*,int);
# Line 102  void Finley_Mesh_joinFaces(Finley_Mesh* Line 145  void Finley_Mesh_joinFaces(Finley_Mesh*
145  int Finley_Mesh_findMatchingFaces_compar(const void*,const void*);  int Finley_Mesh_findMatchingFaces_compar(const void*,const void*);
146  void Finley_Mesh_findMatchingFaces(Finley_NodeFile*,Finley_ElementFile *,double,double, int*, int*,int*,int*);  void Finley_Mesh_findMatchingFaces(Finley_NodeFile*,Finley_ElementFile *,double,double, int*, int*,int*,int*);
147  void Finley_Mesh_print(Finley_Mesh *in);  void Finley_Mesh_print(Finley_Mesh *in);
148  void Finley_Mesh_saveDX(const char *, Finley_Mesh *, escriptDataC*);  void Finley_Mesh_saveDX(const char * filename_p, Finley_Mesh *mesh_p, const dim_t num_data,char* *names_p,escriptDataC* *data_pp);
149    #ifndef PASO_MPI
150    void Finley_Mesh_saveVTK(const char * filename_p, Finley_Mesh *mesh_p, const dim_t num_data,char* *names_p,escriptDataC* *data_pp);
151    #else
152    void Finley_Mesh_saveVTK_MPIO(const char * filename_p, Finley_Mesh *mesh_p, const dim_t num_data,char*
153    *names_p,escriptDataC* *data_pp);
154    #endif
155    void Finley_Mesh_addTagMap(Finley_Mesh *mesh_p,const char* name, index_t tag_key);
156    index_t Finley_Mesh_getTag(Finley_Mesh *mesh_p,const char* name);
157    bool_t Finley_Mesh_isValidTagName(Finley_Mesh *mesh_p,const char* name);
158    
159    
160    
161  #endif /* #ifndef INC_FINLEY_MESH */  #endif /* #ifndef INC_FINLEY_MESH */
162    
 /*  
  * $Log$  
  * Revision 1.3  2004/12/15 03:48:45  jgs  
  * *** empty log message ***  
  *  
  * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
  * initial import of project esys2  
  *  
  * Revision 1.5  2004/07/27 08:26:45  gross  
  * Finley: saveDX added: now it is possible to write data on boundary and contact elements  
  *  
  * Revision 1.4  2004/07/26 04:27:15  gross  
  * it allmost compiles now  
  *  
  * Revision 1.3  2004/07/02 04:21:13  gross  
  * Finley C code has been included  
  *  
  * Revision 1.2  2004/07/02 00:03:29  gross  
  * interface for saveDX added  
  *  
  * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
  * Initial version of eys using boost-python.  
  *  
  *  
  */  

Legend:
Removed from v.100  
changed lines
  Added in v.1044

  ViewVC Help
Powered by ViewVC 1.1.26