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