Skip to content
Snippets Groups Projects
Commit 2ea31ce8 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Remove method testDerivativeTangentiality

There is really no point in having this method.  Before it is called,
localgeodesicfefunctiontest already checks whether the derivative
is correct (by comparing with an FD approximation).  If a derivative
passes this test it MUST be tangential.  No need to check that
explicitly.
parent f5d46bc9
No related branches found
No related tags found
No related merge requests found
......@@ -63,47 +63,6 @@ evaluateDerivativeFD(const LocalFunction& f, const Dune::FieldVector<ctype, dim>
}
template <int domainDim>
void testDerivativeTangentiality(const RealTuple<double,1>& x,
const FieldMatrix<double,1,domainDim>& derivative)
{
// By construction, derivatives of RealTuples are always tangent
}
// the columns of the derivative must be tangential to the manifold
template <int domainDim, int vectorDim>
void testDerivativeTangentiality(const UnitVector<double,vectorDim>& x,
const FieldMatrix<double,vectorDim,domainDim>& derivative)
{
for (int i=0; i<domainDim; i++) {
// The i-th column is a tangent vector if its scalar product with the global coordinates
// of x vanishes.
double sp = 0;
for (int j=0; j<vectorDim; j++)
sp += x.globalCoordinates()[j] * derivative[j][i];
if (std::fabs(sp) > 1e-8)
DUNE_THROW(Dune::Exception, "Derivative is not tangential: Column: " << i << ", product: " << sp);
}
}
// the columns of the derivative must be tangential to the manifold
template <int domainDim, int vectorDim>
void testDerivativeTangentiality(const Rotation<double,vectorDim-1>& x,
const FieldMatrix<double,vectorDim,domainDim>& derivative)
{
}
// the columns of the derivative must be tangential to the manifold
template <int domainDim, int vectorDim>
void testDerivativeTangentiality(const RigidBodyMotion<double,3>& x,
const FieldMatrix<double,vectorDim,domainDim>& derivative)
{
}
/** \brief Test whether interpolation is invariant under permutation of the simplex vertices
* \todo Implement this for all dimensions
*/
......@@ -194,8 +153,6 @@ void testDerivative(const LocalGeodesicFEFunction<domainDim,double,typename PQkL
std::cout << "FD : " << fdDerivative << std::endl;
}
testDerivativeTangentiality(f.evaluate(quadPos), derivative);
}
}
......@@ -239,8 +196,6 @@ void testDerivativeOfValueWRTCoefficients(const LocalGeodesicFEFunction<domainDi
assert(false);
}
//testDerivativeTangentiality(f.evaluate(quadPos), derivative);
}
}
......@@ -285,8 +240,6 @@ void testDerivativeOfGradientWRTCoefficients(const LocalGeodesicFEFunction<domai
assert(false);
}
//testDerivativeTangentiality(f.evaluate(quadPos), derivative);
}
}
......
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