Skip to content
Snippets Groups Projects
Commit 93c8dfcf authored by lisa_julia.nebel_at_tu-dresden.de's avatar lisa_julia.nebel_at_tu-dresden.de
Browse files

Repair damping parameter

parent 83faa6a8
No related branches found
No related tags found
1 merge request!25Fix/damping
...@@ -39,7 +39,8 @@ setup(const typename BasisType::GridView::Grid& grid, ...@@ -39,7 +39,8 @@ setup(const typename BasisType::GridView::Grid& grid,
int nu1, int nu1,
int nu2, int nu2,
int baseIterations, int baseIterations,
double baseTolerance) double baseTolerance,
double damping)
{ {
grid_ = &grid; grid_ = &grid;
...@@ -53,6 +54,7 @@ setup(const typename BasisType::GridView::Grid& grid, ...@@ -53,6 +54,7 @@ setup(const typename BasisType::GridView::Grid& grid,
ignoreNodes_ = std::make_shared<Dune::BitSetVector<blocksize>>(dirichletNodes); ignoreNodes_ = std::make_shared<Dune::BitSetVector<blocksize>>(dirichletNodes);
baseIterations_ = baseIterations; baseIterations_ = baseIterations;
baseTolerance_ = baseTolerance; baseTolerance_ = baseTolerance;
damping_ = damping;
int numLevels = grid_->maxLevel()+1; int numLevels = grid_->maxLevel()+1;
......
...@@ -79,7 +79,8 @@ public: ...@@ -79,7 +79,8 @@ public:
int nu1, int nu1,
int nu2, int nu2,
int baseIterations, int baseIterations,
double baseTolerance); double baseTolerance,
double damping);
void setIgnoreNodes(const Dune::BitSetVector<blocksize>& ignoreNodes) void setIgnoreNodes(const Dune::BitSetVector<blocksize>& ignoreNodes)
{ {
...@@ -119,6 +120,9 @@ protected: ...@@ -119,6 +120,9 @@ protected:
/** \brief Error tolerance of the multigrid QP solver */ /** \brief Error tolerance of the multigrid QP solver */
double innerTolerance_; double innerTolerance_;
/** \brief Damping for the smoothers in the multigrid QP solver */
double damping_;
/** \brief Maximum number of base solver iterations */ /** \brief Maximum number of base solver iterations */
int baseIterations_; int baseIterations_;
......
...@@ -35,6 +35,9 @@ nu1 = 3 ...@@ -35,6 +35,9 @@ nu1 = 3
# Number of postsmoothing steps # Number of postsmoothing steps
nu2 = 3 nu2 = 3
# Damping for the smoothers of the multigrid solver
damping = 1.0
# Number of coarse grid corrections # Number of coarse grid corrections
mu = 1 mu = 1
......
...@@ -109,6 +109,7 @@ int main (int argc, char *argv[]) try ...@@ -109,6 +109,7 @@ int main (int argc, char *argv[]) try
const int baseIterations = parameterSet.get<int>("baseIt"); const int baseIterations = parameterSet.get<int>("baseIt");
const double mgTolerance = parameterSet.get<double>("mgTolerance"); const double mgTolerance = parameterSet.get<double>("mgTolerance");
const double baseTolerance = parameterSet.get<double>("baseTolerance"); const double baseTolerance = parameterSet.get<double>("baseTolerance");
const double damping = parameterSet.get<double>("damping");
std::string resultPath = parameterSet.get("resultPath", ""); std::string resultPath = parameterSet.get("resultPath", "");
// /////////////////////////////////////// // ///////////////////////////////////////
...@@ -333,7 +334,8 @@ int main (int argc, char *argv[]) try ...@@ -333,7 +334,8 @@ int main (int argc, char *argv[]) try
mgTolerance, mgTolerance,
mu, nu1, nu2, mu, nu1, nu2,
baseIterations, baseIterations,
baseTolerance baseTolerance,
damping
); );
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment