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

Add a comment, move code to a block

parent b56aa242
No related branches found
No related tags found
No related merge requests found
...@@ -238,7 +238,6 @@ int main(int argc, char *argv[]) { ...@@ -238,7 +238,6 @@ int main(int argc, char *argv[]) {
stiffnessMatrix.mmv(u3, b3); stiffnessMatrix.mmv(u3, b3);
// {{{ Assemble terms for the nonlinearity // {{{ Assemble terms for the nonlinearity
std::vector<double> mu; std::vector<double> mu;
mu.resize(grid.size(grid.maxLevel(), dim)); mu.resize(grid.size(grid.maxLevel(), dim));
std::fill(mu.begin(), mu.end(), std::fill(mu.begin(), mu.end(),
...@@ -292,6 +291,7 @@ int main(int argc, char *argv[]) { ...@@ -292,6 +291,7 @@ int main(int argc, char *argv[]) {
u1 += u1_diff_new; u1 += u1_diff_new;
{ // Compute von Mises stress and write everything to a file
auto *displacement = auto *displacement =
new BasisGridFunction<P1Basis, VectorType>(p1Basis, u1); new BasisGridFunction<P1Basis, VectorType>(p1Basis, u1);
VonMisesStressAssembler<GridType> localStressAssembler(E, nu, VonMisesStressAssembler<GridType> localStressAssembler(E, nu,
...@@ -299,7 +299,6 @@ int main(int argc, char *argv[]) { ...@@ -299,7 +299,6 @@ int main(int argc, char *argv[]) {
FunctionalAssembler<P0Basis>(p0Basis) FunctionalAssembler<P0Basis>(p0Basis)
.assemble(localStressAssembler, vonMisesStress, true); .assemble(localStressAssembler, vonMisesStress, true);
{
Dune::VTKWriter<GridType::LeafGridView> writer(leafView); Dune::VTKWriter<GridType::LeafGridView> writer(leafView);
std::string filename((boost::format("obs%d") % run).str()); std::string filename((boost::format("obs%d") % run).str());
Dune::shared_ptr<VTKBasisGridFunction<P1Basis, VectorType>> Dune::shared_ptr<VTKBasisGridFunction<P1Basis, VectorType>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment