diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc index 22ef3bf022a03a8e62bf47398cb8ac34ee0e610b..c978a55549ea445bfee1ad20c9049a976010850a 100644 --- a/src/one-body-sample.cc +++ b/src/one-body-sample.cc @@ -61,6 +61,7 @@ #include <dune/fufem/functionspacebases/p1nodalbasis.hh> #include <dune/fufem/sharedpointermap.hh> #include <dune/solvers/norms/energynorm.hh> +#include <dune/solvers/norms/sumnorm.hh> #include <dune/solvers/solvers/loopsolver.hh> #include <dune/solvers/solvers/solver.hh> // Solver::FULL @@ -238,6 +239,7 @@ int main(int argc, char *argv[]) { // Set up normal stress, mass matrix, and gravity functional double normalStress; MatrixType massMatrix; + EnergyNorm<MatrixType, VectorType> const massMatrixNorm(massMatrix); VectorType gravityFunctional; { double const gravity = 9.81; @@ -280,6 +282,8 @@ int main(int argc, char *argv[]) { surfaceNormalStress = normalStress; MatrixType stiffnessMatrix; + EnergyNorm<MatrixType, VectorType> const stiffnessMatrixNorm( + stiffnessMatrix); { StVenantKirchhoffAssembler<GridType, P1Basis::LocalFiniteElement, P1Basis::LocalFiniteElement> const @@ -303,6 +307,8 @@ int main(int argc, char *argv[]) { OperatorAssembler<P1Basis, P1Basis>(p1Basis, p1Basis).assemble( frictionalBoundaryMassAssembler, frictionalBoundaryMassMatrix); } + SumNorm<VectorType> const velocityEnergyNorm(1.0, stiffnessMatrixNorm, 1.0, + massMatrixNorm); auto const nodalIntegrals = assemble_frictional<GridType, GridView, SmallVector, P1Basis>( @@ -387,7 +393,7 @@ int main(int argc, char *argv[]) { stateUpdater->setup(tau); timeSteppingScheme->setup(ell, tau, time, problem_rhs, problem_iterate, problem_A); - EnergyNorm<MatrixType, VectorType> velocityEnergyNorm(problem_A); + LoopSolver<VectorType> overallSolver( multigridStep, parset.get<size_t>("solver.tnnmg.maxiterations"), solver_tolerance, &velocityEnergyNorm, verbosity,