Workspace 6.21.5
Public Member Functions | List of all members
StateMap Class Reference

#include <Mesh/DataStructures/statemap.h>

Public Member Functions

 StateMap (const StateControl &source, const StateControl &dest)
 
 StateMap (const StateInfoArray &source, const StateInfoArray &dest)
 
void copyStates (const State &source, State &dest)
 
const IndexMappingsgetDoubles () const
 
const IndexMappingsgetIntegers () const
 
const IndexMappingsgetVectors () const
 
void reorderStates (State &state, unsigned numDoubles, unsigned numIntegers)
 

Constructor & Destructor Documentation

◆ StateMap() [1/2]

StateMap ( const StateControl source,
const StateControl dest 
)

Create a state map from source to dest. States not present in both are not mapped.

◆ StateMap() [2/2]

StateMap ( const StateInfoArray source,
const StateInfoArray dest 
)

Create a state map from source to dest. States not present in both are not mapped.

Member Function Documentation

◆ copyStates()

void copyStates ( const State source,
State dest 
)

Copy all states from source to dest for which we have a mapping. Old values at the destination are overwritten. States not included in the mapping will retain the values they had before the call.

◆ getDoubles()

const IndexMappings & getDoubles ( ) const
inline

◆ getIntegers()

const IndexMappings & getIntegers ( ) const
inline

◆ getVectors()

const IndexMappings & getVectors ( ) const
inline

◆ reorderStates()

void reorderStates ( State state,
unsigned  numDoubles,
unsigned  numIntegers 
)
Parameters
stateThe object whose states (scalar, vector and integer) should be re-ordered.
numDoublesThe size of the doubles array in the state object. This must be the value returned from the getDoublesStateSize() function of the StateControl object to which state belongs.
numIntegersThe size of the integers array in the state object. This must be the value returned from the getIntegerStateSize() function of the StateControl object to which state belongs.

The re-ordering will preserve all state values (scalar, vector and integer).