https://mooseframework.inl.gov
QuadraticMinimize.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "OptimizationReporter.h"
13 
20 {
21 public:
24 
25  virtual Real computeObjective() override;
26  virtual void computeGradient(libMesh::PetscVector<Number> & gradient) const override;
27 
28 private:
30  const Real & _result;
31 
33  const std::vector<Real> & _solution;
34 };
Computes gradient and contains reporters for communicating between optimizeSolve and subapps...
const Real & _result
Input objective function value.
static InputParameters validParams()
virtual Real computeObjective() override
Function to compute objective.
const std::vector< Real > & _solution
Desired solution to optimization.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
This form function simply represents a quadratic objective function: f(x) = val + {i=1}^N (x_i - a_i)...
virtual void computeGradient(libMesh::PetscVector< Number > &gradient) const override
Function to compute gradient.
QuadraticMinimize(const InputParameters &parameters)