ESScript  Revision_4488
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 #include "esysUtils/Esys_MPI.h"
24 
25 namespace finley {
26 
30 
34  int numDim;
41  int numSides;
43  int* offsets;
45  int numSub;
54  double* volume;
57  double* DSDX;
58 };
59 
61 {
62 public:
64  Esys_MPIInfo *mpiInfo);
65  ~ElementFile();
66 
67  void allocTable(int numElements);
68  void freeTable();
69 
70  void distributeByRankOfDOF(int* mpiRankOfDOF, int *Id);
71  void createColoring(int nodeCount, int* degreeOfFreedom);
73  void optimizeOrdering();
75  void relabelNodes(int* newNode, int offset);
76  void markNodes(int* mask, int offset, bool useLinear);
77  void scatter(int* index, const ElementFile* in);
78  void gather(int* index, const ElementFile* in);
79  void copyTable(int offset, int nodeOffset, int idOffset,
80  const ElementFile* in);
81 
82  void markDOFsConnectedToRange(int* mask, int offset, int marker,
83  int firstDOF, int lastDOF, int *dofIndex,
84  bool useLinear);
85 
86  void setTags(const int newTag, const escript::Data& mask);
87  ElementFile_Jacobians* borrowJacobians(const NodeFile*, bool, bool) const;
90  inline std::pair<int,int> getNodeRange() const;
91  inline void updateTagList();
92 
93 private:
94  void swapTable(ElementFile* other);
95 
96 public:
98 
106  int *Id;
108  int *Tag;
110  int *Owner;
112  std::vector<int> tagsInUse;
114  int numNodes;
119  int *Nodes;
121  int minColor;
123  int maxColor;
128  int *Color;
140 };
141 
142 inline std::pair<int,int> ElementFile::getNodeRange() const
143 {
145 }
146 
147 
149 {
151 }
152 
153 } // namespace finley
154 
155 #endif // __FINLEY_ELEMENTFILE_H__
156