https://mooseframework.inl.gov
Loading...
Searching...
No Matches
VectorPropertyTestMaterial.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
13
16{
18 params.addClassDescription("Test material with vector properties");
19 return params;
20}
21
23 : Material(parameters), _vec(declareProperty<std::vector<Real>>("test_property"))
24{
25}
26
27void
29{
30 _vec[_qp].resize(5);
31 for (std::size_t i = 0; i < _vec[_qp].size(); i++)
32 _vec[_qp][i] = i * 2.;
33}
registerMooseObject("ThermalHydraulicsTestApp", VectorPropertyTestMaterial)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
virtual unsigned int size() const override final
virtual void resize(const std::size_t size) override final
static InputParameters validParams()
Test material with vector properties.
static InputParameters validParams()
VectorPropertyTestMaterial(const InputParameters &parameters)
MaterialProperty< std::vector< Real > > & _vec
virtual void computeQpProperties() override