Skip to content
Snippets Groups Projects
Commit 43414df5 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

changed return type of order() to int

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