82 void resize(std::size_t size,
Real fill = 0.0,
bool fill_out_to_size =
true);
void setCoefficients(const std::vector< Real > &new_coefficients)
Set the coefficients using a copy operation.
bool isSizeEnforced() const
Returns true if the size of the coefficient array is fixed and enforced.
void setCharacteristics(const std::vector< std::size_t > &new_characteristics)
Sets the characteristics array.
friend std::ostream & operator<<(std::ostream &stream, const MutableCoefficientsInterface &me)
Friend operator to easily print out the array of coefficients.
const std::vector< std::size_t > & getCharacteristics() const
Get a reference to the characteristics array.
static InputParameters validParams()
virtual void coefficientsChanged()
Called when the coefficients have been changed.
const bool _print_coefficients
Boolean to flag if the coefficients should be printed when set.
Real operator[](std::size_t index) const
Get the value of the coefficient at the corresponding index.
MutableCoefficientsInterface(const MooseObject *moose_object, const InputParameters ¶meters)
bool _enforce_size
Boolean that locks or allows resizing of the coefficient array.
bool isCompatibleWith(const MutableCoefficientsInterface &other) const
Checks to see if another instance is compatible.
std::vector< Real > & _coefficients
The coefficient array.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::size_t > & _characteristics
An array of integer characteristics that can be used to check compatibility.
std::string getCoefficientsTable() const
Get a formatted string of the coefficients.
std::size_t getSize() const
Get the size, aka number of coefficients.
This class is designed to provide a uniform interface for any class that uses an array of coefficient...
void resize(std::size_t size, Real fill=0.0, bool fill_out_to_size=true)
Resize the array, using the value for fill if the new size is larger.
const ConsoleStream & _console
MooseObject instance of this to provide access to _console
void importCoefficients(const MutableCoefficientsInterface &other)
Import the coefficients from another instance.
const std::vector< Real > & getCoefficients() const
Get a read-only reference to the vector of coefficients.
void enforceSize(bool enforce)
Toggle whether the size of the coefficient array can be changed.