https://mooseframework.inl.gov
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 
10 #include "DistributionInterface.h"
11 #include "Distribution.h"
12 #include "SubProblem.h"
13 #include "MooseTypes.h"
14 #include "FEProblemBase.h"
15 
18 {
20  return params;
21 }
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 
40 const Distribution &
41 DistributionInterface::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 
47 const Distribution &
48 DistributionInterface::getDistributionByName(const DistributionName & name) const
49 {
51 }
std::string name(const ElemQuality q)
virtual Distribution & getDistribution(const std::string &name)
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.
DistributionInterface(const MooseObject *moose_object)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
All Distributions should inherit from this class.
Definition: Distribution.h:18
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
static InputParameters validParams()
InputParameters emptyInputParameters()
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:27
Interface for objects that need to use distributions.
const Distribution & getDistributionByName(const DistributionName &name) const
Get a distribution with a given name.
FEProblemBase & _dni_feproblem
Reference to FEProblemBase instance.
const Distribution & getDistribution(const std::string &name) const
Get a distribution with a given name.
const InputParameters & _dni_params
Parameters of the object with this interface.