https://mooseframework.inl.gov
ElementOptimizationReactionFunctionInnerProduct.C
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 
11 
13 
16 {
18  params.addClassDescription(
19  "Compute the gradient for reaction material inversion by taking the inner product of the "
20  "forward and adjoint variables multiplied by the derivative of the optimization function "
21  "with respect to the controllable parameters.");
22 
23  params.addRequiredCoupledVar("forward_variable", "Variable from the forward solution");
24  return params;
25 }
26 
28  const InputParameters & parameters)
30  _forward_var(coupledValue("forward_variable"))
31 {
32 }
33 
34 Real
36 {
37  return -_var[_qp] * _forward_var[_qp];
38 }
const VariableValue & _var
Quadrature point values of coupled MOOSE variables.
virtual Real computeQpInnerProduct() override
Used to compute the inner product at a certain quadrature point.
registerMooseObject("OptimizationApp", ElementOptimizationReactionFunctionInnerProduct)
Compute the gradient for reaction material inversion by taking the inner product of the forward and a...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const VariableValue & _forward_var
Holds forward solution variable at the current quadrature points.