Chaste  Release::2017.1
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

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

Defaults all variables.

Definition at line 39 of file ElementAttributes.cpp.

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

Member Function Documentation

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.

References ElementAttributes< ELEMENT_DIM, SPACE_DIM >::mAttributes.

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

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.

References ElementAttributes< ELEMENT_DIM, SPACE_DIM >::mAttributes.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::vector< double > & ElementAttributes< ELEMENT_DIM, SPACE_DIM >::rGetAttributes ( )
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void ElementAttributes< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate
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.

References ElementAttributes< ELEMENT_DIM, SPACE_DIM >::mAttributes.

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

Friends And Related Function Documentation

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


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