#include <cassert>
#include <vector>
#include <nvector/nvector_serial.h>
Go to the source code of this file.
Functions | |
template<typename VECTOR> | |
double | GetVectorComponent (const VECTOR &rVec, unsigned index) |
template<typename VECTOR> | |
void | SetVectorComponent (VECTOR &rVec, unsigned index, double value) |
template<typename VECTOR> | |
unsigned | GetVectorSize (const VECTOR &rVec) |
template<typename VECTOR> | |
void | InitialiseEmptyVector (VECTOR &rVec) |
template<typename VECTOR> | |
void | DeleteVector (VECTOR &rVec) |
template<typename VECTOR> | |
VECTOR | CopyVector (VECTOR &rVec) |
void | CopyToStdVector (N_Vector src, std::vector< realtype > &rDest) |
void | CopyFromStdVector (const std::vector< realtype > &rSrc, N_Vector dest) |
template<> | |
double | GetVectorComponent (const std::vector< double > &rVec, unsigned index) |
template<> | |
void | SetVectorComponent (std::vector< double > &rVec, unsigned index, double value) |
template<> | |
unsigned | GetVectorSize (const std::vector< double > &rVec) |
template<> | |
void | InitialiseEmptyVector (std::vector< double > &rVec) |
template<> | |
void | DeleteVector (std::vector< double > &rVec) |
template<> | |
std::vector< double > | CopyVector (std::vector< double > &rVec) |
template<> | |
double | GetVectorComponent (const N_Vector &rVec, unsigned index) |
template<> | |
void | SetVectorComponent (N_Vector &rVec, unsigned index, double value) |
template<> | |
unsigned | GetVectorSize (const N_Vector &rVec) |
template<> | |
void | InitialiseEmptyVector (N_Vector &rVec) |
template<> | |
void | DeleteVector (N_Vector &rVec) |
template<> | |
N_Vector | CopyVector (N_Vector &rVec) |
Definition in file VectorHelperFunctions.hpp.
void CopyFromStdVector | ( | const std::vector< realtype > & | rSrc, | |
N_Vector | dest | |||
) | [inline] |
A helper function to copy a std::vector<double> into an N_Vector. Only exists if CHASTE_CVODE is defined.
rSrc | source vector | |
dest | destination vector; must exist and be the correct size |
Definition at line 151 of file VectorHelperFunctions.hpp.
Referenced by OdeSolution::rGetDerivedQuantities().
void CopyToStdVector | ( | N_Vector | src, | |
std::vector< realtype > & | rDest | |||
) | [inline] |
A helper function to copy an N_Vector into a std::vector<double>. Only exists if CHASTE_CVODE is defined.
src | source vector | |
rDest | destination vector; will be resized and filled |
Definition at line 128 of file VectorHelperFunctions.hpp.
Referenced by OdeSolution::rGetDerivedQuantities().
N_Vector CopyVector | ( | N_Vector & | rVec | ) | [inline] |
Specialisation for CVODE's N_Vector type.
rVec |
Definition at line 307 of file VectorHelperFunctions.hpp.
std::vector<double> CopyVector | ( | std::vector< double > & | rVec | ) | [inline] |
Specialisation for std::vector<double>.
rVec |
Definition at line 231 of file VectorHelperFunctions.hpp.
VECTOR CopyVector | ( | VECTOR & | rVec | ) | [inline] |
Helper function to create a fresh copy of a vector.
This isn't a member so that we can specialise it without having to specialise the whole class.
rVec | the vector to copy |
Referenced by AbstractParameterisedSystem< VECTOR >::GetStateVariables().
void DeleteVector | ( | N_Vector & | rVec | ) | [inline] |
Specialisation for CVODE's N_Vector type.
rVec |
Definition at line 293 of file VectorHelperFunctions.hpp.
void DeleteVector | ( | std::vector< double > & | rVec | ) | [inline] |
Specialisation for std::vector<double>.
rVec |
Definition at line 222 of file VectorHelperFunctions.hpp.
void DeleteVector | ( | VECTOR & | rVec | ) | [inline] |
Helper function to delete a vector.
This isn't a member so that we can specialise it without having to specialise the whole class.
rVec | the vector |
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), and OdeSolution::rGetDerivedQuantities().
double GetVectorComponent | ( | const N_Vector & | rVec, | |
unsigned | index | |||
) | [inline] |
Specialisation for CVODE's N_Vector type.
rVec | ||
index |
Definition at line 248 of file VectorHelperFunctions.hpp.
double GetVectorComponent | ( | const std::vector< double > & | rVec, | |
unsigned | index | |||
) | [inline] |
Specialisation for std::vector<double>.
rVec | ||
index |
Definition at line 179 of file VectorHelperFunctions.hpp.
double GetVectorComponent | ( | const VECTOR & | rVec, | |
unsigned | index | |||
) | [inline] |
Helper function to get a vector component.
This isn't a member so that we can specialise it without having to specialise the whole class.
rVec | the vector to access | |
index | the index of the component to get |
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractParameterisedSystem< VECTOR >::GetParameter(), and AbstractParameterisedSystem< VECTOR >::GetStateVariable().
unsigned GetVectorSize | ( | const N_Vector & | rVec | ) | [inline] |
Specialisation for CVODE's N_Vector type.
rVec |
Definition at line 272 of file VectorHelperFunctions.hpp.
unsigned GetVectorSize | ( | const std::vector< double > & | rVec | ) | [inline] |
Specialisation for std::vector<double>.
rVec |
Definition at line 203 of file VectorHelperFunctions.hpp.
unsigned GetVectorSize | ( | const VECTOR & | rVec | ) | [inline] |
Helper function to determine a vector's size.
This isn't a member so that we can specialise it without having to specialise the whole class.
rVec | the vector |
Referenced by AbstractParameterisedSystem< VECTOR >::GetAnyVariable(), AbstractParameterisedSystem< VECTOR >::GetNumberOfParameters(), AbstractParameterisedSystem< VECTOR >::GetParameter(), AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), and AbstractParameterisedSystem< VECTOR >::SetParameter().
void InitialiseEmptyVector | ( | N_Vector & | rVec | ) | [inline] |
Specialisation for CVODE's N_Vector type.
rVec |
Definition at line 283 of file VectorHelperFunctions.hpp.
void InitialiseEmptyVector | ( | std::vector< double > & | rVec | ) | [inline] |
Specialisation for std::vector<double>.
rVec |
Definition at line 213 of file VectorHelperFunctions.hpp.
void InitialiseEmptyVector | ( | VECTOR & | rVec | ) | [inline] |
Helper function to initialise a vector to be empty/unset.
This isn't a member so that we can specialise it without having to specialise the whole class.
rVec | the vector |
Referenced by AbstractParameterisedSystem< VECTOR >::AbstractParameterisedSystem().
void SetVectorComponent | ( | N_Vector & | rVec, | |
unsigned | index, | |||
double | value | |||
) | [inline] |
Specialisation for CVODE's N_Vector type.
rVec | ||
index | ||
value |
Definition at line 261 of file VectorHelperFunctions.hpp.
void SetVectorComponent | ( | std::vector< double > & | rVec, | |
unsigned | index, | |||
double | value | |||
) | [inline] |
Specialisation for std::vector<double>.
rVec | ||
index | ||
value |
Definition at line 192 of file VectorHelperFunctions.hpp.
void SetVectorComponent | ( | VECTOR & | rVec, | |
unsigned | index, | |||
double | value | |||
) | [inline] |
Helper function to set a vector component.
This isn't a member so that we can specialise it without having to specialise the whole class.
rVec | the vector to modify | |
index | the index of the component to set | |
value | the new value |
Referenced by AbstractParameterisedSystem< VECTOR >::SetAnyVariable(), AbstractParameterisedSystem< VECTOR >::SetParameter(), and AbstractParameterisedSystem< VECTOR >::SetStateVariable().