diff --git a/MeshLib/Elements/TemplateHex.h b/MeshLib/Elements/TemplateHex.h index 13f5faafd51393d2423838695970211b48cc6269..b705f3c8c0acf18df809accc204b7d88b0ca9fdb 100644 --- a/MeshLib/Elements/TemplateHex.h +++ b/MeshLib/Elements/TemplateHex.h @@ -15,6 +15,7 @@ #ifndef TEMPLATEHEX_H_ #define TEMPLATEHEX_H_ +#include <array> #include "MshEnums.h" #include "Cell.h" @@ -52,6 +53,9 @@ public: /// Constructor with an array of mesh nodes. TemplateHex(Node* nodes[NNODES], unsigned value = 0); + /// Constructs a hex from array of Node pointers. + TemplateHex(std::array<Node*, NNODES> const& nodes, unsigned value = 0); + /// Copy constructor TemplateHex(const TemplateHex &hex); diff --git a/MeshLib/Elements/TemplateHex.tpp b/MeshLib/Elements/TemplateHex.tpp index 3723592c0eb8cefe158f9c002064c510ad19fda3..b0f2aaafed5dcc14e28e32aaf43e18f059392293 100644 --- a/MeshLib/Elements/TemplateHex.tpp +++ b/MeshLib/Elements/TemplateHex.tpp @@ -63,6 +63,20 @@ TemplateHex<NNODES,CELLHEXTYPE>::TemplateHex(Node* nodes[NNODES], unsigned value this->_volume = this->computeVolume(); } +template<unsigned NNODES, CellType::type CELLHEXTYPE> +TemplateHex<NNODES,CELLHEXTYPE>::TemplateHex(std::array<Node*, NNODES> const& nodes, + unsigned value) + : Cell(value) +{ + _nodes = new Node*[NNODES]; + std::copy(nodes.begin(), nodes.end(), _nodes); + + _neighbors = new Element*[6]; + std::fill(_neighbors, _neighbors + 6, nullptr); + + this->_volume = this->computeVolume(); +} + template <unsigned NNODES, CellType::type CELLHEXTYPE> TemplateHex<NNODES,CELLHEXTYPE>::TemplateHex(const TemplateHex<NNODES,CELLHEXTYPE> &hex) : Cell(hex.getValue()) diff --git a/MeshLib/Elements/TemplatePrism.h b/MeshLib/Elements/TemplatePrism.h index 9bdce749392a062d6b5269aa20e30ad1521dc8f0..9a1b48c7303ee02373dfdb3d91945b77c43387e6 100644 --- a/MeshLib/Elements/TemplatePrism.h +++ b/MeshLib/Elements/TemplatePrism.h @@ -15,6 +15,7 @@ #ifndef TEMPLATEPRISM_H_ #define TEMPLATEPRISM_H_ +#include <array> #include "MshEnums.h" #include "Cell.h" @@ -50,6 +51,9 @@ public: /// Constructor with an array of mesh nodes. TemplatePrism(Node* nodes[NNODES], unsigned value = 0); + /// Constructs a prism from array of Node pointers. + TemplatePrism(std::array<Node*, NNODES> const& nodes, unsigned value = 0); + /// Copy constructor TemplatePrism(const TemplatePrism &prism); diff --git a/MeshLib/Elements/TemplatePrism.tpp b/MeshLib/Elements/TemplatePrism.tpp index fd0295e33f36644fdbcec980bde27d86f5c5a6ea..6f79aceb43b381c440fa831c9aa0f8dcaa7c5a2c 100644 --- a/MeshLib/Elements/TemplatePrism.tpp +++ b/MeshLib/Elements/TemplatePrism.tpp @@ -62,6 +62,20 @@ TemplatePrism<NNODES,CELLPRISMTYPE>::TemplatePrism(Node* nodes[NNODES], unsigned this->_volume = this->computeVolume(); } +template<unsigned NNODES, CellType::type CELLPRISMTYPE> +TemplatePrism<NNODES,CELLPRISMTYPE>::TemplatePrism(std::array<Node*, NNODES> const& nodes, + unsigned value) + : Cell(value) +{ + _nodes = new Node*[NNODES]; + std::copy(nodes.begin(), nodes.end(), _nodes); + + _neighbors = new Element*[5]; + std::fill(_neighbors, _neighbors + 5, nullptr); + + this->_volume = this->computeVolume(); +} + template <unsigned NNODES, CellType::type CELLPRISMTYPE> TemplatePrism<NNODES,CELLPRISMTYPE>::TemplatePrism(const TemplatePrism<NNODES,CELLPRISMTYPE> &prism) : Cell(prism.getValue()) diff --git a/MeshLib/Elements/TemplatePyramid.h b/MeshLib/Elements/TemplatePyramid.h index 76123dda11f3a7c6b625d0de0277a8119a1dfb15..cf213dd041af6b87d63e7c2a3376de5681a7ac3c 100644 --- a/MeshLib/Elements/TemplatePyramid.h +++ b/MeshLib/Elements/TemplatePyramid.h @@ -15,6 +15,7 @@ #ifndef TEMPLATEPYRAMID_H_ #define TEMPLATEPYRAMID_H_ +#include <array> #include "MshEnums.h" #include "Cell.h" @@ -48,6 +49,9 @@ public: /// Constructor with an array of mesh nodes. TemplatePyramid(Node* nodes[NNODES], unsigned value = 0); + /// Constructs a pyramid from array of Node pointers. + TemplatePyramid(std::array<Node*, NNODES> const& nodes, unsigned value = 0); + /// Copy constructor TemplatePyramid(const TemplatePyramid &pyramid); diff --git a/MeshLib/Elements/TemplatePyramid.tpp b/MeshLib/Elements/TemplatePyramid.tpp index 570de5504faff1071f226c046addbae52e10d716..0277623de9a9e86280782658c9c16aa795d46f26 100644 --- a/MeshLib/Elements/TemplatePyramid.tpp +++ b/MeshLib/Elements/TemplatePyramid.tpp @@ -63,6 +63,20 @@ TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::TemplatePyramid(Node* nodes[NNODES], un this->_volume = this->computeVolume(); } +template<unsigned NNODES, CellType::type CELLPYRAMIDTYPE> +TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::TemplatePyramid(std::array<Node*, NNODES> const& nodes, + unsigned value) + : Cell(value) +{ + _nodes = new Node*[NNODES]; + std::copy(nodes.begin(), nodes.end(), _nodes); + + _neighbors = new Element*[5]; + std::fill(_neighbors, _neighbors + 5, nullptr); + + this->_volume = this->computeVolume(); +} + template <unsigned NNODES, CellType::type CELLPYRAMIDTYPE> TemplatePyramid<NNODES,CELLPYRAMIDTYPE>::TemplatePyramid(const TemplatePyramid<NNODES,CELLPYRAMIDTYPE> &pyramid) : Cell(pyramid.getValue()) diff --git a/MeshLib/Elements/TemplateQuad.h b/MeshLib/Elements/TemplateQuad.h index 528fd5ea52ec65b0843dedf27ed79ae663a8b82a..049b1ab58c74ec27b7db7a0a9c97479dd8bedddc 100644 --- a/MeshLib/Elements/TemplateQuad.h +++ b/MeshLib/Elements/TemplateQuad.h @@ -15,6 +15,7 @@ #ifndef TEMPLATEQUAD_H_ #define TEMPLATEQUAD_H_ +#include <array> #include "MshEnums.h" #include "Face.h" diff --git a/MeshLib/Elements/TemplateTet.h b/MeshLib/Elements/TemplateTet.h index 27621db61d6adb73a5ef8d2338117928b2abe118..71a430ee6acb94078c41d5929aef449d3c5a3dea 100644 --- a/MeshLib/Elements/TemplateTet.h +++ b/MeshLib/Elements/TemplateTet.h @@ -15,6 +15,7 @@ #ifndef TEMPLATETET_H_ #define TEMPLATETET_H_ +#include <array> #include "MshEnums.h" #include "Cell.h" @@ -47,6 +48,9 @@ public: /// Constructor with an array of mesh nodes. TemplateTet(Node* nodes[NNODES], unsigned value = 0); + /// Constructs a tetrahedron from array of Node pointers. + TemplateTet(std::array<Node*, NNODES> const& nodes, unsigned value = 0); + /// Copy constructor TemplateTet(const TemplateTet &tet); diff --git a/MeshLib/Elements/TemplateTet.tpp b/MeshLib/Elements/TemplateTet.tpp index 1851c17bdceaf0fe83e1df3dbe52cc5689872d87..20ea3697a620b3fc76832f0d176c124c44f2433a 100644 --- a/MeshLib/Elements/TemplateTet.tpp +++ b/MeshLib/Elements/TemplateTet.tpp @@ -54,6 +54,20 @@ TemplateTet<NNODES,CELLTETTYPE>::TemplateTet(Node* nodes[NNODES], unsigned value this->_volume = this->computeVolume(); } +template<unsigned NNODES, CellType::type CELLTETTYPE> +TemplateTet<NNODES,CELLTETTYPE>::TemplateTet(std::array<Node*, NNODES> const& nodes, + unsigned value) + : Cell(value) +{ + _nodes = new Node*[NNODES]; + std::copy(nodes.begin(), nodes.end(), _nodes); + + _neighbors = new Element*[4]; + std::fill(_neighbors, _neighbors + 4, nullptr); + + this->_volume = this->computeVolume(); +} + template <unsigned NNODES, CellType::type CELLTETTYPE> TemplateTet<NNODES,CELLTETTYPE>::TemplateTet(const TemplateTet<NNODES,CELLTETTYPE> &tet) : Cell(tet.getValue()) diff --git a/MeshLib/Elements/TemplateTri.h b/MeshLib/Elements/TemplateTri.h index 9db105d69dbbab917ae4240689579217fb998e2d..3adaa403998c0fa20875c3cde9c6739960b69f90 100644 --- a/MeshLib/Elements/TemplateTri.h +++ b/MeshLib/Elements/TemplateTri.h @@ -15,6 +15,7 @@ #ifndef TEMPLATETRI_H_ #define TEMPLATETRI_H_ +#include <array> #include "Edge.h" #include "Node.h" #include "Face.h" @@ -49,6 +50,9 @@ public: /// Constructor with an array of mesh nodes. TemplateTri(Node* nodes[NNODES], unsigned value = 0); + /// Constructs a triangle from array of Node pointers. + TemplateTri(std::array<Node*, NNODES> const& nodes, unsigned value = 0); + /// Copy constructor TemplateTri(const TemplateTri &tri); diff --git a/MeshLib/Elements/TemplateTri.tpp b/MeshLib/Elements/TemplateTri.tpp index 9df036aad07713782542d748eb11e78cafc53a1f..0ac40a3817281901085f8ea8e027db8e8dc13013 100644 --- a/MeshLib/Elements/TemplateTri.tpp +++ b/MeshLib/Elements/TemplateTri.tpp @@ -28,6 +28,20 @@ TemplateTri<NNODES,CELLTRITYPE>::TemplateTri(Node* nodes[NNODES], unsigned value this->_area = this->computeVolume(); } +template<unsigned NNODES, CellType::type CELLTRITYPE> +TemplateTri<NNODES,CELLTRITYPE>::TemplateTri(std::array<Node*, NNODES> const& nodes, + unsigned value) + : Face(value) +{ + _nodes = new Node*[NNODES]; + std::copy(nodes.begin(), nodes.end(), _nodes); + + _neighbors = new Element*[3]; + std::fill(_neighbors, _neighbors + 3, nullptr); + + this->_area = this->computeVolume(); +} + template <unsigned NNODES, CellType::type CELLTRITYPE> TemplateTri<NNODES,CELLTRITYPE>::TemplateTri(const TemplateTri<NNODES,CELLTRITYPE> &tri) : Face(tri.getValue()) diff --git a/scripts/docs/Doxyfile.in b/scripts/docs/Doxyfile.in index d745e7a44bfbcf325edba9a8b245af5a46c2e316..7d5240734ae553c501ed3098ae1405f472b064a0 100644 --- a/scripts/docs/Doxyfile.in +++ b/scripts/docs/Doxyfile.in @@ -468,7 +468,7 @@ SHOW_INCLUDE_FILES = YES # will list include files with double quotes in the documentation # rather than with sharp brackets. -FORCE_LOCAL_INCLUDES = NO +FORCE_LOCAL_INCLUDES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. @@ -678,7 +678,8 @@ INPUT = ${CMAKE_SOURCE_DIR}/BaseLib \ ${CMAKE_SOURCE_DIR}/MathLib \ ${CMAKE_SOURCE_DIR}/MeshLib \ ${CMAKE_SOURCE_DIR}/Gui \ - ${CMAKE_SOURCE_DIR}/README.md + ${CMAKE_SOURCE_DIR}/README.md \ + ${CMAKE_SOURCE_DIR}/SimpleTests # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -1725,7 +1726,7 @@ INCLUDED_BY_GRAPH = YES # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. -CALL_GRAPH = ${DOCS_GENERATE_CALL_GRAPHS_STRING} +CALL_GRAPH = YES # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function