|
IFEM
90A354
|
Class for analytical solution fields (primary and secondary solution). More...
#include <AnaSol.h>

Public Member Functions | |
| AnaSol (RealFunc *s1=nullptr, VecFunc *s2=nullptr, VecFunc *v1=nullptr, TensorFunc *v2=nullptr, STensorFunc *v3=nullptr) | |
| Default constructor initializing all solution fields. More... | |
| AnaSol (RealFunc *s, STensorFunc *sigma) | |
| Constructor initializing the primary and secondary solution fields. More... | |
| AnaSol (VecFunc *v, STensorFunc *sigma) | |
| Constructor initializing the primary and secondary solution fields. More... | |
| AnaSol (STensorFunc *sigma) | |
| Constructor initializing the symmetric stress tensor field only. More... | |
| AnaSol (std::istream &is, const int nlines, bool scalarSol=true) | |
| Constructor initializing expression functions by parsing a stream. More... | |
| AnaSol (const tinyxml2::XMLElement *elem, bool scalarSol=true) | |
| Constructor initializing expression functions by parsing XML tags. More... | |
| AnaSol (const AnaSol &)=delete | |
| No copying of this class. | |
| virtual | ~AnaSol () |
| The destructor frees the analytical solution fields. | |
| char | hasScalarSol () const |
| Checks whether a scalar solution is defined. | |
| char | hasVectorSol () const |
| Checks whether a vector solution is defined. | |
| RealFunc * | getScalarSol (size_t idx=0) const |
| Returns the scalar solution, if any. | |
| VecFunc * | getScalarSecSol (size_t idx=0) const |
| Returns the secondary scalar solution, if any. | |
| VecFunc * | getVectorSol () const |
| Returns the vector solution, if any. | |
| TensorFunc * | getVectorSecSol () const |
| Returns the secondary vector solution, if any. | |
| STensorFunc * | getStressSol () const |
| Returns the stress solution, if any. | |
| void | initPatch (size_t pIdx) |
| Sets the patch to use. | |
| virtual void | setupSecondarySolutions () |
| Make sure we have a secondary solution. More... | |
Protected Attributes | |
| bool | symmetric = false |
| True to use symmetric secondary solution. | |
| std::vector< RealFunc * > | scalSol |
| Primary scalar solution fields. | |
| std::vector< VecFunc * > | scalSecSol |
| Secondary scalar solution fields. | |
| VecFunc * | vecSol |
| Primary vector solution field. | |
| TensorFunc * | vecSecSol |
| Secondary solution field (vector gradient field) | |
| STensorFunc * | stressSol |
| Secondary solution field (stress field) | |
Private Member Functions | |
| template<class Scalar > | |
| void | parseExpressionFunctions (const tinyxml2::XMLElement *elem, bool scalarSol) |
| Parses expression functions from XML definition. | |
| void | parseFieldFunctions (const tinyxml2::XMLElement *elem, bool scalarSol) |
| Parses field functions from XML definition. | |
Class for analytical solution fields (primary and secondary solution).
|
explicit |
Default constructor initializing all solution fields.
| [in] | s1 | Primary scalar solution field |
| [in] | s2 | Secondary solution field, gradient |
| [in] | v1 | Primary vector solution field |
| [in] | v2 | Secondary solution field, gradient |
| [in] | v3 | Secondary solution field, symmetric stress tensor |
It is assumed that all the arguments are pointers to dynamically allocated objects, as the class destructor will attempt to delete them.
References scalSecSol, and scalSol.
| AnaSol::AnaSol | ( | RealFunc * | s, |
| STensorFunc * | sigma | ||
| ) |
Constructor initializing the primary and secondary solution fields.
| [in] | s | Primary scalar solution field |
| [in] | sigma | Symmetric stress tensor field |
References scalSol.
|
inline |
Constructor initializing the primary and secondary solution fields.
| [in] | v | Primary vector solution field |
| [in] | sigma | Symmetric stress tensor field |
|
inlineexplicit |
Constructor initializing the symmetric stress tensor field only.
| [in] | sigma | Symmetric stress tensor field |
| AnaSol::AnaSol | ( | std::istream & | is, |
| const int | nlines, | ||
| bool | scalarSol = true |
||
| ) |
Constructor initializing expression functions by parsing a stream.
| is | The file stream to read function definition from | |
| [in] | nlines | Number of lines to read |
| [in] | scalarSol | If true, the primary solution is a scalar field |
References IFEM::cout, utl::readLine(), scalSecSol, scalSol, stressSol, vecSecSol, and vecSol.
|
explicit |
Constructor initializing expression functions by parsing XML tags.
| [in] | elem | Pointer to XML-element to extract data from |
| [in] | scalarSol | If true, the primary solution is a scalar field |
References utl::getAttribute(), parseFieldFunctions(), and symmetric.
|
virtual |
Make sure we have a secondary solution.
If none is given, we use derivation (automatic or finite difference) to obtain one.
References scalSecSol, scalSol, stressSol, symmetric, vecSecSol, and vecSol.
Referenced by SIMbase::preprocessC().