NonlinearProblem
-
class NonlinearProblem : public godzilla::Problem, public godzilla::RestartInterface
Nonlinear problem.
Subclassed by godzilla::ExplicitDGLinearProblem, godzilla::ExplicitFVLinearProblem, godzilla::FENonlinearProblem
Public Functions
-
virtual void create() override
Called to construct the object.
-
virtual void run() override
Run the problem.
-
virtual void write_restart_file(RestartFile &file) const override
Write restart file.
- Parameters:
file – File to write restart data to
-
virtual void read_restart_file(const RestartFile &file) override
Read restart file.
- Parameters:
file – File to read restart data from
-
KrylovSolver get_ksp() const
Get underlying KSP.
-
void set_ksp_operators(const Matrix &A, const Matrix &B)
Set KSP operators.
-
const Matrix &get_jacobian() const
Get Jacobian matrix.
-
bool converged()
true if solve converged, otherwise false
-
void set_use_matrix_free(bool mf_operator, bool mf)
Use matrix free finite difference matrix vector products to apply the Jacobian.
- Parameters:
mf_operator – use matrix-free only the A matrix
mf – use matrix-free for both the A and P matrices
-
virtual void pre_solve()
Called before the solve.
-
void solve()
Solve the problem.
-
virtual void post_solve()
Called after the solve.
-
virtual void create() override