diff --git a/framework/include/materials/GenericConstantRealVectorValue.h b/framework/include/materials/GenericConstantRealVectorValue.h new file mode 100644 index 000000000000..97accfb9d4ac --- /dev/null +++ b/framework/include/materials/GenericConstantRealVectorValue.h @@ -0,0 +1,34 @@ +//* This file is part of the MOOSE framework +//* https://www.mooseframework.org +//* +//* All rights reserved, see COPYRIGHT for full restrictions +//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "Material.h" + +/** + * Declares a constant material property of type RealVectorValue. + */ +template +class GenericConstantRealVectorValueTempl : public Material +{ +public: + static InputParameters validParams(); + + GenericConstantRealVectorValueTempl(const InputParameters & parameters); + +protected: + virtual void initQpStatefulProperties() override; + virtual void computeQpProperties() override; + + const RealVectorValue _vector; + GenericMaterialProperty & _prop; +}; + +typedef GenericConstantRealVectorValueTempl GenericConstantRealVectorValue; +typedef GenericConstantRealVectorValueTempl ADGenericConstantRealVectorValue; diff --git a/framework/include/utils/MooseArray.h b/framework/include/utils/MooseArray.h index 1d4941628bfa..ebde89e93773 100644 --- a/framework/include/utils/MooseArray.h +++ b/framework/include/utils/MooseArray.h @@ -173,10 +173,13 @@ class MooseArray */ std::vector stdVector() const; + ///@{ /** * Reference to first element of array */ const T * data() const { return _data; } + T * data() { return _data; } + ///@} private: /// Smart pointer storage diff --git a/framework/include/utils/RankFourTensor.h b/framework/include/utils/RankFourTensor.h index b930eae69105..350b730bf031 100644 --- a/framework/include/utils/RankFourTensor.h +++ b/framework/include/utils/RankFourTensor.h @@ -201,7 +201,7 @@ class RankFourTensorTempl void printReal(std::ostream & stm = Moose::out) const; /// copies values from a into this tensor - RankFourTensorTempl & operator=(const RankFourTensorTempl & a); + RankFourTensorTempl & operator=(const RankFourTensorTempl & a) = default; /** * Assignment-from-scalar operator. Used only to zero out the tensor. diff --git a/framework/include/utils/RankFourTensorImplementation.h b/framework/include/utils/RankFourTensorImplementation.h index a5cd05461db0..06bb326ba52e 100644 --- a/framework/include/utils/RankFourTensorImplementation.h +++ b/framework/include/utils/RankFourTensorImplementation.h @@ -120,15 +120,6 @@ RankFourTensorTempl::zero() _vals[i] = 0.0; } -template -RankFourTensorTempl & -RankFourTensorTempl::operator=(const RankFourTensorTempl & a) -{ - for (auto i : make_range(N4)) - _vals[i] = a._vals[i]; - return *this; -} - template template