Skip to content
Snippets Groups Projects
Commit 009b72f3 authored by akbib's avatar akbib Committed by akbib
Browse files

Minor cleanup

[[Imported from SVN: r12626]]
parent 2156f7f2
No related branches found
No related tags found
No related merge requests found
...@@ -34,11 +34,11 @@ ...@@ -34,11 +34,11 @@
#include <dune/fufem/functionspacebases/p1nodalbasis.hh> #include <dune/fufem/functionspacebases/p1nodalbasis.hh>
#include <dune/fufem/functiontools/gridfunctionadaptor.hh> #include <dune/fufem/functiontools/gridfunctionadaptor.hh>
#include "dune/contact/estimators/hierarchiccontactestimator.hh" #include <dune/contact/estimators/hierarchiccontactestimator.hh>
#include "dune/contact/solvers/nsnewtonmgstep.hh" #include <dune/contact/solvers/nsnewtonmgstep.hh>
#include "dune/contact/solvers/contacttransfer.hh" #include <dune/contact/solvers/contacttransfer.hh>
#include "dune/contact/solvers/nsnewtoncontacttransfer.hh" #include <dune/contact/solvers/nsnewtoncontacttransfer.hh>
#include "dune/contact/assemblers/twobodyassembler.hh" #include <dune/contact/assemblers/twobodyassembler.hh>
#include <dune/fufem/makehalfcircle.hh> #include <dune/fufem/makehalfcircle.hh>
#include <dune/fufem/makesphere.hh> #include <dune/fufem/makesphere.hh>
...@@ -109,7 +109,7 @@ void compute (const array<GridType, numGrids>& grid, ...@@ -109,7 +109,7 @@ void compute (const array<GridType, numGrids>& grid,
rhs[i] = 0; rhs[i] = 0;
// Copy Dirichlet information into the solution vector // Copy Dirichlet information into the solution vector
for (int j=0; j<rhs[i].size(); j++) for (size_t j=0; j<rhs[i].size(); j++)
for (int k=0; k<dim; k++) { for (int k=0; k<dim; k++) {
if (dirichletNodes[i].back()[j][k]) if (dirichletNodes[i].back()[j][k])
x[i][j][k] = dirichletValues[i].back()[j][k]; x[i][j][k] = dirichletValues[i].back()[j][k];
...@@ -133,10 +133,10 @@ void compute (const array<GridType, numGrids>& grid, ...@@ -133,10 +133,10 @@ void compute (const array<GridType, numGrids>& grid,
totalDirichletNodes[toplevel-colevel].resize(dirichletNodes[0][levelGrid0].size() + dirichletNodes[1][levelGrid1].size()); totalDirichletNodes[toplevel-colevel].resize(dirichletNodes[0][levelGrid0].size() + dirichletNodes[1][levelGrid1].size());
for (int j=0; j<dirichletNodes[0][levelGrid0].size(); j++) for (size_t j=0; j<dirichletNodes[0][levelGrid0].size(); j++)
totalDirichletNodes[toplevel-colevel][j] = dirichletNodes[0][levelGrid0][j]; totalDirichletNodes[toplevel-colevel][j] = dirichletNodes[0][levelGrid0][j];
for (int j=0; j<dirichletNodes[1][levelGrid1].size(); j++) for (size_t j=0; j<dirichletNodes[1][levelGrid1].size(); j++)
totalDirichletNodes[toplevel-colevel][offset + j] = dirichletNodes[1][levelGrid1][j]; totalDirichletNodes[toplevel-colevel][offset + j] = dirichletNodes[1][levelGrid1][j];
} }
...@@ -276,9 +276,7 @@ int main(int argc, char *argv[]) try ...@@ -276,9 +276,7 @@ int main(int argc, char *argv[]) try
// read solver settings // read solver settings
const int maxLevel = parameterSet.get("maxLevel", int(0)); const int maxLevel = parameterSet.get("maxLevel", int(0));
const int numIt = parameterSet.get("numIt", int(0)); const int numIt = parameterSet.get("numIt", int(0));
const int baseIt = parameterSet.get("baseIt", int(0));
const double tolerance = parameterSet.get("tolerance", double(0)); const double tolerance = parameterSet.get("tolerance", double(0));
const double baseTolerance = parameterSet.get("baseTolerance", double(0));
const double refinementFraction = parameterSet.get("refinementFraction", double(1)); const double refinementFraction = parameterSet.get("refinementFraction", double(1));
const bool paramBoundaries = parameterSet.get("paramBoundaries", int(0)); const bool paramBoundaries = parameterSet.get("paramBoundaries", int(0));
...@@ -342,7 +340,7 @@ int main(int argc, char *argv[]) try ...@@ -342,7 +340,7 @@ int main(int argc, char *argv[]) try
// refine uniformly until minlevel // refine uniformly until minlevel
// ///////////////////////////////////////////////////// // /////////////////////////////////////////////////////
for (int i=0; i<maxLevel; i++) { for (int i=0; i<maxLevel; i++) {
for (int j=0; j<uniformGrid.size(); j++) { for (size_t j=0; j<uniformGrid.size(); j++) {
uniformGrid[j].globalRefine(1); uniformGrid[j].globalRefine(1);
if (paramBoundaries) if (paramBoundaries)
...@@ -430,7 +428,7 @@ int main(int argc, char *argv[]) try ...@@ -430,7 +428,7 @@ int main(int argc, char *argv[]) try
array<LeafBoundary,2> dirichletBoundary; array<LeafBoundary,2> dirichletBoundary;
array<LevelBoundary,2> coarseDirichletBoundary; array<LevelBoundary,2> coarseDirichletBoundary;
for (int j=0; j<adaptiveGrid.size(); j++) { for (size_t j=0; j<adaptiveGrid.size(); j++) {
coarseDirichletBoundary[j].setup(adaptiveGrid[j].levelGridView(0), coarseDirichletNodes[j]); coarseDirichletBoundary[j].setup(adaptiveGrid[j].levelGridView(0), coarseDirichletNodes[j]);
dirichletBoundary[j].setup(adaptiveGrid[j].leafGridView()); dirichletBoundary[j].setup(adaptiveGrid[j].leafGridView());
BoundaryPatchProlongator<GridType>::prolong(coarseDirichletBoundary[j], dirichletBoundary[j]); BoundaryPatchProlongator<GridType>::prolong(coarseDirichletBoundary[j], dirichletBoundary[j]);
...@@ -474,7 +472,7 @@ int main(int argc, char *argv[]) try ...@@ -474,7 +472,7 @@ int main(int argc, char *argv[]) try
adaptiveGridVector[1] = &adaptiveGrid[1]; adaptiveGridVector[1] = &adaptiveGrid[1];
FractionalMarkingStrategy<GridType>::mark(refinementIndicator, adaptiveGridVector, refinementFraction); FractionalMarkingStrategy<GridType>::mark(refinementIndicator, adaptiveGridVector, refinementFraction);
for (int j=0; j<adaptiveGrid.size(); j++) { for (size_t j=0; j<adaptiveGrid.size(); j++) {
P1Basis p1Basis(adaptiveGrid[j].leafGridView()); P1Basis p1Basis(adaptiveGrid[j].leafGridView());
GridFunctionAdaptor<P1Basis> adaptor(p1Basis,true,true); GridFunctionAdaptor<P1Basis> adaptor(p1Basis,true,true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment