Workspace 6.21.5
Classes | Namespaces | Macros | Typedefs
elementtype.h File Reference
#include <limits>
#include <QCoreApplication>
#include <QList>
#include <QMap>
#include "Mesh/mesh_api.h"
Include dependency graph for elementtype.h:
This graph shows which files directly or indirectly include this file:

Classes

class  Hexahedron
 
class  Point
 
class  Polygon
 
class  PolyLine
 
class  Quadrilateral
 
class  Segment
 
class  Tetrahedron
 
class  Triangle
 
class  Type
 A type of element supported by a MeshModelInterface. More...
 
class  TypeRegistry
 A class to provide a lookup between element type name and singleton instance. More...
 
class  TypeSingleton< Derived >
 
class  Unsupported
 

Namespaces

namespace  CSIRO
 Top level namespace for all Workspace code.
 
namespace  CSIRO::Mesh
 Mesh model data structures.
 
namespace  CSIRO::Mesh::ElementType
 

Macros

#define DECLARE_WORKSPACE_MESHMODEL_ELEMENT_TYPE(T, NUM_NODES, WORKSPACE_EXPORT_SYMBOL)
 
#define DECLARE_WORKSPACE_MESHMODEL_ELEMENT_TYPE_RANGED(T, NUM_NODES_MIN, NUM_NODES_MAX, WORKSPACE_EXPORT_SYMBOL)
 
#define DECLARE_WORKSPACE_MESHMODEL_VOLUME_ELEMENT_TYPE(T, NUM_NODES, NUM_FACES, NUM_PRIMITIVES_PER_FACE, WORKSPACE_EXPORT_SYMBOL)
 
#define DEFINE_WORKSPACE_MESHMODEL_ELEMENT_TYPE(T, WORKSPACE_EXPORT_SYMBOL)
 

Typedefs

using Hexa = Hexahedron
 
using List = QList< const ElementType::Type * >
 
using Quad = Quadrilateral
 
using Tetra = Tetrahedron
 
using Tri = Triangle
 

Macro Definition Documentation

◆ DECLARE_WORKSPACE_MESHMODEL_ELEMENT_TYPE

#define DECLARE_WORKSPACE_MESHMODEL_ELEMENT_TYPE (   T,
  NUM_NODES,
  WORKSPACE_EXPORT_SYMBOL 
)
Value:
namespace CSIRO \
{ \
namespace Mesh \
{ \
namespace ElementType \
{ \
class T : public TypeSingleton<T> \
{ \
public: \
T() : TypeSingleton<T>((#T), NUM_NODES, NUM_NODES) {} \
}; \
template<> \
WORKSPACE_EXPORT_SYMBOL const T& TypeSingleton<T>::getInstance(); \
} \
} \
}
static const Derived & getInstance()
Top level namespace for all Workspace code.
Definition: applicationsupportplugin.cpp:32

This macro is simplified analogous to the DECLARE_WORKSPACE_OPERATION_FACTORY macro. See its detailed description for why we also need a similar macro for element types.

Place this macro in your class header file outside of all namespaces.

◆ DECLARE_WORKSPACE_MESHMODEL_ELEMENT_TYPE_RANGED

#define DECLARE_WORKSPACE_MESHMODEL_ELEMENT_TYPE_RANGED (   T,
  NUM_NODES_MIN,
  NUM_NODES_MAX,
  WORKSPACE_EXPORT_SYMBOL 
)
Value:
namespace CSIRO \
{ \
namespace Mesh \
{ \
namespace ElementType \
{ \
class T : public TypeSingleton<T> \
{ \
public: \
T() : TypeSingleton<T>((#T), NUM_NODES_MIN, NUM_NODES_MAX) {} \
}; \
template<> \
WORKSPACE_EXPORT_SYMBOL const T& TypeSingleton<T>::getInstance(); \
} \
} \
}

This macro is simplified analogous to the DECLARE_WORKSPACE_OPERATION_FACTORY macro. See its detailed description for why we also need a similar macro for element types.

Place this macro in your class header file outside of all namespaces.

◆ DECLARE_WORKSPACE_MESHMODEL_VOLUME_ELEMENT_TYPE

#define DECLARE_WORKSPACE_MESHMODEL_VOLUME_ELEMENT_TYPE (   T,
  NUM_NODES,
  NUM_FACES,
  NUM_PRIMITIVES_PER_FACE,
  WORKSPACE_EXPORT_SYMBOL 
)
Value:
namespace CSIRO \
{ \
namespace Mesh \
{ \
namespace ElementType \
{ \
class T : public TypeSingleton<T> \
{ \
public: \
T() : TypeSingleton<T>((#T), NUM_NODES, NUM_NODES, true, NUM_FACES, NUM_PRIMITIVES_PER_FACE) {} \
}; \
template<> \
WORKSPACE_EXPORT_SYMBOL const T& TypeSingleton<T>::getInstance(); \
} \
} \
}

This macro is simplified analogous to the DEFINE_WORKSPACE_OPERATION_FACTORY macro. See its detailed description for why we also need a similar macro for element types.

Place this macro in your class cpp file outside all namespaces at the end of the file.

◆ DEFINE_WORKSPACE_MESHMODEL_ELEMENT_TYPE

#define DEFINE_WORKSPACE_MESHMODEL_ELEMENT_TYPE (   T,
  WORKSPACE_EXPORT_SYMBOL 
)
Value:
namespace CSIRO \
{ \
namespace Mesh \
{ \
namespace ElementType \
{ \
template<> \
WORKSPACE_EXPORT_SYMBOL const T& TypeSingleton<T>::getInstance() \
{ \
static T instance; \
return instance; \
} \
} \
} \
}

This macro is simplified analogous to the DEFINE_WORKSPACE_OPERATION_FACTORY macro. See its detailed description for why we also need a similar macro for element types.

Place this macro in your class cpp file outside all namespaces at the end of the file.