18 #ifndef __WEIPA_FINLEYELEMENTS_H__
19 #define __WEIPA_FINLEYELEMENTS_H__
21 #include <weipa/ElementData.h>
22 #include <weipa/FinleyNodes.h>
25 #include <dudley/Dudley.h>
26 #include <dudley/ElementType.h>
29 #include <finley/ReferenceElements.h>
36 #define NCFTYPE netCDF::NcFile&
39 #define NCFTYPE NcFile*
113 bool writeToSilo(DBfile* dbfile,
const std::string& siloPath,
#define NCFTYPE
Definition: FinleyElements.h:39
Definition: dudley/src/ElementFile.h:53
Definition: finley/src/ElementFile.h:63
Stores and manipulates one type of domain elements.
Definition: ElementData.h:50
Stores and manipulates one type of finley mesh elements (cells, faces or contacts).
Definition: FinleyElements.h:77
bool readFromNc(NcFile *ncfile)
Reads element data from escript/finley NetCDF file.
Definition: FinleyElements.cpp:383
virtual void writeConnectivityVTK(std::ostream &os)
Writes connectivity data to a stream in VTK text format.
Definition: FinleyElements.cpp:734
int nodesPerElement
Definition: FinleyElements.h:186
int elementFactor
Definition: FinleyElements.h:192
bool initFromDudley(const dudley::ElementFile *dudleyFile)
Initialises with data from a Dudley ElementFile instance.
Definition: FinleyElements.cpp:169
virtual int getGhostCount() const
Returns the number of "ghost" elements.
Definition: FinleyElements.h:130
IntVec color
Definition: FinleyElements.h:189
IntVec tag
Definition: FinleyElements.h:189
virtual StringVec getMeshNames() const
Returns the names of the meshes associated with the elements.
Definition: FinleyElements.cpp:487
virtual int getElementFactor() const
If the original element type is not supported they are subdivided into N smaller elements (e....
Definition: FinleyElements.h:163
virtual int getNumElements() const
Returns the number of elements.
Definition: FinleyElements.h:124
virtual NodeData_ptr getNodes() const
Returns the node mesh instance used by the elements.
Definition: FinleyElements.h:152
void reorderGhostZones(int ownIndex)
Moves "ghost" elements (whose owner does not match ownIndex) and the corresponding data to the end of...
Definition: FinleyElements.cpp:670
void reorderArray(IntVec &v, const IntVec &idx, int elementsPerIndex)
Definition: FinleyElements.cpp:549
int numGhostElements
Definition: FinleyElements.h:185
IntVec nodes
Definition: FinleyElements.h:188
void buildMeshes()
Definition: FinleyElements.cpp:711
QuadMaskInfo quadMask
Definition: FinleyElements.h:191
FinleyElements()
Definition: FinleyElements.h:166
FinleyElements_ptr reducedElements
Definition: FinleyElements.h:180
IntVec prepareGhostIndices(int ownIndex)
Definition: FinleyElements.cpp:646
virtual int getNodesPerElement() const
Returns the number of nodes per element.
Definition: FinleyElements.h:127
virtual StringVec getVarNames() const
Returns a vector with the mesh variable names.
Definition: FinleyElements.cpp:503
IntVec ID
Definition: FinleyElements.h:189
std::string name
Definition: FinleyElements.h:183
bool initFromFinley(const finley::ElementFile *finleyFile)
Initialises with data from a Finley ElementFile instance.
Definition: FinleyElements.cpp:202
void buildReducedElements(const FinleyElementInfo &f)
Definition: FinleyElements.cpp:573
IntVec owner
Definition: FinleyElements.h:190
QuadMaskInfo buildQuadMask(const CoordArray &quadNodes, int numQNodes)
Definition: FinleyElements.cpp:1198
FinleyNodes_ptr nodeMesh
Definition: FinleyElements.h:181
virtual ElementData_ptr getReducedElements() const
Returns the reduced elements.
Definition: FinleyElements.h:155
ZoneType type
Definition: FinleyElements.h:187
FinleyNodes_ptr originalMesh
Definition: FinleyElements.h:182
virtual const IntVec & getVarDataByName(const std::string varName) const
Returns an array of data values for the name provided.
Definition: FinleyElements.cpp:516
void removeGhostZones(int ownIndex)
Removes "ghost" elements.
Definition: FinleyElements.cpp:690
QuadMaskInfo reducedQuadMask
Definition: FinleyElements.h:191
virtual ~FinleyElements()
Destructor.
Definition: FinleyElements.h:87
virtual ZoneType getType() const
Returns the type of the elements.
Definition: FinleyElements.h:133
int numElements
Definition: FinleyElements.h:184
bool writeToSilo(DBfile *dbfile, const std::string &siloPath, const StringVec &labels, const StringVec &units, bool writeMeshData)
Writes element data into given directory in given Silo file.
Definition: FinleyElements.cpp:771
virtual const IntVec & getIDs() const
Returns a vector of element IDs.
Definition: FinleyElements.h:144
virtual const IntVec & getNodeList() const
Returns a vector of the node IDs used by the elements.
Definition: FinleyElements.h:141
virtual const QuadMaskInfo & getQuadMask(int functionSpace) const
Returns a QuadMaskInfo structure for given functionspace code.
Definition: FinleyElements.cpp:535
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:32
ElementTypeId
Definition: ElementType.h:25
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:32
ElementTypeId
Definition: ReferenceElements.h:41
Definition: DataVar.cpp:51
std::vector< std::string > StringVec
Definition: weipa.h:61
boost::shared_ptr< ElementData > ElementData_ptr
Definition: weipa.h:67
std::vector< int > IntVec
Definition: weipa.h:60
boost::shared_ptr< NodeData > NodeData_ptr
Definition: weipa.h:69
std::vector< float * > CoordArray
Definition: weipa.h:62
ZoneType
Definition: ElementData.h:27
boost::shared_ptr< FinleyElements > FinleyElements_ptr
Definition: FinleyElements.h:64
boost::shared_ptr< FinleyNodes > FinleyNodes_ptr
Definition: FinleyNodes.h:43
Holds information that is used to convert from finley element types to elements supported by Silo and...
Definition: FinleyElements.h:55
ZoneType reducedElementType
Definition: FinleyElements.h:56
int elementSize
Definition: FinleyElements.h:58
int quadDim
Definition: FinleyElements.h:61
const size_t * multiCellIndices
Definition: FinleyElements.h:59
bool useQuadNodes
Definition: FinleyElements.h:60
int elementFactor
Definition: FinleyElements.h:57
int reducedElementSize
Definition: FinleyElements.h:58
ZoneType elementType
Definition: FinleyElements.h:56
This struct holds a mask (0's and 1's) that indicates which quad nodes contribute to a sub-element wh...
Definition: ElementData.h:40