diff --git a/src/data-structures/contactnetwork.cc b/src/data-structures/contactnetwork.cc index 1a54dda9eb2793b2879a933ec7c5d472ed25d955..a25f7e49997bbe4a46a8bf3cccef9ce46c3dc259 100644 --- a/src/data-structures/contactnetwork.cc +++ b/src/data-structures/contactnetwork.cc @@ -26,7 +26,7 @@ ContactNetwork<HostGridType, VectorType>::ContactNetwork( couplings_(nCouplings), frictionBoundaries_(nBodies), stateEnergyNorms_(nBodies), - nBodyAssembler_(nBodies, nCouplings, false, 0.0) + nBodyAssembler_(nBodies, nCouplings) //, false, 0.0) {} template <class HostGridType, class VectorType> diff --git a/src/multi-body-problem-2D.cfg b/src/multi-body-problem-2D.cfg index 676d1a408726cc0c1a71d3c87010a35182156147..9112827cdd0dcee0ccd8e19324e54dd778f4ffb5 100644 --- a/src/multi-body-problem-2D.cfg +++ b/src/multi-body-problem-2D.cfg @@ -1,6 +1,6 @@ # -*- mode:conf -*- [boundary.friction] -smallestDiameter = 0.5 # 2e-3 [m] +smallestDiameter = 0.1 # 2e-3 [m] [timeSteps] refinementTolerance = 1e-5 # 1e-5 diff --git a/src/multi-body-problem-data/bc.hh b/src/multi-body-problem-data/bc.hh index 82ccdaacdc0ad655b0713323c80ee1e377b8af93..1b574cd6519d8c2a51d9873618cd424073e56dd7 100644 --- a/src/multi-body-problem-data/bc.hh +++ b/src/multi-body-problem-data/bc.hh @@ -7,7 +7,8 @@ class VelocityDirichletCondition : public Dune::VirtualFunction<double, double> { void evaluate(double const &relativeTime, double &y) const { // Assumed to vanish at time zero - double const finalVelocity = -5e-5; + /* + double const finalVelocity = -5e-5; std::cout << "VelocityDirichletCondition::evaluate()" << std::endl; @@ -19,6 +20,8 @@ class VelocityDirichletCondition y = (relativeTime <= 0.1) ? finalVelocity * (1.0 - std::cos(relativeTime * M_PI / 0.1)) / 2.0 : finalVelocity; + */ + y = relativeTime; } }; diff --git a/src/spatial-solving/tnnmg/linearcorrection.hh b/src/spatial-solving/tnnmg/linearcorrection.hh index d06155e5d24df964dced67d46827d6ccb0547763..c26f13df4efaea26c61a21a2326e6aa495e038d7 100644 --- a/src/spatial-solving/tnnmg/linearcorrection.hh +++ b/src/spatial-solving/tnnmg/linearcorrection.hh @@ -76,8 +76,8 @@ makeLinearCorrection(std::shared_ptr< Dune::Solvers::IterativeSolver<Vector> > i directSolver->preprocess(); directSolver->solve(); - //x = directX; - using LinearIterationStep = Dune::Solvers::LinearIterationStep<Matrix, Vector>; + x = directX; + /*using LinearIterationStep = Dune::Solvers::LinearIterationStep<Matrix, Vector>; auto linearIterationStep = dynamic_cast<LinearIterationStep*>(&iterativeSolver->getIterationStep()); if (not linearIterationStep) @@ -94,7 +94,7 @@ makeLinearCorrection(std::shared_ptr< Dune::Solvers::IterativeSolver<Vector> > i const auto& norm = iterativeSolver->getErrorNorm(); auto error = norm.diff(linearIterationStep->getSol(), directX); - std::cout << "Linear solver iterations: " << iterativeSolver->getResult().iterations << " Error: " << error << std::endl; + std::cout << "Linear solver iterations: " << iterativeSolver->getResult().iterations << " Error: " << error << std::endl;*/ }; } diff --git a/src/spatial-solving/tnnmg/tnnmgstep.hh b/src/spatial-solving/tnnmg/tnnmgstep.hh index 844f0137b3b4a6f3e3653a77f58e03ce3a182d54..44979dcf4bbb356f6e11ea64ff2b498f3caeb8d6 100644 --- a/src/spatial-solving/tnnmg/tnnmgstep.hh +++ b/src/spatial-solving/tnnmg/tnnmgstep.hh @@ -19,8 +19,8 @@ #include "localproblem.hh" -//#include "linearcorrection.hh" -#include <dune/tnnmg/iterationsteps/linearcorrection.hh> +#include "linearcorrection.hh" +//#include <dune/tnnmg/iterationsteps/linearcorrection.hh> #include <dune/tectonic/../../src/utils/debugutils.hh> @@ -192,7 +192,7 @@ class TNNMGStep : //DUNE_THROW(Dune::Exception, "TNNMGStep: Just need to terminate here!"); - linearCorrection_(A, constrainedCorrection_, r); + linearCorrection_(A, constrainedCorrection_, r, ignore); //std::cout << "- linear correction: success" << std::endl; diff --git a/src/time-stepping/adaptivetimestepper.cc b/src/time-stepping/adaptivetimestepper.cc index 3a349a7a7b816c9501bd5c6df16e2be392e04eba..96aa6eccdfa4bf88cd88fcbc1e514555e4e2f211 100644 --- a/src/time-stepping/adaptivetimestepper.cc +++ b/src/time-stepping/adaptivetimestepper.cc @@ -67,10 +67,9 @@ IterationRegister AdaptiveTimeStepper<Factory, ContactNetwork, Updaters, ErrorNo std::cout << "AdaptiveTimeStepper Step 1" << std::endl; -/* bool didCoarsen = false; iterationRegister_.reset(); - UpdatersWithCount R2; + UpdatersWithCount R2; /* UpdatersWithCount C; while (relativeTime_ + relativeTau_ <= 1.0) { R2 = step(R1_.updaters, relativeTime_ + relativeTau_, relativeTau_); @@ -112,9 +111,9 @@ IterationRegister AdaptiveTimeStepper<Factory, ContactNetwork, Updaters, ErrorNo relativeTime_ += relativeTau_; current_ = R1_.updaters; - UpdatersWithCount emptyR1; - R1_ = emptyR1; - //R1_ = R2; + //UpdatersWithCount emptyR1; + //R1_ = emptyR1; + R1_ = R2; std::cout << " done" << std::endl;