Commit 43414df5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

changed return type of order() to int

parent c86f10e3
...@@ -198,19 +198,19 @@ namespace Dune ...@@ -198,19 +198,19 @@ namespace Dune
/// Determine lagrange order from number of points /// Determine lagrange order from number of points
template <class LocalParam> template <class LocalParam>
unsigned int order (LocalParam const& localParam) const int order (LocalParam const& localParam) const
{ {
GeometryType type = localParam.type; GeometryType type = localParam.type;
std::size_t nNodes = localParam.nodes.size(); int nNodes = localParam.nodes.size();
for (unsigned int o = 1; o <= nNodes; ++o) for (int o = 1; o <= nNodes; ++o)
if (numLagrangePoints(type.id(), type.dim(), o) == nNodes) if (numLagrangePoints(type.id(), type.dim(), o) == std::size_t(nNodes))
return o; return o;
return 1; return 1;
} }
/// Determine lagrange order from number of points from the first element parametrization /// Determine lagrange order from number of points from the first element parametrization
unsigned int order () const int order () const
{ {
assert(!parametrization_.empty()); assert(!parametrization_.empty());
return order(parametrization_.front()); return order(parametrization_.front());
...@@ -292,7 +292,7 @@ namespace Dune ...@@ -292,7 +292,7 @@ namespace Dune
public: public:
/// Construct a local element parametrization /// Construct a local element parametrization
template <class Nodes, class LocalParam> template <class Nodes, class LocalParam>
LocalParametrization (Nodes const& nodes, LocalParam const& param, unsigned int order) LocalParametrization (Nodes const& nodes, LocalParam const& param, int order)
: localFE_(param.type, order) : localFE_(param.type, order)
, localNodes_(param.nodes.size()) , localNodes_(param.nodes.size())
{ {
...@@ -302,7 +302,7 @@ namespace Dune ...@@ -302,7 +302,7 @@ namespace Dune
/// Construct a local element parametrization for elements with permuted corners /// Construct a local element parametrization for elements with permuted corners
template <class Nodes, class LocalParam, class Permutation> template <class Nodes, class LocalParam, class Permutation>
LocalParametrization (Nodes const& nodes, LocalParam const& param, unsigned int order, Permutation const& permutation) LocalParametrization (Nodes const& nodes, LocalParam const& param, int order, Permutation const& permutation)
: LocalParametrization(nodes, param, order) : LocalParametrization(nodes, param, order)
{ {
auto refElem = referenceElement<ctype,Grid::dimension>(param.type); auto refElem = referenceElement<ctype,Grid::dimension>(param.type);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment