Skip to content
Snippets Groups Projects
Commit ff2b8f50 authored by Porrmann, Maik's avatar Porrmann, Maik
Browse files

Cleanup comments, make private parts of morley an hermite protected

parent ba391fea
No related branches found
No related tags found
No related merge requests found
......@@ -208,7 +208,7 @@ namespace Dune
"HermiteInterpolation only implemented for dim <= 3!");
}
private:
protected:
// TODO make this viable for general matrices
// TODO maybe make this part of a baseclass that also can be used by Argyris
template <class DerivativeType, class FieldType>
......@@ -231,7 +231,12 @@ namespace Dune
FieldType getPartialDerivative(Dune::FieldMatrix<FieldType, 1, d> const &df,
std::size_t i) const
{
return df[0][i];
if (df.N() == 1)
return df[0][i];
else if (df.M() == 1)
return df[i][0];
else
DUNE_THROW(Dune::NotImplemented, "derivative of scalar function is a matrix!");
}
};
......
......@@ -182,7 +182,6 @@ namespace Dune
public:
MorleyLocalInterpolation(std::bitset<numberOfEdges> s = 0) : s_(s)
{
// TODO move to a setup function that is only called when f does not have normalDerivative method
auto refElement = Dune::referenceElement<double, 2>(GeometryTypes::simplex(2));
for (std::size_t i = 0; i < numberOfEdges; i++)
......@@ -194,7 +193,6 @@ namespace Dune
std::size_t upper = (i == 0) ? 1 : 2;
auto edge = refElement.position(upper, 2) - refElement.position(lower, 2);
// edge_[i] *= (s[i]) ? -1.0 : 1.0; // applied at evaluation
normal_[i] = {-edge[1], edge[0]}; // rotation by 90 degree
// normalize normals
if (std::abs(normal_[i].two_norm2() - 1) > 1e-12)
......@@ -213,11 +211,9 @@ namespace Dune
void interpolate(const F &ff, std::vector<C> &out) const
{
constexpr auto dim = LocalBasis::Traits::dimDomain;
// constexpr auto k = LocalBasis::order();
using D = typename LocalBasis::Traits::DomainFieldType;
auto &&f = Impl::makeFunctionWithCallOperator<LocalCoordinate>(ff);
// auto &&df = derivative(ff);
out.resize(LocalBasis::size());
......@@ -230,7 +226,7 @@ namespace Dune
}
}
private:
protected:
// Vertices of the reference simplex
std::array<LocalCoordinate, numberOfEdges> v_;
// Edge midpoints of the reference simplex
......
......@@ -14,10 +14,7 @@ namespace Dune
using Field = F;
PolynomialBasisVecMatrix() = delete;
// TODO is this a deep copy? if yes change that
// PolynomialBasisVecMatrix(Dune::FieldMatrix<Field, size, size> mat_) : mat(mat_)
// {
// }
PolynomialBasisVecMatrix(Dune::FieldMatrix<Field, size, size> &&mat_) : mat(mat_)
{
}
......
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