https://mooseframework.inl.gov
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 
18 template <typename T, bool is_ad>
19 class MaterialStdVectorAuxBaseTempl : public MaterialAuxBaseTempl<std::vector<T>, is_ad>
20 {
21 public:
23 
25 
26 protected:
28  unsigned int _index;
29 
31 };
32 
33 template <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 
42 template <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 
50 template <typename T = Real>
static InputParameters validParams()
A base class for the various Material related AuxKernal objects.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
A base class for the various Material related AuxKernel objects.
const InputParameters & parameters() const
Get the parameters of the object.
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...
Moose::GenericType< std::vector< T >, is_ad > _full_value
T Value evaluated from either the property or the functor.
static InputParameters validParams()
MaterialStdVectorAuxBaseTempl(const InputParameters &parameters)
unsigned int _index
index of the vector element
void ErrorVector unsigned int