https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MaterialStdVectorAuxBase.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
12// MOOSE includes
13#include "MaterialAuxBase.h"
14
18template <typename T, bool is_ad>
19class MaterialStdVectorAuxBaseTempl : public MaterialAuxBaseTempl<std::vector<T>, is_ad>
20{
21public:
23
25
26protected:
28 unsigned int _index;
29
30 using MaterialAuxBaseTempl<std::vector<T>, is_ad>::_full_value;
31};
32
33template <typename T, bool is_ad>
36{
38 params.addParam<unsigned int>("index", 0, "The index to consider for this kernel");
39 return params;
40}
41
42template <typename T, bool is_ad>
44 const InputParameters & parameters)
45 : MaterialAuxBaseTempl<std::vector<T>, is_ad>(parameters),
46 _index(this->template getParam<unsigned int>("index"))
47{
48}
49
50template <typename T = Real>
void ErrorVector unsigned int
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
A base class for the various Material related AuxKernal objects.
Moose::GenericType< std::vector< T >, is_ad > _full_value
T Value evaluated from either the property or the functor.
static InputParameters validParams()
A base class for the various Material related AuxKernel objects.
MaterialStdVectorAuxBaseTempl(const InputParameters &parameters)
unsigned int _index
index of the vector element
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131