Line data Source code
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 : 15 : InputParameters 16 0 : SamplerInterface::validParams() 17 : { 18 0 : return emptyInputParameters(); 19 : } 20 : 21 75223 : SamplerInterface::SamplerInterface(const MooseObject * moose_object) 22 75223 : : _si_params(moose_object->parameters()), 23 75223 : _si_feproblem(*_si_params.get<FEProblemBase *>("_fe_problem_base")), 24 75223 : _si_tid(_si_params.have_parameter<THREAD_ID>("_tid") ? _si_params.get<THREAD_ID>("_tid") : 0) 25 : { 26 75223 : } 27 : 28 : #ifdef MOOSE_KOKKOS_ENABLED 29 7931 : SamplerInterface::SamplerInterface(const SamplerInterface & object, 30 7931 : const Moose::Kokkos::FunctorCopy &) 31 7931 : : _si_params(object._si_params), _si_feproblem(object._si_feproblem), _si_tid(object._si_tid) 32 : { 33 7931 : } 34 : #endif 35 : 36 : template <> 37 : Sampler & 38 266 : SamplerInterface::getSampler(const std::string & name) 39 : { 40 266 : return _si_feproblem.getSampler(_si_params.get<SamplerName>(name)); 41 : } 42 : 43 : template <> 44 : Sampler & 45 0 : SamplerInterface::getSamplerByName(const SamplerName & name) 46 : { 47 0 : return _si_feproblem.getSampler(name, _si_tid); 48 : }