30 #ifndef NEW_MUMPS_SOLVER_HEADER
31 #define NEW_MUMPS_SOLVER_HEADER
36 #include <oomph-lib-config.h>
46 #include <mumps_c_types.h>
52 #define ICNTL(i) icntl[(i)-1]
53 #define INFOG(i) infog[(i)-1]
54 #define INFO(i) info[(i)-1]
359 oomph_info <<
"Setting up Mumps (exact) preconditioner" << std::endl;
363 if (dist_matrix_pt != 0)
371 std::ostringstream error_message_stream;
373 <<
"NewMumpsPreconditioner can only be applied to matrices derived \n"
374 <<
"DistributableLinearAlgebraObject.\n";
376 OOMPH_CURRENT_FUNCTION,
377 OOMPH_EXCEPTION_LOCATION);
Base class for any linear algebra object that is distributable. Just contains storage for the LinearA...
LinearAlgebraDistribution * distribution_pt() const
access to the LinearAlgebraDistribution
void build_distribution(const LinearAlgebraDistribution *const dist_pt)
setup the distribution of this distributable linear algebra object
Abstract base class for matrices of doubles – adds abstract interfaces for solving,...
A vector in the mathematical sense, initially developed for linear algebra type applications....
Describes the distribution of a distributable linear algebra type object. Typically this is a contain...
Base class for all linear solvers. This merely defines standard interfaces for linear solvers,...
void disable_doc_time()
Disable documentation of solve times.
void enable_doc_time()
Enable documentation of solve times.
virtual void disable_resolve()
Disable resolve (i.e. store matrix and/or LU decomposition, say) This function simply resets an inter...
double Jacobian_setup_time
Jacobian setup time.
DMUMPS_STRUC_C * Mumps_struc_pt
Pointer to MUMPS struct that contains the solver data.
void enable_suppress_warning_about_MPI_COMM_WORLD()
Set boolean to suppress warning about communicator not equal to MPI_COMM_WORLD.
~MumpsSolver()
Destructor: Cleanup.
void enable_doc_stats()
Enable documentation of statistics.
void use_metis_ordering()
unsigned Jacobian_ordering_flag
stores an integer from the public enum which specifies which package (PORD, Metis or SCOTCH) is used ...
void disable_suppress_solve()
Unset the flag so that the system is actually solved again This is the default (obviously)
void use_scotch_ordering()
bool Mumps_is_initialised
Has mumps been initialised?
bool Suppress_warning_about_MPI_COMM_WORLD
Boolean to suppress warning about communicator not equal to MPI_COMM_WORLD.
void disable_delete_matrix_data()
Unset Delete_matrix_data flag. MumpsSolver needs its own copy of the input matrix,...
virtual double linear_solver_solution_time()
Return the time taken to solve the linear system (needs to be overloaded for each linear solver)
void shutdown_mumps()
Shutdown mumps.
MumpsJacobianOrderingFlags
ordering library to use for serial analysis; magic numbers as defined by MUMPS documentation
double Solution_time
Solution time.
void declare_jacobian_is_symmetric()
Tell MUMPS that the Jacobian matrix is general symmetric.
unsigned Workspace_scaling_factor
void resolve(const DoubleVector &rhs, DoubleVector &result)
Resolve the system defined by the last assembled Jacobian and the specified rhs vector if resolve has...
bool Suppress_solve
Suppress solve?
MumpsSolver(const MumpsSolver &dummy)=delete
Broken copy constructor.
bool Delete_matrix_data
Delete_matrix_data flag. MumpsSolver needs its own copy of the input matrix, therefore a copy must be...
void operator=(const MumpsSolver &)=delete
Broken assignment operator.
bool Doc_stats
Set to true for MumpsSolver to output statistics (false by default).
void disable_doc_stats()
Disable documentation of statistics.
void backsub(const DoubleVector &rhs, DoubleVector &result)
Do the backsubstitution for mumps solver Note: returns the global result Vector.
Vector< int > Irn_loc
Vector for row numbers.
void enable_suppress_mumps_info_during_solve()
Set boolean to suppress info being printed to screen during MUMPS solve.
static bool Suppress_incorrect_rhs_distribution_warning_in_resolve
Static flag that determines whether the warning about incorrect distribution of RHSs will be printed ...
void enable_suppress_solve()
Set the flag to avoid solution of the system, so just assemble the Jacobian and the rhs....
unsigned Jacobian_symmetry_flag
symmetry of the Jacobian matrix we're solving; takes one of the enum values above
void disable_resolve()
Overload disable resolve so that it cleans up memory too.
MumpsSolver()
Constructor: Call setup.
bool Suppress_mumps_info_during_solve
Boolean to suppress info being printed to screen during MUMPS solve.
static int Default_workspace_scaling_factor
Default factor for workspace – static so it can be overwritten globally.
void disable_suppress_mumps_info_during_solve()
Don't suppress info being printed to screen during MUMPS solve.
void clean_up_memory()
Clean up the memory allocated by the mumps solver.
void disable_suppress_warning_about_MPI_COMM_WORLD()
Don't suppress warning about communicator not equal to MPI_COMM_WORLD.
void solve(Problem *const &problem_pt, DoubleVector &result)
Solver: Takes pointer to problem and returns the results Vector which contains the solution of the li...
void initialise_mumps()
Initialise instance of mumps data structure.
double jacobian_setup_time()
Returns the time taken to assemble the Jacobian matrix and residual vector.
void factorise(DoubleMatrixBase *const &matrix_pt)
Do the factorisation stage Note: if Delete_matrix_data is true the function matrix_pt->clean_up_memor...
void declare_jacobian_is_symmetric_positive_definite()
Tell MUMPS that the Jacobian matrix is symmetric positive-definite.
MumpsJacobianSymmetryFlags
values of the SYM variable used by the MUMPS solver which dictates the symmetry properties of the Jac...
@ Symmetric_positive_definite
void declare_jacobian_is_unsymmetric()
Tell MUMPS that the Jacobian matrix is unsymmetric.
void enable_delete_matrix_data()
Set Delete_matrix_data flag. MumpsSolver needs its own copy of the input matrix, therefore a copy mus...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
void operator=(const NewMumpsPreconditioner &)=delete
Broken assignment operator.
void enable_doc_time()
Enable documentation of timings.
void setup()
Function to set up a preconditioner for the linear system defined by matrix_pt. This function must be...
void clean_up_memory()
Clean up memory – forward the call to the version in Mumps in its LinearSolver incarnation.
void preconditioner_solve(const DoubleVector &r, DoubleVector &z)
Function applies Mumps to vector r for (exact) preconditioning, this requires a call to setup(....
void disable_doc_time()
Disable the documentation of timings.
NewMumpsPreconditioner(const NewMumpsPreconditioner &)=delete
Broken copy constructor.
MumpsSolver Solver
the Mumps solver emplyed by this preconditioner
NewMumpsPreconditioner()
Constructor.
~NewMumpsPreconditioner()
Destructor.
An OomphLibError object which should be thrown when an run-time error is encountered....
Preconditioner base class. Gives an interface to call all other preconditioners through and stores th...
virtual DoubleMatrixBase * matrix_pt() const
Get function for matrix pointer.
////////////////////////////////////////////////////////////////// //////////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
OomphInfo oomph_info
Single (global) instantiation of the OomphInfo object – this is used throughout the library as a "rep...