18 #ifndef __DOLFIN_PETSC_OPTIONS_H 19 #define __DOLFIN_PETSC_OPTIONS_H 24 #include <boost/lexical_cast.hpp> 26 #include <dolfin/common/SubSystemsManager.h> 27 #include <dolfin/log/log.h> 28 #include "PETScObject.h" 46 static void set(std::string option);
49 static void set(std::string option,
bool value);
52 static void set(std::string option,
int value);
55 static void set(std::string option,
double value);
58 static void set(std::string option, std::string value);
62 static void set(std::string option,
const T value)
67 option =
'-' + option;
70 ierr = PetscOptionsSetValue(NULL, option.c_str(),
71 boost::lexical_cast<std::string>(value).c_str());
77 static void clear(std::string option);
static void init_petsc()
Initialize PETSc without command-line arguments.
Definition: SubSystemsManager.cpp:125
Definition: PETScOptions.h:41
static void petsc_error(int error_code, std::string filename, std::string petsc_function)
Print error message for PETSc calls that return an error.
Definition: PETScObject.cpp:29
static void clear()
Clear PETSc global options database.
Definition: PETScOptions.cpp:63