www.mooseframework.org
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
PropertyValue Class Referenceabstract

Abstract definition of a property value. More...

#include <MaterialProperty.h>

Inheritance diagram for PropertyValue:
[legend]

Public Types

typedef unsigned int id_type
 The type for a material property ID. More...
 

Public Member Functions

 PropertyValue (const id_type id)
 
virtual ~PropertyValue ()
 
id_type id () const
 
virtual const std::string & type () const =0
 String identifying the type of parameter stored. More...
 
virtual std::unique_ptr< PropertyValueclone (const std::size_t) const =0
 Clone this value. More...
 
virtual unsigned int size () const =0
 
virtual void resize (const std::size_t size)=0
 Resizes the property to the size n. More...
 
virtual void swap (PropertyValue &rhs)=0
 
virtual bool isAD () const =0
 
virtual void qpCopy (const unsigned int to_qp, const PropertyValue &rhs, const unsigned int from_qp)=0
 Copy the value of a Property from one specific to a specific qp in this Property. More...
 
virtual void store (std::ostream &stream)=0
 
virtual void load (std::istream &stream)=0
 
virtual const std::type_info & typeID () const =0
 

Static Public Attributes

static constexpr id_type invalid_property_id = std::numeric_limits<id_type>::max() - 1
 The material property ID for an invalid property We only have this because there are a few cases where folks want to instantiate their own fake materials, and we should at least force them to be consistent. More...
 

Protected Attributes

const id_type _id
 The material property ID. More...
 

Detailed Description

Abstract definition of a property value.

Definition at line 38 of file MaterialProperty.h.

Member Typedef Documentation

◆ id_type

typedef unsigned int PropertyValue::id_type

The type for a material property ID.

Definition at line 42 of file MaterialProperty.h.

Constructor & Destructor Documentation

◆ PropertyValue()

PropertyValue::PropertyValue ( const id_type  id)
inline

Definition at line 44 of file MaterialProperty.h.

44 : _id(id) {}
const id_type _id
The material property ID.

◆ ~PropertyValue()

virtual PropertyValue::~PropertyValue ( )
inlinevirtual

Definition at line 46 of file MaterialProperty.h.

46 {};

Member Function Documentation

◆ clone()

virtual std::unique_ptr<PropertyValue> PropertyValue::clone ( const std::size_t  ) const
pure virtual

Clone this value.

Useful in copy-construction.

Implemented in MaterialPropertyBase< T, is_ad >, MaterialPropertyBase< T, true >, and MaterialPropertyBase< T, false >.

◆ id()

id_type PropertyValue::id ( ) const
inline
Returns
The ID of the underlying material property

Definition at line 56 of file MaterialProperty.h.

Referenced by MaterialPropertyBase< T, false >::swap().

56 { return _id; }
const id_type _id
The material property ID.

◆ isAD()

virtual bool PropertyValue::isAD ( ) const
pure virtual

◆ load()

virtual void PropertyValue::load ( std::istream &  stream)
pure virtual

◆ qpCopy()

virtual void PropertyValue::qpCopy ( const unsigned int  to_qp,
const PropertyValue rhs,
const unsigned int  from_qp 
)
pure virtual

Copy the value of a Property from one specific to a specific qp in this Property.

Important note: this copy operation loses AD derivative information if either this or the rhs is not an AD material property

Parameters
to_qpThe quadrature point in this Property that you want to copy to.
rhsThe Property you want to copy from.
from_qpThe quadrature point in rhs you want to copy from.

Implemented in MaterialPropertyBase< T, is_ad >, MaterialPropertyBase< T, true >, and MaterialPropertyBase< T, false >.

◆ resize()

virtual void PropertyValue::resize ( const std::size_t  size)
pure virtual

◆ size()

virtual unsigned int PropertyValue::size ( ) const
pure virtual

◆ store()

virtual void PropertyValue::store ( std::ostream &  stream)
pure virtual

◆ swap()

virtual void PropertyValue::swap ( PropertyValue rhs)
pure virtual

◆ type()

virtual const std::string& PropertyValue::type ( ) const
pure virtual

String identifying the type of parameter stored.

Implemented in MaterialPropertyBase< T, is_ad >, MaterialPropertyBase< T, true >, and MaterialPropertyBase< T, false >.

◆ typeID()

virtual const std::type_info& PropertyValue::typeID ( ) const
pure virtual
Returns
The type_info for the underlying stored type T

Implemented in MaterialPropertyBase< T, is_ad >, MaterialPropertyBase< T, true >, and MaterialPropertyBase< T, false >.

Referenced by MaterialPropertyBase< T, false >::swap().

Member Data Documentation

◆ _id

const id_type PropertyValue::_id
protected

The material property ID.

Definition at line 102 of file MaterialProperty.h.

Referenced by id().

◆ invalid_property_id

constexpr id_type PropertyValue::invalid_property_id = std::numeric_limits<id_type>::max() - 1
static

The material property ID for an invalid property We only have this because there are a few cases where folks want to instantiate their own fake materials, and we should at least force them to be consistent.

Definition at line 51 of file MaterialProperty.h.


The documentation for this class was generated from the following file: