using ElementType = Ikarus::EnhancedAssumedStrains<Ikarus::LinearElastic<decltype(basis)>>;
std::vector<ElementType> fes;
using GridView = decltype(gridView);
Dune::VtkWriter<GridView> vtkWriter2(gridView);
auto resReq = Ikarus::ResultRequirements()
.insertGlobalSolution(Ikarus::FESolutions::displacement, D_Glob)
.insertParameter(Ikarus::FEParameter::loadfactor, lambdaLoad)
.addResultRequest(ResultType::PK2Stress);
auto resultFunction = std::make_shared<ResultFunction<ElementType>>(&fes, resReq);
vtkWriter2.addPointData(Dune::Vtk::Function<GridView>(resultFunction));
Asking for ResultType::PK2Stress for the EAS element here leads to the following run-time error:
terminate called after throwing an instance of 'Dune::RangeError'
what(): Dune::RangeError [getSingleResult:/tmp/Ikarus/ikarus/finiteElements/feRequirements.hh:199]: getSingleResult can only be called when a single result was inserted
But this error should convey that the chosen element doesn't compute ResultType::PK2Stress as a requested result
Example:
Asking for
ResultType::PK2Stress
for the EAS element here leads to the following run-time error:But this error should convey that the chosen element doesn't compute
ResultType::PK2Stress
as a requested result