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,14 +291,14 @@ int main(int argc, char *argv[]) { ...@@ -292,14 +291,14 @@ int main(int argc, char *argv[]) {
u1 += u1_diff_new; u1 += u1_diff_new;
auto *displacement = { // Compute von Mises stress and write everything to a file
new BasisGridFunction<P1Basis, VectorType>(p1Basis, u1); auto *displacement =
VonMisesStressAssembler<GridType> localStressAssembler(E, nu, new BasisGridFunction<P1Basis, VectorType>(p1Basis, u1);
displacement); VonMisesStressAssembler<GridType> localStressAssembler(E, nu,
FunctionalAssembler<P0Basis>(p0Basis) displacement);
.assemble(localStressAssembler, vonMisesStress, true); FunctionalAssembler<P0Basis>(p0Basis)
.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