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