ESScript  Revision_
finley/src/ElementFile.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 #ifndef __FINLEY_ELEMENTFILE_H__
17 #define __FINLEY_ELEMENTFILE_H__
18 
19 #include "Finley.h"
20 #include "NodeFile.h"
21 #include "ReferenceElementSets.h"
22 #include "Util.h"
23 
24 namespace finley {
25 
29 
31  int status;
33  int numDim;
40  int numSides;
42  const int* offsets;
44  int numSub;
49  const int* node_selection;
53  double* volume;
56  double* DSDX;
57 };
58 
60 {
61 public:
63  Esys_MPIInfo *mpiInfo);
64  ~ElementFile();
65 
66  void allocTable(int numElements);
67  void freeTable();
68 
69  void distributeByRankOfDOF(const std::vector<int>& mpiRankOfDOF, int *Id);
70  void createColoring(const std::vector<int>& dofMap);
72  void optimizeOrdering();
74  void relabelNodes(const std::vector<int>& newNode, int offset);
75  void markNodes(std::vector<short>& mask, int offset, bool useLinear);
76  void scatter(int* index, const ElementFile* in);
77  void gather(int* index, const ElementFile* in);
78  void copyTable(int offset, int nodeOffset, int idOffset,
79  const ElementFile* in);
80 
81  void markDOFsConnectedToRange(int* mask, int offset, int marker,
82  int firstDOF, int lastDOF,
83  const int *dofIndex, bool useLinear);
84 
85  void setTags(const int newTag, const escript::Data& mask);
86  ElementFile_Jacobians* borrowJacobians(const NodeFile*, bool, bool) const;
89  inline std::pair<int,int> getNodeRange() const;
90 
93  inline void updateTagList();
94 
95 private:
96  void swapTable(ElementFile* other);
97 
98 public:
100 
108  int *Id;
110  int *Tag;
112  int *Owner;
114  std::vector<int> tagsInUse;
116  int numNodes;
121  int *Nodes;
126  int *Color;
128  int minColor;
130  int maxColor;
142 };
143 
144 inline std::pair<int,int> ElementFile::getNodeRange() const
145 {
147 }
148 
149 
151 {
153 }
154 
155 } // namespace finley
156 
157 #endif // __FINLEY_ELEMENTFILE_H__
158