Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
SamplerInterface.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 
10 #include "SamplerInterface.h"
11 #include "Sampler.h"
12 #include "SubProblem.h"
13 #include "MooseTypes.h"
14 
17 {
18  return emptyInputParameters();
19 }
20 
22  : _si_params(moose_object->parameters()),
23  _si_feproblem(*_si_params.get<FEProblemBase *>("_fe_problem_base")),
24  _si_tid(_si_params.have_parameter<THREAD_ID>("_tid") ? _si_params.get<THREAD_ID>("_tid") : 0)
25 {
26 }
27 
28 template <>
29 Sampler &
30 SamplerInterface::getSampler(const std::string & name)
31 {
32  return _si_feproblem.getSampler(_si_params.get<SamplerName>(name));
33 }
34 
35 template <>
36 Sampler &
37 SamplerInterface::getSamplerByName(const SamplerName & name)
38 {
40 }
std::string name(const ElemQuality q)
FEProblemBase & _si_feproblem
Reference to FEProblemBase instance.
T & getSamplerByName(const SamplerName &name)
Get a sampler with a given name.
This is the base class for Samplers as used within the Stochastic Tools module.
Definition: Sampler.h:43
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
static InputParameters validParams()
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Definition: MooseUtils.h:1122
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
InputParameters emptyInputParameters()
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
const InputParameters & _si_params
Parameters of the object with this interface.
T & getSampler(const std::string &name)
Get a sampler with a given name.
SamplerInterface(const MooseObject *moose_object)
THREAD_ID _si_tid
Thread ID.
virtual Sampler & getSampler(const std::string &name, const THREAD_ID tid=0)
unsigned int THREAD_ID
Definition: MooseTypes.h:209