|
IFEM
90A354
|
Solution vector container with serialization support. More...
#include <SIMsolution.h>


Public Member Functions | |
| virtual const Vectors & | getSolutions () const |
| Returns a const reference to the solution vectors. | |
| virtual Vectors & | theSolutions () |
| Returns a reference to the solution vectors (for assignment). | |
| virtual const Vector & | getSolution (int ix=0) const |
| Returns a const reference to current solution vector. | |
| virtual void | setSolution (const RealArray &s, int ix=0) |
| Modifies the current solution vector (used by sub-iterations only). | |
Protected Types | |
| using | SerializeMap = std::map< std::string, std::string > |
| Convenience type. | |
Protected Member Functions | |
| SIMsolution ()=default | |
| The default constructor is protected to allow sub-classes only. | |
| virtual | ~SIMsolution ()=default |
| Empty default destructor. | |
| void | initSolution (size_t ndof, size_t nsol=1) |
| Initializes the solution vectors. More... | |
| void | pushSolution (unsigned short int nVecState=1) |
| Pushes the solution vector stack. More... | |
| bool | saveSolution (SerializeMap &data, const std::string &name) const |
| Writes current solution to a serialization container. More... | |
| bool | restoreSolution (const SerializeMap &data, const std::string &name) |
| Restores the solution from a serialization container. More... | |
Static Protected Member Functions | |
| static std::string | serialize (const double *v, size_t n) |
| Helper method for serializing a double array into a text string. More... | |
| static void | deSerialize (const std::string &data, double *v, size_t n) |
| Helper method for deserializing a double array from a text string. More... | |
Protected Attributes | |
| Vectors | solution |
| Stack of solution vectors. | |
Solution vector container with serialization support.
|
staticprotected |
Helper method for deserializing a double array from a text string.
| [in] | data | The serialized string |
| [out] | v | Pointer to double array (assumed allocated outside) |
| [in] | n | Length of array |
Referenced by HHTSIM::deSerialize(), MultiStepSIM::deSerialize(), and NewmarkNLSIM::deSerialize().
|
protected |
Initializes the solution vectors.
| [in] | ndof | Number of degrees of freedom |
| [in] | nsol | Number of solution vectors |
References solution.
Referenced by MultiStepSIM::initSol().
|
protected |
Pushes the solution vector stack.
| [in] | nVecState | Number of vectors per state |
References solution.
Referenced by EigenModeSIM::advanceStep(), NewmarkSIM::advanceStep(), and NonLinSIM::advanceStep().
|
protected |
Restores the solution from a serialization container.
| [in] | data | Container for serialized data |
| [in] | name | Name of simulator the solution belongs to |
References theSolutions().
Referenced by HHTSIM::deSerialize(), MultiStepSIM::deSerialize(), and NewmarkNLSIM::deSerialize().
|
protected |
Writes current solution to a serialization container.
| data | Container for serialized data | |
| [in] | name | Name of simulator the solution belongs to |
References getSolutions().
Referenced by HHTSIM::serialize(), MultiStepSIM::serialize(), and NewmarkNLSIM::serialize().
|
staticprotected |
Helper method for serializing a double array into a text string.
| [in] | v | Pointer to double array |
| [in] | n | Length of array |
Referenced by HHTSIM::serialize(), MultiStepSIM::serialize(), and NewmarkNLSIM::serialize().