Options.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2020 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-2017 by Centre for Geoscience Computing (GeoComp)
* Development from 2019 by School of Earth and Environmental Sciences
**
*****************************************************************************/
/****************************************************************************/
/* 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_MUMPS 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_NO_PRECONDITIONER 36
#define PASO_CLASSIC_INTERPOLATION_WITH_FF_COUPLING 50
#define PASO_CLASSIC_INTERPOLATION 51
#define PASO_DIRECT_INTERPOLATION 52
#define PASO_LINEAR_CRANK_NICOLSON 66
#define PASO_CRANK_NICOLSON 67
#define PASO_BACKWARD_EULER 68
#define PASO_SMOOTHER 99999999
namespace paso {
struct PASO_DLL_API 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;
bool hermitian;
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;
bool accept_failed_convergence;
double relaxation_factor;
bool use_local_preconditioner;
dim_t refinements;
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.h
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:66
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:61
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:74
paso
Definition: BiCGStab.cpp:25
PASO_DLL_API
#define PASO_DLL_API
Definition: paso/src/system_dep.h:29
paso::Options
Definition: Options.h:80
paso::Options::absolute_tolerance
double absolute_tolerance
Definition: Options.h:115
paso::Options::inner_iter_max
dim_t inner_iter_max
Definition: Options.h:122
paso::Options::reordering
bool reordering
Definition: Options.h:119
paso::Options::num_iter
dim_t num_iter
Definition: Options.h:135
paso::Options::num_inner_iter
dim_t num_inner_iter
Definition: Options.h:137
paso::Options::coarsening_matrix_time
double coarsening_matrix_time
Definition: Options.h:141
paso::Options::Options
Options()
Definition: Options.h:81
paso::Options::iter_max
dim_t iter_max
Definition: Options.h:121
paso::Options::relaxation_factor
double relaxation_factor
Definition: Options.h:129
paso::Options::converged
bool converged
Definition: Options.h:144
paso::Options::adapt_inner_tolerance
bool adapt_inner_tolerance
Definition: Options.h:117
paso::Options::drop_tolerance
double drop_tolerance
Definition: Options.h:123
paso::Options::verbose
bool verbose
Definition: Options.h:118
paso::Options::time_step_backtracking_used
bool time_step_backtracking_used
Definition: Options.h:146
paso::Options::preconditioner
int preconditioner
Definition: Options.h:120
paso::Options::set_up_time
double set_up_time
Definition: Options.h:139
paso::Options::accept_failed_convergence
bool accept_failed_convergence
Definition: Options.h:128
paso::Options::residual_norm
double residual_norm
Definition: Options.h:143
paso::Options::package
int package
Definition: Options.h:111
paso::Options::preconditioner_size
double preconditioner_size
Definition: Options.h:145
paso::Options::net_time
double net_time
Definition: Options.h:142
paso::Options::truncation
index_t truncation
Definition: Options.h:125
paso::Options::inner_tolerance
double inner_tolerance
Definition: Options.h:116
paso::Options::drop_storage
double drop_storage
Definition: Options.h:124
paso::Options::time
double time
Definition: Options.h:138
paso::Options::tolerance
double tolerance
Definition: Options.h:114
paso::Options::method
int method
Definition: Options.h:110
paso::Options::sweeps
int sweeps
Definition: Options.h:127
paso::Options::refinements
dim_t refinements
Definition: Options.h:131
paso::Options::num_coarse_unknowns
dim_t num_coarse_unknowns
Definition: Options.h:148
paso::Options::ode_solver
int ode_solver
Definition: Options.h:132
paso::Options::coarse_level_sparsity
double coarse_level_sparsity
Definition: Options.h:147
paso::Options::use_local_preconditioner
bool use_local_preconditioner
Definition: Options.h:130
paso::Options::symmetric
bool symmetric
Definition: Options.h:112
paso::Options::Options
Options(const boost::python::object &options)
constructor that fills values from an escript SolverBuddy instance
paso::Options::num_level
dim_t num_level
Definition: Options.h:136
paso::Options::coarsening_selection_time
double coarsening_selection_time
Definition: Options.h:140
paso::Options::restart
index_t restart
Definition: Options.h:126
paso::Options::hermitian
bool hermitian
Definition: Options.h:113