Skip to content
Snippets Groups Projects
Commit 6c309962 authored by podlesny's avatar podlesny
Browse files

.

parent 1f470d23
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
# -*- mode:conf -*-
[boundary.friction]
smallestDiameter = 0.5 # 2e-3 [m]
smallestDiameter = 0.1 # 2e-3 [m]
[timeSteps]
refinementTolerance = 1e-5 # 1e-5
......
......@@ -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;
}
};
......
......@@ -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;*/
};
}
......
......@@ -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;
......
......@@ -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;
......
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