mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
Make number of iterations, prolongation factor, and number of smoothing adjustable
This commit is contained in:
parent
6de11bb38e
commit
74ec1b66ec
@ -96,8 +96,10 @@ int main(int varnum, char** vararg) {
|
||||
|
||||
options.insert(make_pair("linsolver_tolerance", "1e-8")); // residual tolerance for linear solver
|
||||
options.insert(make_pair("linsolver_verbosity", "0")); // verbosity level for linear solver
|
||||
options.insert(make_pair("linsolver_max_iterations", "0")); // Maximum number of iterations allow, specify 0 for default
|
||||
options.insert(make_pair("linsolver_prolongate_factor", "1.6")); // Factor to scale the prolongate coarse grid correction
|
||||
options.insert(make_pair("linsolver_type", "1")); // type of linear solver: 0 = ILU/BiCGStab, 1 = AMG/CG
|
||||
|
||||
options.insert(make_pair("linsolver_smooth_steps", "2")); // Number of pre and postsmoothing steps for AMG
|
||||
|
||||
// Parse options from command line
|
||||
int eclipseindex = 1; // Index for the eclipsefile in the command line options
|
||||
|
@ -192,6 +192,9 @@ int main(int argc, char** argv)
|
||||
double linsolver_tolerance = param.getDefault("residual_tolerance", 1e-8);
|
||||
int linsolver_verbosity = param.getDefault("linsolver_verbosity", 0);
|
||||
int linsolver_type = param.getDefault("linsolver_type", 1);
|
||||
int linsolver_maxit = param.getDefault("linsolver_max_iterations", 0);
|
||||
int linsolver_smooth_steps = param.getDefault("linsolver_smooth_steps", 2);
|
||||
double linsolver_prolongate_factor = param.getDefault("linsolver_prolongate_factor", 1.6);
|
||||
std::string bc=param.getDefault<std::string>("bc","fixed");
|
||||
double gravity = param.getDefault("gravity", 0);
|
||||
double surfaceTension = param.getDefault("surfaceTension", 11);
|
||||
@ -272,7 +275,8 @@ int main(int argc, char** argv)
|
||||
}
|
||||
Dune::SinglePhaseUpscaler spupscaler; // needed to access porosities and cell volumes
|
||||
spupscaler.init(eclparser, Dune::SinglePhaseUpscaler::Fixed,
|
||||
0.0,0.0, linsolver_tolerance, linsolver_verbosity, linsolver_type, false);
|
||||
0.0,0.0, linsolver_tolerance, linsolver_verbosity, linsolver_type, false, linsolver_maxit,
|
||||
linsolver_prolongate_factor, linsolver_smooth_steps);
|
||||
std::vector<double> cellPoreVolumes;
|
||||
cellPoreVolumes.resize(satnums.size(), 0.0);
|
||||
double swirvolume = 0.0;
|
||||
@ -390,7 +394,7 @@ int main(int argc, char** argv)
|
||||
outputtmp << "#" << std::endl;
|
||||
outputtmp << "# Rock list: " << rock_list << std::endl;
|
||||
outputtmp << "# with the following rock files: " << std::endl;
|
||||
for (int ridx=0; ridx<rockfiles.size(); ++ridx) {
|
||||
for (std::size_t ridx=0; ridx<rockfiles.size(); ++ridx) {
|
||||
outputtmp << "# " << rockfiles[ridx] << std::endl;
|
||||
}
|
||||
outputtmp << "#" << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user