https://mooseframework.inl.gov
OptimizationFunctionInnerProductHelper.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 // Standard library
13 #include <vector>
14 #include <memory>
15 
16 // MOOSE includes
17 #include "MooseTypes.h"
18 
19 // Forward Declarations
20 class FEProblemBase;
22 class InputParameters;
23 
25 {
26 public:
29 
30 protected:
39  void setCurrentTime(Real time, Real dt);
40 
49  void update(const Point & q_point, Real q_inner_product);
50 
55  void add(const OptimizationFunctionInnerProductHelper & other);
56 
61  void getVector(std::vector<Real> & result);
62 
63 private:
66 
69 
76 
78  std::vector<std::pair<Real, std::vector<Real>>> _time_ip;
80  std::vector<Real> * _curr_time_ip = nullptr;
81 };
std::vector< std::pair< Real, std::vector< Real > > > _time_ip
Vector holding data for each time.
void update(const Point &q_point, Real q_inner_product)
Accumulates integration for inner product by multiplying the given value by the function&#39;s parameterG...
void setCurrentTime(Real time, Real dt)
This function sets up member variables for the inner product accumulation at certain time...
void add(const OptimizationFunctionInnerProductHelper &other)
Accumulates inner product integration in _curr_time_ip vector from another object.
std::vector< Real > * _curr_time_ip
Vector for current time.
const OptimizationFunction *const _function
Function used in optimization.
FEProblemBase & _ip_problem
FEProblem used for getting system quantities.
const Real & _reverse_time_end
The final time when we want to reverse the time index in function evaluation.
OptimizationFunctionInnerProductHelper(const InputParameters &parameters)
void getVector(std::vector< Real > &result)
Gathers _curr_time_ip from other processors and performs time integration.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _actual_time
Time the actual problem is at, defined by _reverse_time_end.
Base class for functions used in inverse optimization The parameterDerivative function is used in adj...