From 942e80b008a02cc2353d4fe494ee12c0c9ce4a56 Mon Sep 17 00:00:00 2001 From: Norihiro Watanabe <norihiro.watanabe@ufz.de> Date: Mon, 26 Jan 2015 12:23:44 +0100 Subject: [PATCH] add Line3 --- MeshLib/Elements/Line.h | 2 ++ MeshLib/Elements/LineRule3.cpp | 17 +++++++++++++++ MeshLib/Elements/LineRule3.h | 38 ++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 MeshLib/Elements/LineRule3.cpp create mode 100644 MeshLib/Elements/LineRule3.h diff --git a/MeshLib/Elements/Line.h b/MeshLib/Elements/Line.h index bb5b9be5d0d..938ed32cdbf 100644 --- a/MeshLib/Elements/Line.h +++ b/MeshLib/Elements/Line.h @@ -18,10 +18,12 @@ #include "TemplateElement.h" #include "Edge.h" #include "LineRule2.h" +#include "LineRule3.h" namespace MeshLib { typedef TemplateElement<Edge, LineRule2> Line; +typedef TemplateElement<Edge, LineRule3> Line3; } diff --git a/MeshLib/Elements/LineRule3.cpp b/MeshLib/Elements/LineRule3.cpp new file mode 100644 index 00000000000..062178b7ac9 --- /dev/null +++ b/MeshLib/Elements/LineRule3.cpp @@ -0,0 +1,17 @@ +/** + * \copyright + * Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "LineRule3.h" + + +namespace MeshLib { + +const unsigned LineRule3::n_all_nodes; + +} // end namespace MeshLib diff --git a/MeshLib/Elements/LineRule3.h b/MeshLib/Elements/LineRule3.h new file mode 100644 index 00000000000..ed33c6672bd --- /dev/null +++ b/MeshLib/Elements/LineRule3.h @@ -0,0 +1,38 @@ +/** + * \copyright + * Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#ifndef LINERULE3_H_ +#define LINERULE3_H_ + +#include "MeshLib/MeshEnums.h" +#include "LineRule2.h" + +namespace MeshLib +{ + +/** + * A 1d Edge or Line Element. + * @code + * 0----2----1 + * @endcode + */ +class LineRule3 : public LineRule2 +{ +public: + /// Constant: The number of all nodes for this element + static const unsigned n_all_nodes = 3u; + + /// Constant: The FEM type of the element + static const CellType cell_type = CellType::LINE3; +}; /* class */ + +} /* namespace */ + +#endif /* LINERULE3_H_ */ + -- GitLab