Options.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2017 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014 by Centre for Geoscience Computing (GeoComp)
*
*****************************************************************************/
/****************************************************************************/
/* Paso: Options */
/****************************************************************************/
/* Copyrights by ACcESS Australia 2003,2004,2005 */
/* Author: Lutz Gross, l.gross@uq.edu.au */
/****************************************************************************/
#ifndef __PASO_OPTIONS_H__
#define __PASO_OPTIONS_H__
#include "Paso.h"
#include <boost/python/object.hpp>
// valid solver options
#define PASO_DEFAULT 0
#define PASO_DIRECT 1
#define PASO_CHOLEVSKY 2
#define PASO_PCG 3
#define PASO_CR 4
#define PASO_CGS 5
#define PASO_BICGSTAB 6
#define PASO_ILU0 8
#define PASO_ILUT 9
#define PASO_JACOBI 10
#define PASO_GMRES 11
#define PASO_PRES20 12
#define PASO_MKL 15
#define PASO_UMFPACK 16
#define PASO_NO_REORDERING 17
#define PASO_MINIMUM_FILL_IN 18
#define PASO_NESTED_DISSECTION 19
#define PASO_ITERATIVE 20
#define PASO_PASO 21
#define PASO_AMG 22
#define PASO_REC_ILU 23
#define PASO_TRILINOS 24
#define PASO_NONLINEAR_GMRES 25
#define PASO_TFQMR 26
#define PASO_MINRES 27
#define PASO_GAUSS_SEIDEL 28
#define PASO_GS PASO_GAUSS_SEIDEL
#define PASO_RILU 29
#define PASO_DEFAULT_REORDERING 30
#define PASO_YAIR_SHAPIRA_COARSENING 33
#define PASO_RUGE_STUEBEN_COARSENING 34
#define PASO_AGGREGATION_COARSENING 35
#define PASO_NO_PRECONDITIONER 36
#define PASO_AMLI 38
#define PASO_STANDARD_COARSENING 39
#define PASO_CLASSIC_INTERPOLATION_WITH_FF_COUPLING 50
#define PASO_CLASSIC_INTERPOLATION 51
#define PASO_DIRECT_INTERPOLATION 52
#define PASO_BOOMERAMG 60
#define PASO_CIJP_FIXED_RANDOM_COARSENING 61
#define PASO_CIJP_COARSENING 62
#define PASO_FALGOUT_COARSENING 63
#define PASO_PMIS_COARSENING 64
#define PASO_HMIS_COARSENING 65
#define PASO_LINEAR_CRANK_NICOLSON 66
#define PASO_CRANK_NICOLSON 67
#define PASO_BACKWARD_EULER 68
#define PASO_SMOOTHER 99999999
namespace paso {
struct Options
{
Options() { setDefaults(); }
Options(const boost::python::object& options);
void setDefaults();
void show() const;
void showDiagnostics() const;
void updateEscriptDiagnostics(boost::python::object& options) const;
static int mapEscriptOption(int escriptOption);
static const char* name(int key);
static int getPackage(int solver, int package, bool symmetry,
const escript::JMPI& mpi_info);
static int getSolver(int solver, int package, bool symmetry,
const escript::JMPI& mpi_info);
int method;
int package;
bool symmetric;
double tolerance;
double absolute_tolerance;
double inner_tolerance;
bool adapt_inner_tolerance;
bool verbose;
bool reordering;
int preconditioner;
dim_t iter_max;
dim_t inner_iter_max;
double drop_tolerance;
double drop_storage;
index_t truncation;
index_t restart;
int sweeps;
int pre_sweeps;
int post_sweeps;
int cycle_type;
int level_max;
dim_t min_coarse_matrix_size;
int smoother;
double coarsening_threshold;
bool accept_failed_convergence;
index_t coarsening_method;
double relaxation_factor;
bool use_local_preconditioner;
double min_coarse_sparsity;
dim_t refinements;
dim_t coarse_matrix_refinements;
double diagonal_dominance_threshold;
bool usePanel;
int interpolation_method;
int ode_solver;
// diagnostic values
dim_t num_iter;
dim_t num_level;
dim_t num_inner_iter;
double time;
double set_up_time;
double coarsening_selection_time;
double coarsening_matrix_time;
double net_time;
double residual_norm;
bool converged;
double preconditioner_size; // in Mbytes
bool time_step_backtracking_used;
double coarse_level_sparsity;
dim_t num_coarse_unknowns;
};
} // namespace paso
#endif // __PASO_OPTIONS_H__
paso::Options::residual_norm
double residual_norm
Definition: Options.h:165
paso::Options::relaxation_factor
double relaxation_factor
Definition: Options.h:146
Paso.h
paso::Options::ode_solver
int ode_solver
Definition: Options.h:154
paso::Options::num_inner_iter
dim_t num_inner_iter
Definition: Options.h:159
paso::Options::min_coarse_sparsity
double min_coarse_sparsity
Definition: Options.h:148
paso::Options::reordering
bool reordering
Definition: Options.h:128
paso::Options::sweeps
int sweeps
Definition: Options.h:136
paso::Options::name
static const char * name(int key)
Definition: Options.cpp:179
paso::Options::symmetric
bool symmetric
Definition: Options.h:122
paso::Options::set_up_time
double set_up_time
Definition: Options.h:161
paso::Options::inner_tolerance
double inner_tolerance
Definition: Options.h:125
paso::Options
Definition: Options.h:89
paso::Options::coarse_level_sparsity
double coarse_level_sparsity
Definition: Options.h:169
paso::Options::updateEscriptDiagnostics
void updateEscriptDiagnostics(boost::python::object &options) const
updates SolverBuddy diagnostics from this
Definition: Options.cpp:515
paso::Options::converged
bool converged
Definition: Options.h:166
paso::Options::use_local_preconditioner
bool use_local_preconditioner
Definition: Options.h:147
paso::Options::post_sweeps
int post_sweeps
Definition: Options.h:138
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:71
paso::Options::coarsening_selection_time
double coarsening_selection_time
Definition: Options.h:162
paso::Options::inner_iter_max
dim_t inner_iter_max
Definition: Options.h:131
paso::Options::coarse_matrix_refinements
dim_t coarse_matrix_refinements
Definition: Options.h:150
paso::Options::restart
index_t restart
Definition: Options.h:135
paso::Options::drop_tolerance
double drop_tolerance
Definition: Options.h:132
paso::Options::preconditioner
int preconditioner
Definition: Options.h:129
paso::Options::usePanel
bool usePanel
Definition: Options.h:152
paso::Options::num_level
dim_t num_level
Definition: Options.h:158
paso::Options::interpolation_method
int interpolation_method
Definition: Options.h:153
paso::Options::absolute_tolerance
double absolute_tolerance
Definition: Options.h:124
paso
Definition: AMG.cpp:45
paso::Options::preconditioner_size
double preconditioner_size
Definition: Options.h:167
paso::Options::pre_sweeps
int pre_sweeps
Definition: Options.h:137
paso::Options::package
int package
Definition: Options.h:121
paso::Options::diagonal_dominance_threshold
double diagonal_dominance_threshold
Definition: Options.h:151
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:59
paso::Options::min_coarse_matrix_size
dim_t min_coarse_matrix_size
Definition: Options.h:141
paso::Options::num_iter
dim_t num_iter
Definition: Options.h:157
paso::Options::coarsening_matrix_time
double coarsening_matrix_time
Definition: Options.h:163
paso::Options::accept_failed_convergence
bool accept_failed_convergence
Definition: Options.h:144
paso::Options::cycle_type
int cycle_type
Definition: Options.h:139
paso::Options::tolerance
double tolerance
Definition: Options.h:123
paso::Options::showDiagnostics
void showDiagnostics() const
prints diagnostic data
Definition: Options.cpp:127
paso::Options::time_step_backtracking_used
bool time_step_backtracking_used
Definition: Options.h:168
paso::Options::num_coarse_unknowns
dim_t num_coarse_unknowns
Definition: Options.h:170
paso::Options::show
void show() const
prints current option values
Definition: Options.cpp:144
paso::Options::setDefaults
void setDefaults()
sets the default values for solver options
Definition: Options.cpp:72
paso::Options::Options
Options()
Definition: Options.h:91
paso::Options::getSolver
static int getSolver(int solver, int package, bool symmetry, const escript::JMPI &mpi_info)
returns the solver to be used with given combination
Definition: Options.cpp:273
paso::Options::method
int method
Definition: Options.h:120
paso::Options::getPackage
static int getPackage(int solver, int package, bool symmetry, const escript::JMPI &mpi_info)
Definition: Options.cpp:364
paso::Options::coarsening_threshold
double coarsening_threshold
Definition: Options.h:143
paso::Options::time
double time
Definition: Options.h:160
paso::Options::refinements
dim_t refinements
Definition: Options.h:149
paso::Options::net_time
double net_time
Definition: Options.h:164
paso::Options::truncation
index_t truncation
Definition: Options.h:134
paso::Options::level_max
int level_max
Definition: Options.h:140
paso::Options::drop_storage
double drop_storage
Definition: Options.h:133
paso::Options::mapEscriptOption
static int mapEscriptOption(int escriptOption)
returns the corresponding paso option code for an escript option code
Definition: Options.cpp:404
paso::Options::smoother
int smoother
Definition: Options.h:142
paso::Options::coarsening_method
index_t coarsening_method
Definition: Options.h:145
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:64
paso::Options::adapt_inner_tolerance
bool adapt_inner_tolerance
Definition: Options.h:126
paso::Options::iter_max
dim_t iter_max
Definition: Options.h:130
paso::Options::verbose
bool verbose
Definition: Options.h:127