https://mooseframework.inl.gov
Loading...
Searching...
No Matches
DistributionInterface.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
11#include "Distribution.h"
12#include "SubProblem.h"
13#include "MooseTypes.h"
14#include "FEProblemBase.h"
15
22
24 : _dni_params(moose_object->parameters()),
25 _dni_feproblem(*_dni_params.getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")),
26 _dni_moose_object_ptr(moose_object)
27{
28}
29
30#ifdef MOOSE_KOKKOS_ENABLED
33 : _dni_params(object._dni_params),
34 _dni_feproblem(object._dni_feproblem),
35 _dni_moose_object_ptr(object._dni_moose_object_ptr)
36{
37}
38#endif
39
40const Distribution &
41DistributionInterface::getDistribution(const std::string & name) const
42{
43 DistributionName dist_name = _dni_params.get<DistributionName>(name);
44 return _dni_feproblem.getDistribution(dist_name);
45}
46
47const Distribution &
48DistributionInterface::getDistributionByName(const DistributionName & name) const
49{
51}
InputParameters emptyInputParameters()
Interface for objects that need to use distributions.
const Distribution & getDistribution(const std::string &name) const
Get a distribution with a given name.
DistributionInterface(const MooseObject *moose_object)
const InputParameters & _dni_params
Parameters of the object with this interface.
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
static InputParameters validParams()
const Distribution & getDistributionByName(const DistributionName &name) const
Get a distribution with a given name.
All Distributions should inherit from this class.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual Distribution & getDistribution(const std::string &name)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
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.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31