![]() |
MFEM v4.9.0
Finite element discretization library
|
#include <solvers.hpp>
Public Member Functions | |
| OptimizationProblem (int insize, const Operator *C_, const Operator *D_) | |
| In parallel, insize is the number of the local true dofs. | |
| virtual real_t | CalcObjective (const Vector &x) const =0 |
| Objective F(x). In parallel, the result should be reduced over tasks. | |
| virtual void | CalcObjectiveGrad (const Vector &x, Vector &grad) const |
| The result grad is expected to enter with the correct size. | |
| void | SetEqualityConstraint (const Vector &c) |
| void | SetInequalityConstraint (const Vector &dl, const Vector &dh) |
| void | SetSolutionBounds (const Vector &xl, const Vector &xh) |
| const Operator * | GetC () const |
| const Operator * | GetD () const |
| const Vector * | GetEqualityVec () const |
| const Vector * | GetInequalityVec_Lo () const |
| const Vector * | GetInequalityVec_Hi () const |
| const Vector * | GetBoundsVec_Lo () const |
| const Vector * | GetBoundsVec_Hi () const |
| int | GetNumConstraints () const |
Public Attributes | |
| const int | input_size |
Protected Member Functions | |
| bool | NewX () const |
Protected Attributes | |
| const Operator * | C |
| Not owned, some can remain unused (NULL). | |
| const Operator * | D |
| const Vector * | c_e |
| const Vector * | d_lo |
| const Vector * | d_hi |
| const Vector * | x_lo |
| const Vector * | x_hi |
Friends | |
| class | HiopOptimizationProblem |
Defines operators and constraints for the following optimization problem:
Find x that minimizes the objective function F(x), subject to C(x) = c_e, d_lo <= D(x) <= d_hi, x_lo <= x <= x_hi.
The operators F, C, D must take input of the same size (same width). Gradients of F, C, D might be needed, depending on the OptimizationSolver. When used with Hiop, gradients of C and D must be DenseMatrices. F always returns a scalar value, see CalcObjective(), CalcObjectiveGrad(). C and D can have arbitrary heights. C and D can be NULL, meaning that their constraints are not used.
When used in parallel, all Vectors are assumed to be true dof vectors, and the operators are expected to be defined for tdof vectors.
Definition at line 955 of file solvers.hpp.
| mfem::OptimizationProblem::OptimizationProblem | ( | int | insize, |
| const Operator * | C_, | ||
| const Operator * | D_ ) |
In parallel, insize is the number of the local true dofs.
Definition at line 2571 of file solvers.cpp.
Objective F(x). In parallel, the result should be reduced over tasks.
|
inlinevirtual |
The result grad is expected to enter with the correct size.
Definition at line 985 of file solvers.hpp.
|
inline |
Definition at line 998 of file solvers.hpp.
|
inline |
Definition at line 997 of file solvers.hpp.
|
inline |
Definition at line 992 of file solvers.hpp.
|
inline |
Definition at line 993 of file solvers.hpp.
|
inline |
Definition at line 994 of file solvers.hpp.
|
inline |
Definition at line 996 of file solvers.hpp.
|
inline |
Definition at line 995 of file solvers.hpp.
| int mfem::OptimizationProblem::GetNumConstraints | ( | ) | const |
Definition at line 2607 of file solvers.cpp.
|
inlineprotected |
Implementations of CalcObjective() and CalcObjectiveGrad() can use this method to check if the argument Vector x has been changed after the last call to CalcObjective() or CalcObjectiveGrad(). The result is on by default, and gets set by the OptimizationSolver.
Definition at line 974 of file solvers.hpp.
| void mfem::OptimizationProblem::SetEqualityConstraint | ( | const Vector & | c | ) |
Definition at line 2581 of file solvers.cpp.
Definition at line 2589 of file solvers.cpp.
Definition at line 2599 of file solvers.cpp.
|
friend |
Definition at line 958 of file solvers.hpp.
|
protected |
Not owned, some can remain unused (NULL).
Definition at line 967 of file solvers.hpp.
|
protected |
Definition at line 968 of file solvers.hpp.
|
protected |
Definition at line 967 of file solvers.hpp.
|
protected |
Definition at line 968 of file solvers.hpp.
|
protected |
Definition at line 968 of file solvers.hpp.
| const int mfem::OptimizationProblem::input_size |
Definition at line 977 of file solvers.hpp.
|
protected |
Definition at line 968 of file solvers.hpp.
|
protected |
Definition at line 968 of file solvers.hpp.