Merge pull request #376 from rolk/376_warn

Quelch needless warnings (found by Clang)
This commit is contained in:
Atgeirr Flø Rasmussen 2013-09-19 05:05:00 -07:00
commit df8981ed2d
2 changed files with 13 additions and 7 deletions

View File

@ -249,13 +249,16 @@ namespace Opm
template<typename C> template<typename C>
void setUpCriterion(C& criterion, double linsolver_prolongate_factor, void setUpCriterion(C& criterion, double linsolver_prolongate_factor,
int verbosity) int verbosity, std::size_t linsolver_smooth_steps)
{ {
criterion.setDebugLevel(verbosity); criterion.setDebugLevel(verbosity);
#if ANISOTROPIC_3D #if ANISOTROPIC_3D
criterion.setDefaultValuesAnisotropic(3, 2); criterion.setDefaultValuesAnisotropic(3, 2);
#endif #endif
criterion.setProlongationDampingFactor(linsolver_prolongate_factor); criterion.setProlongationDampingFactor(linsolver_prolongate_factor);
criterion.setNoPreSmoothSteps(linsolver_smooth_steps);
criterion.setNoPostSmoothSteps(linsolver_smooth_steps);
criterion.setGamma(1); // V-cycle; this is the default
} }
LinearSolverInterface::LinearSolverReport LinearSolverInterface::LinearSolverReport
@ -288,9 +291,9 @@ namespace Opm
Criterion criterion; Criterion criterion;
Precond::SmootherArgs smootherArgs; Precond::SmootherArgs smootherArgs;
Operator opA(A); Operator opA(A);
setUpCriterion(criterion, linsolver_prolongate_factor, verbosity); setUpCriterion(criterion, linsolver_prolongate_factor, verbosity,
Precond precond(opA, criterion, smootherArgs, 1, linsolver_smooth_steps,
linsolver_smooth_steps); linsolver_smooth_steps);
Precond precond(opA, criterion, smootherArgs);
// Construct linear solver. // Construct linear solver.
Dune::CGSolver<Vector> linsolve(opA, precond, tolerance, maxit, verbosity); Dune::CGSolver<Vector> linsolve(opA, precond, tolerance, maxit, verbosity);
@ -339,9 +342,9 @@ namespace Opm
Operator opA(A); Operator opA(A);
Precond::SmootherArgs smootherArgs; Precond::SmootherArgs smootherArgs;
Criterion criterion; Criterion criterion;
setUpCriterion(criterion, linsolver_prolongate_factor, verbosity); setUpCriterion(criterion, linsolver_prolongate_factor, verbosity,
Precond precond(opA, criterion, smootherArgs, 1, linsolver_smooth_steps,
linsolver_smooth_steps); linsolver_smooth_steps);
Precond precond(opA, criterion, smootherArgs);
// Construct linear solver. // Construct linear solver.
Dune::GeneralizedPCGSolver<Vector> linsolve(opA, precond, tolerance, maxit, verbosity); Dune::GeneralizedPCGSolver<Vector> linsolve(opA, precond, tolerance, maxit, verbosity);

View File

@ -40,6 +40,8 @@ namespace Opm
namespace namespace
{ {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
// Find the cells that are below and above a depth. // Find the cells that are below and above a depth.
// TODO: add 'anitialiasing', obtaining a more precise split // TODO: add 'anitialiasing', obtaining a more precise split
// by f. ex. subdividing cells cut by the split depths. // by f. ex. subdividing cells cut by the split depths.
@ -61,6 +63,7 @@ namespace Opm
} }
} }
} }
#pragma clang diagnostic pop
enum WaterInit { WaterBelow, WaterAbove }; enum WaterInit { WaterBelow, WaterAbove };