Skip to content
Snippets Groups Projects
Commit a7969146 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Move state to solvers

parent 847b6e43
No related branches found
No related tags found
No related merge requests found
......@@ -270,11 +270,6 @@ int main(int argc, char *argv[]) {
auto nodalIntegrals =
assemble_frictional<GridType, GridView, SmallVector, P1Basis>(
leafView, p1Basis, frictionalNodes);
auto state =
Dune::make_shared<Dune::BlockVector<Dune::FieldVector<double, 1>>>(
grid->size(grid->maxLevel(), dim));
*state = 0.0;
// {{{ Set up TNNMG solver
// linear iteration step components
TruncatedBlockGSStep<OperatorType, VectorType> linearBaseSolverStep;
......@@ -337,6 +332,10 @@ int main(int argc, char *argv[]) {
stiffnessMatrix.mmv(u4, b4);
if (parset.get<bool>("solver.nonlineargs.use")) {
auto state =
Dune::make_shared<Dune::BlockVector<Dune::FieldVector<double, 1>>>(
grid->size(grid->maxLevel(), dim));
*state = 0.0;
auto myGlobalNonlinearity =
assemble_nonlinearity<VectorType, OperatorType>(
grid->size(grid->maxLevel(), dim), parset, nodalIntegrals,
......@@ -356,6 +355,10 @@ int main(int argc, char *argv[]) {
u1 += u1_diff;
if (parset.get<bool>("solver.tnnmg.use")) {
auto state =
Dune::make_shared<Dune::BlockVector<Dune::FieldVector<double, 1>>>(
grid->size(grid->maxLevel(), dim));
*state = 0.0;
auto myGlobalNonlinearity =
assemble_nonlinearity<VectorType, OperatorType>(
grid->size(grid->maxLevel(), dim), parset, nodalIntegrals,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment