https://mooseframework.inl.gov
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 
12 registerMooseObject("ThermalHydraulicsTestApp", VectorPropertyTestMaterial);
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 
27 void
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 }
MaterialProperty< std::vector< Real > > & _vec
VectorPropertyTestMaterial(const InputParameters &parameters)
virtual void resize(const std::size_t size) override final
unsigned int _qp
registerMooseObject("ThermalHydraulicsTestApp", VectorPropertyTestMaterial)
static InputParameters validParams()
virtual unsigned int size() const override final
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual void computeQpProperties() override
Test material with vector properties.
static InputParameters validParams()