20 #ifndef __NONLINEAR_VARIATIONAL_PROBLEM_H 21 #define __NONLINEAR_VARIATIONAL_PROBLEM_H 25 #include <dolfin/common/Hierarchical.h> 55 std::shared_ptr<Function> u,
56 std::vector<std::shared_ptr<const DirichletBC>>
bcs,
57 std::shared_ptr<const Form> J=
nullptr);
63 void set_bounds(std::shared_ptr<const GenericVector> lb,
64 std::shared_ptr<const GenericVector> ub);
73 std::shared_ptr<Function>
solution();
76 std::shared_ptr<const Function>
solution()
const;
79 std::vector<std::shared_ptr<const DirichletBC>>
bcs()
const;
82 std::shared_ptr<const FunctionSpace>
trial_space()
const;
85 std::shared_ptr<const FunctionSpace>
test_space()
const;
88 std::shared_ptr<const GenericVector>
lower_bound()
const;
91 std::shared_ptr<const GenericVector>
upper_bound()
const;
105 void check_forms()
const;
108 std::shared_ptr<const Form> _residual;
111 std::shared_ptr<const Form> _jacobian;
114 std::shared_ptr<Function> _u;
117 std::vector<std::shared_ptr<const DirichletBC>> _bcs;
121 std::shared_ptr<const GenericVector> _lb;
122 std::shared_ptr<const GenericVector> _ub;
Definition: Hierarchical.h:43
std::shared_ptr< const FunctionSpace > trial_space() const
Return trial space.
Definition: NonlinearVariationalProblem.cpp:85
std::vector< std::shared_ptr< const DirichletBC > > bcs() const
Return boundary conditions.
Definition: NonlinearVariationalProblem.cpp:79
std::shared_ptr< const Form > jacobian_form() const
Return Jacobian form.
Definition: NonlinearVariationalProblem.cpp:63
bool has_lower_bound() const
Check whether lower bound has been defined.
Definition: NonlinearVariationalProblem.cpp:117
Definition: NonlinearVariationalProblem.h:45
std::shared_ptr< Function > solution()
Return solution variable.
Definition: NonlinearVariationalProblem.cpp:68
bool has_jacobian() const
Check whether Jacobian has been defined.
Definition: NonlinearVariationalProblem.cpp:112
std::shared_ptr< const GenericVector > lower_bound() const
Return lower bound.
Definition: NonlinearVariationalProblem.cpp:99
Definition: Function.h:65
void set_bounds(const Function &lb_func, const Function &ub_func)
Set the bounds for bound constrained solver.
Definition: NonlinearVariationalProblem.cpp:42
bool has_upper_bound() const
Check whether upper bound have has defined.
Definition: NonlinearVariationalProblem.cpp:122
NonlinearVariationalProblem(std::shared_ptr< const Form > F, std::shared_ptr< Function > u, std::vector< std::shared_ptr< const DirichletBC >> bcs, std::shared_ptr< const Form > J=nullptr)
Definition: NonlinearVariationalProblem.cpp:30
std::shared_ptr< const Form > residual_form() const
Return residual form.
Definition: NonlinearVariationalProblem.cpp:58
std::shared_ptr< const GenericVector > upper_bound() const
Return upper bound.
Definition: NonlinearVariationalProblem.cpp:106
std::shared_ptr< const FunctionSpace > test_space() const
Return test space.
Definition: NonlinearVariationalProblem.cpp:92