Commit ff8498d1 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

operator terms for gradientOf and derivativeOf

parent 442888a5
Pipeline #184 passed with stage
......@@ -487,7 +487,8 @@ namespace AMDiS
, localView(dofvector.getFeSpace().localView())
, localIndexSet(dofvector.getFeSpace().localIndexSet())
{
direction[0] = component;
for(auto& d : direction) d = 0;
direction[component] = 1;
}
template <class Element, class PointList>
......@@ -501,8 +502,7 @@ namespace AMDiS
const auto& localFiniteElem = localView.tree().finiteElement();
const size_t nBasisFct = localFiniteElem.size();
// std::vector<Derivative> shapeDerivative(nBasisFct);
std::vector<Jacobian> shapeJacobian(nBasisFct);
std::vector<Derivative> shapeDerivative(nBasisFct);
std::vector<field_type> localVec(nBasisFct);
for (size_t j = 0; j < nBasisFct; ++j) {
......@@ -512,11 +512,10 @@ namespace AMDiS
values.resize(points.size());
for (size_t iq = 0; iq < points.size(); ++iq) {
// localFiniteElem.localBasis().template evaluate<1>(direction, points[iq].position(), shapeDerivative);
localFiniteElem.localBasis().evaluateJacobian(points[iq].position(), shapeJacobian);
localFiniteElem.localBasis().partial(direction, points[iq].position(), shapeDerivative);
value_type result = 0;
for (size_t j = 0; j < nBasisFct; ++j)
result += localVec[j] * shapeJacobian[j][0][component];
result += localVec[j] * shapeDerivative[j];
values[iq] = result;
}
}
......@@ -536,7 +535,7 @@ namespace AMDiS
int component;
double factor;
std::array<int, 1> direction;
std::array<unsigned int, 2> direction;
using FeSpace = typename DOFVectorType::FeSpace;
typename FeSpace::LocalView localView;
......
Markdown is supported
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