Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
ElementAttributes< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <ElementAttributes.hpp>

+ Collaboration diagram for ElementAttributes< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 ElementAttributes ()
 
std::vector< double > & rGetAttributes ()
 
void AddAttribute (double attribute)
 
void SetFirstAttribute (double attribute)
 
double GetFirstAttribute ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

std::vector< doublemAttributes
 

Friends

class boost::serialization::access
 

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class ElementAttributes< ELEMENT_DIM, SPACE_DIM >

A container for attributes associated with the element classes.

Definition at line 48 of file ElementAttributes.hpp.

Constructor & Destructor Documentation

◆ ElementAttributes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
ElementAttributes< ELEMENT_DIM, SPACE_DIM >::ElementAttributes ( )

Defaults all variables.

Definition at line 39 of file ElementAttributes.cpp.

Member Function Documentation

◆ AddAttribute()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ElementAttributes< ELEMENT_DIM, SPACE_DIM >::AddAttribute ( double  attribute)

Push an attribute back onto mAttributes

Parameters
attributethe value of the attribute.

Definition at line 51 of file ElementAttributes.cpp.

◆ GetFirstAttribute()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double ElementAttributes< ELEMENT_DIM, SPACE_DIM >::GetFirstAttribute ( )
Returns
the first (zero-indexed) attribute value or zero if none exist
Todo:
#2739 This should throw an exception if there are no attributes
Todo:
#2739 This should throw: EXCEPTION("Attempting to get element attribute when there are none defined");

Definition at line 69 of file ElementAttributes.cpp.

◆ rGetAttributes()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< double > & ElementAttributes< ELEMENT_DIM, SPACE_DIM >::rGetAttributes ( )
Returns
mAttributes

Definition at line 45 of file ElementAttributes.cpp.

◆ serialize()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void ElementAttributes< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 65 of file ElementAttributes.hpp.

References ElementAttributes< ELEMENT_DIM, SPACE_DIM >::mAttributes.

◆ SetFirstAttribute()

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void ElementAttributes< ELEMENT_DIM, SPACE_DIM >::SetFirstAttribute ( double  attribute)

Either push the first attribute onto the vector or replace its value if it already exists. This method gives back-compatibility to use-cases where there was only one attribute

Parameters
attributethe value of the first attribute.

Definition at line 57 of file ElementAttributes.cpp.

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 56 of file ElementAttributes.hpp.

Member Data Documentation

◆ mAttributes

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector<double> ElementAttributes< ELEMENT_DIM, SPACE_DIM >::mAttributes
private

Arbitrary attributes that a user gives meaning to

Definition at line 53 of file ElementAttributes.hpp.

Referenced by ElementAttributes< ELEMENT_DIM, SPACE_DIM >::serialize().


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