MFEM v4.8.0
Finite element discretization library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
mfem::MMA Class Reference

MMA (Method of Moving Asymptotes) solves an optimization problem of the form: More...

#include <mma.hpp>

Collaboration diagram for mfem::MMA:
[legend]

Public Member Functions

 MMA (int nVar, int nCon, real_t *xval, int iterationNumber=0)
 Serial MMA.
 
 MMA (const int nVar, int nCon, Vector &xval, int iterationNumber=0)
 
 MMA (MPI_Comm comm_, int nVar, int nCon, real_t *xval, int iterationNumber=0)
 
 MMA (MPI_Comm comm_, const int &nVar, const int &nCon, const Vector &xval, int iterationNumber=0)
 
 ~MMA ()
 Destructor.
 
void Update (const Vector &dfdx, const Vector &gx, const Vector &dgdx, const Vector &xmin, const Vector &xmax, Vector &xval)
 
void Update (const Vector &dfdx, const Vector &xmin, const Vector &xmax, Vector &xval)
 Unconstrained.
 
void SetIteration (int iterationNumber)
 
int GetIteration ()
 
void SetPrintLevel (int print_lvl)
 

Protected Attributes

::std::unique_ptr< real_t[]> a
 
::std::unique_ptr< real_t[]> b
 
::std::unique_ptr< real_t[]> c
 
::std::unique_ptr< real_t[]> d
 
real_t a0
 
real_t machineEpsilon
 
real_t epsimin
 
real_t z
 
real_t zet
 
int nCon
 
int nVar
 
int iter = 0
 
int print_level = 1
 
::std::unique_ptr< real_t[]> low
 
::std::unique_ptr< real_t[]> upp
 
::std::unique_ptr< real_t[]> x
 
::std::unique_ptr< real_t[]> y
 
::std::unique_ptr< real_t[]> xsi
 
::std::unique_ptr< real_t[]> eta
 
::std::unique_ptr< real_t[]> lam
 
::std::unique_ptr< real_t[]> mu
 
::std::unique_ptr< real_t[]> s
 

Friends

class MMASubSvanberg
 

Detailed Description

MMA (Method of Moving Asymptotes) solves an optimization problem of the form:

Find x that minimizes the objective function F(x), subject to C(x)_i <= 0, for all i = 1, ... m x_lo <= x <= x_hi.

The objective functions are replaced by convex functions chosen based on gradient information, and solved using a dual method. The unique optimal solution of this subproblem is returned as the next iteration point. Optimality is determined by the KKT conditions.

The "Update" function in MMA advances the optimization and must be called in every optimization iteration. Current and previous iteration points construct the "moving asymptotes". The design variables, objective function, constraints are passed to an approximating subproblem. The design variables are updated and returned. Its implementation closely follows the original formulation of 'Svanberg, K. (2007). MMA and GCMMA-two methods for nonlinear optimization. vol, 1, 1-15.'

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 52 of file mma.hpp.

Constructor & Destructor Documentation

◆ MMA() [1/4]

mfem::MMA::MMA ( int nVar,
int nCon,
real_t * xval,
int iterationNumber = 0 )

Serial MMA.

Serial constructor: nVar - number of design parameters; nCon - number of constraints; xval[nVar] - initial parameter values

Definition at line 975 of file mma.cpp.

◆ MMA() [2/4]

mfem::MMA::MMA ( const int nVar,
int nCon,
Vector & xval,
int iterationNumber = 0 )

Definition at line 991 of file mma.cpp.

◆ MMA() [3/4]

mfem::MMA::MMA ( MPI_Comm comm_,
int nVar,
int nCon,
real_t * xval,
int iterationNumber = 0 )

Parallel constructor: comm_ - communicator

Definition at line 996 of file mma.cpp.

◆ MMA() [4/4]

mfem::MMA::MMA ( MPI_Comm comm_,
const int & nVar,
const int & nCon,
const Vector & xval,
int iterationNumber = 0 )

Definition at line 1022 of file mma.cpp.

◆ ~MMA()

mfem::MMA::~MMA ( )

Destructor.

Definition at line 1028 of file mma.cpp.

Member Function Documentation

◆ GetIteration()

int mfem::MMA::GetIteration ( )
inline

Definition at line 93 of file mma.hpp.

◆ SetIteration()

void mfem::MMA::SetIteration ( int iterationNumber)
inline

Definition at line 92 of file mma.hpp.

◆ SetPrintLevel()

void mfem::MMA::SetPrintLevel ( int print_lvl)
inline

Definition at line 95 of file mma.hpp.

◆ Update() [1/2]

void mfem::MMA::Update ( const Vector & dfdx,
const Vector & gx,
const Vector & dgdx,
const Vector & xmin,
const Vector & xmax,
Vector & xval )

Update the optimization parameters dfdx[nVar] - gradients of the objective gx[nCon] - values of the constraints dgdx[nCon*nVar] - gradients of the constraints ordered constraint by constraint, e.g. {dg0dx0, dg0dx1, ... ,} {dg1dx0, dg1dx1, ... ,} xmin[nVar] - lower bounds xmax[nVar] - upper bounds xval[nVar] - input/output for optimization parameters

Definition at line 1072 of file mma.cpp.

◆ Update() [2/2]

void mfem::MMA::Update ( const Vector & dfdx,
const Vector & xmin,
const Vector & xmax,
Vector & xval )

Unconstrained.

Definition at line 1083 of file mma.cpp.

Friends And Related Symbol Documentation

◆ MMASubSvanberg

friend class MMASubSvanberg
friend

Definition at line 177 of file mma.hpp.

Member Data Documentation

◆ a

::std::unique_ptr<real_t[]> mfem::MMA::a
protected

Definition at line 99 of file mma.hpp.

◆ a0

real_t mfem::MMA::a0
protected

Definition at line 100 of file mma.hpp.

◆ b

::std::unique_ptr<real_t[]> mfem::MMA::b
protected

Definition at line 99 of file mma.hpp.

◆ c

::std::unique_ptr<real_t[]> mfem::MMA::c
protected

Definition at line 99 of file mma.hpp.

◆ d

::std::unique_ptr<real_t[]> mfem::MMA::d
protected

Definition at line 99 of file mma.hpp.

◆ epsimin

real_t mfem::MMA::epsimin
protected

Definition at line 100 of file mma.hpp.

◆ eta

::std::unique_ptr<real_t[]> mfem::MMA::eta
protected

Definition at line 112 of file mma.hpp.

◆ iter

int mfem::MMA::iter = 0
protected

Definition at line 105 of file mma.hpp.

◆ lam

::std::unique_ptr<real_t[]> mfem::MMA::lam
protected

Definition at line 112 of file mma.hpp.

◆ low

::std::unique_ptr<real_t[]> mfem::MMA::low
protected

Definition at line 111 of file mma.hpp.

◆ machineEpsilon

real_t mfem::MMA::machineEpsilon
protected

Definition at line 100 of file mma.hpp.

◆ mu

::std::unique_ptr<real_t[]> mfem::MMA::mu
protected

Definition at line 112 of file mma.hpp.

◆ nCon

int mfem::MMA::nCon
protected

Definition at line 102 of file mma.hpp.

◆ nVar

int mfem::MMA::nVar
protected

Definition at line 102 of file mma.hpp.

◆ print_level

int mfem::MMA::print_level = 1
protected

Definition at line 108 of file mma.hpp.

◆ s

::std::unique_ptr<real_t[]> mfem::MMA::s
protected

Definition at line 112 of file mma.hpp.

◆ upp

::std::unique_ptr<real_t[]> mfem::MMA::upp
protected

Definition at line 111 of file mma.hpp.

◆ x

::std::unique_ptr<real_t[]> mfem::MMA::x
protected

Definition at line 112 of file mma.hpp.

◆ xsi

::std::unique_ptr<real_t[]> mfem::MMA::xsi
protected

Definition at line 112 of file mma.hpp.

◆ y

::std::unique_ptr<real_t[]> mfem::MMA::y
protected

Definition at line 112 of file mma.hpp.

◆ z

real_t mfem::MMA::z
protected

Definition at line 101 of file mma.hpp.

◆ zet

real_t mfem::MMA::zet
protected

Definition at line 101 of file mma.hpp.


The documentation for this class was generated from the following files: