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

Constness

parent 3ff8d474
No related branches found
No related tags found
No related merge requests found
......@@ -306,7 +306,7 @@ int main(int argc, char *argv[]) {
// {{{ Linear Solver;
auto linearBaseSolverStep =
new TruncatedBlockGSStep<OperatorType, VectorType>;
auto baseEnergyNorm =
auto const baseEnergyNorm =
new EnergyNorm<OperatorType, VectorType>(*linearBaseSolverStep);
auto linearBaseSolver = new LoopSolver<VectorType>(
linearBaseSolverStep, solver_maxIterations, solver_tolerance,
......@@ -358,7 +358,7 @@ int main(int argc, char *argv[]) {
parset.get<int>("solver.tnnmg.main.nu2"));
multigridStep->ignoreNodes_ = &ignoreNodes;
auto energyNorm =
auto const energyNorm =
new EnergyNorm<OperatorType, VectorType>(stiffnessMatrix);
LoopSolver<VectorType> overallSolver(
......@@ -381,7 +381,7 @@ int main(int argc, char *argv[]) {
u4 += u4_diff;
{ // Compute von Mises stress and write everything to a file
auto displacement =
auto const displacement =
Dune::make_shared<BasisGridFunction<P1Basis, VectorType> const>(
p1Basis, u4);
VonMisesStressAssembler<GridType> localStressAssembler(E, nu,
......@@ -392,10 +392,11 @@ int main(int argc, char *argv[]) {
Dune::VTKWriter<GridView> writer(leafView);
std::string filename((boost::format("obs%d") % run).str());
auto displacement_ptr =
// Note: These pointers cannot be const.
auto const displacement_ptr =
Dune::make_shared<VTKBasisGridFunction<P1Basis, VectorType>>(
p1Basis, u4, "displacement");
auto vonmises_ptr =
auto const vonmises_ptr =
Dune::make_shared<VTKBasisGridFunction<P0Basis, CellVectorType>>(
p0Basis, vonMisesStress, "stress");
writer.addVertexData(displacement_ptr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment