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

Move typedef and declaration out of the loop

Also do not initialise vonMisesStress needlessly
parent 66bb86c6
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,7 @@ int main() {
typedef Dune::FieldMatrix<double, dim, dim> SmallMatrix;
typedef Dune::BCRSMatrix<SmallMatrix> OperatorType;
typedef Dune::BlockVector<SmallVector> VectorType;
typedef Dune::BlockVector<Dune::FieldVector<double, 1>> CellVectorType;
// FIXME: Random values
size_t const runs = 1000;
......@@ -187,6 +188,7 @@ int main() {
VectorType u1(grid.size(grid.maxLevel(), dim));
u1 = 0;
VectorType u2 = u1;
CellVectorType vonMisesStress;
VectorType b1(grid.size(grid.maxLevel(), dim));
VectorType b2(grid.size(grid.maxLevel(), dim));
......@@ -234,9 +236,6 @@ int main() {
solver.solve();
}
typedef Dune::BlockVector<Dune::FieldVector<double, 1>> CellVectorType;
CellVectorType vonMisesStress(grid.size(grid.maxLevel(), dim - 1));
auto *displacement =
new BasisGridFunction<P1Basis, VectorType>(p1Basis, u1);
VonMisesStressAssembler<GridType> localStressAssembler(E, nu,
......
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