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

Only assemble nonlinearity once

parent 20fbe08e
No related branches found
No related tags found
No related merge requests found
......@@ -264,6 +264,10 @@ int main(int argc, char *argv[]) {
assemble_frictional<GridType, GridType::LeafGridView, SmallVector, P1Basis>(
leafView, p1Basis, frictionalNodes, nodalIntegrals);
Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const> myGlobalNonlinearity;
assemble_nonlinearity(grid.size(grid.maxLevel(), dim), parset,
myGlobalNonlinearity, nodalIntegrals);
for (size_t run = 1; run <= parset.get<size_t>("timesteps"); ++run) {
std::cout << ".";
std::cout.flush();
......@@ -279,12 +283,6 @@ int main(int argc, char *argv[]) {
stiffnessMatrix.mmv(u2, b2);
stiffnessMatrix.mmv(u3, b3);
Dune::shared_ptr<Dune::GlobalNonlinearity<dim> const>
myGlobalNonlinearity;
assemble_nonlinearity(grid.size(grid.maxLevel(), dim), parset,
myGlobalNonlinearity, nodalIntegrals);
// }}}
if (parset.get<bool>("useNonlinearGS")) {
MyConvexProblemType myConvexProblem(
stiffnessMatrix, *myGlobalNonlinearity, b1, u1_diff_new);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment