https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ConditionalSampleReporter.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
13#include "FunctionParserUtils.h"
14
15// Forward declaration
16template <typename T>
18
19// Typedef for object registration
21
29template <typename T>
31 public FunctionParserUtils<false>
32{
33public:
36
37protected:
43 virtual bool needSample(const std::vector<Real> & row,
44 dof_id_type local_ind,
45 dof_id_type global_ind,
46 T & val) override;
47
48private:
50 const std::string & _function;
55 const std::vector<std::pair<std::string, unsigned int>> _sampler_vars;
57 const bool _use_time;
60};
ConditionalSampleReporterTempl< Real > ConditionalSampleReporter
const double T
This is a base class for performing active learning routines, meant to be used in conjunction with Sa...
This object is mainly meant for demonstration for eventual active learning algorithms,...
const T & _default_value
User-inputted default value.
SymFunctionPtr _func_F
Parsed function pointer.
virtual bool needSample(const std::vector< Real > &row, dof_id_type local_ind, dof_id_type global_ind, T &val) override
This evaluates the inputted function to determine whether a multiapp solve is necessary/allowed,...
const std::string & _function
User-inputted function string.
const std::vector< std::pair< std::string, unsigned int > > _sampler_vars
Pairs between the variables in the function string and their associated sampler column index.
const bool _use_time
Whether or not the function string includes a time variable.
std::shared_ptr< SymFunction > SymFunctionPtr
const InputParameters & parameters() const