FEDEM Solver
R8.0
Source code of the dynamics solver
|
Singleton class for user-defined element plugins. More...
#include <FiUserElmPlugin.H>
Public Member Functions | |
bool | validate (const std::string &libName, int nchar=0, char *sign=NULL) |
Checks if the named library can be loaded as a plugin. More... | |
bool | getSign (int nchar, char *sign, bool silence=false) |
Returns the signature string of the loaded plugin. More... | |
int | getElementTypes (int maxUE, int *eType) |
Returns a list of element types defined in the plugin. More... | |
int | getTypeName (int eType, int nchar, char *name) |
Returns the name of an element type. More... | |
int | init (const double *gdata) |
Initializes the plugin. More... | |
int | init (int eId, int eType, int nenod, int nedof, int &niwork, int &nrwork) |
Returns the required length of the work areas for a given element. More... | |
int | init (int eId, int eType, int nenod, int nedof, const double *X, const double *T, int *iwork, double *rwork) |
Initializes the state-independent part of the element work areas. More... | |
int | mass (int eId, int eType, int nenod, const double *X, int *iwork, double *rwork, double &mass) |
Calculates the total mass for a given user-defined element. More... | |
int | update (int eId, int eType, int nenod, int nedof, const double *X, const double *T, const double *V, const double *A, int *iwork, double *rwork, double *Kt, double *Ct, double *M, double *Fs, double *Fd, double *Fi, double *Q, double t, double dt, int istep, int iter) |
Updates the state of a given user-defined element. More... | |
int | origin (int eId, int eType, int nenod, const double *X, const double *T, const int *iwork, const double *rwork, double *Tlg) |
Calculates the local origin of a user-defined element. More... | |
int | result (int eId, int eType, int idx, const int *iwork, const double *rwork, int nchar, char *name) |
Returns the name of a result quantity of a user-defined element. More... | |
int | result (int eId, int eType, int idx, const int *iwork, const double *rwork, double &value) |
Returns the value of a result quantity of a user-defined element. More... | |
Public Member Functions inherited from FFaDynamicLibraryBase | |
bool | load (const std::string &libName, bool silence=false) |
Loads the library named libName. More... | |
bool | unload (const std::string &libName, bool silence=false) |
Unloads the library named libName. More... | |
void | unloadAll () |
Unloads all libraries and clears the function cache. More... | |
bool | areLibsLoaded () const |
Returns whether dynamics libraries have been loaded or not. More... | |
const char * | getLibrary (size_t idx=1) const |
Returns the file name of the dynamic library, if loaded. More... | |
Protected Member Functions | |
FiUserElmPlugin () | |
Default constructor. More... | |
virtual | ~FiUserElmPlugin () |
Empty destructor. More... | |
Protected Member Functions inherited from FFaDynamicLibraryBase | |
FFaDynamicLibraryBase () | |
Default constructor. More... | |
virtual | ~FFaDynamicLibraryBase () |
The destructor unloads all dynamically loaded libraries. More... | |
DLPROC | getProcAddr (const std::string &fName, bool silence=false) const |
Returns the function pointer for the named function. More... | |
DLPROC | getProcAddr (const std::string &cName, const std::string &fName, LanguageBinding &lang, bool silence=false) const |
Returns the function pointer for the named function. More... | |
DLPROC | getProcAddress (const std::string &fName, size_t procID) const |
Returns the function pointer for the given function. More... | |
DLPROC | getProcAddress (const std::string &cName, const std::string &fName, LanguageBinding &lang, size_t procID) const |
Returns the function pointer for the given function. More... | |
Protected Member Functions inherited from FFaSingelton< FiUserElmPlugin > | |
FFaSingelton () | |
The constructor is protected to allow objects of sub-classes only. More... | |
FFaSingelton (const FFaSingelton &)=delete | |
Disable default copy constructor. More... | |
FFaSingelton & | operator= (const FFaSingelton &)=delete |
Disable default assignment operator. More... | |
Friends | |
class | FFaSingelton< FiUserElmPlugin > |
Additional Inherited Members | |
Static Public Member Functions inherited from FFaSingelton< FiUserElmPlugin > | |
static FiUserElmPlugin * | instance () |
Returns the actual instance of this class. More... | |
static void | removeInstance () |
Deletes the dynamically allocated instance. More... | |
static bool | allocated () |
Returns true, if the instance has been allocated. More... | |
Protected Types inherited from FFaDynamicLibraryBase | |
enum | LanguageBinding { Undefined , C , Fortran } |
Enums defining the supported language bindings. More... | |
Singleton class for user-defined element plugins.
|
inlineprotected |
Default constructor.
|
inlineprotectedvirtual |
Empty destructor.
int FiUserElmPlugin::getElementTypes | ( | int | maxUE, |
int * | eType | ||
) |
Returns a list of element types defined in the plugin.
[in] | maxUE | Max number of user-defined element types |
[out] | eType | List of unique ids identifying each element type |
bool FiUserElmPlugin::getSign | ( | int | nchar, |
char * | sign, | ||
bool | silence = false |
||
) |
Returns the signature string of the loaded plugin.
[in] | nchar | Max length of the signature string |
[out] | sign | A signature string describing the loaded plugin |
[in] | silence | If true, suppress error messages |
int FiUserElmPlugin::getTypeName | ( | int | eType, |
int | nchar, | ||
char * | name | ||
) |
Returns the name of an element type.
[in] | eType | Unique id identifying the element type |
[in] | nchar | Max length of the element type name |
[out] | name | The element type name corresponding to eType |
int FiUserElmPlugin::init | ( | const double * | gdata | ) |
Initializes the plugin.
[in] | gdata | Global parameters that applies to all elements |
int FiUserElmPlugin::init | ( | int | eId, |
int | eType, | ||
int | nenod, | ||
int | nedof, | ||
const double * | X, | ||
const double * | T, | ||
int * | iwork, | ||
double * | rwork | ||
) |
Initializes the state-independent part of the element work areas.
[in] | eId | Unique id identifying this element instance (the baseID) |
[in] | eType | Unique id identifying the element type |
[in] | nenod | Number of element nodes |
[in] | nedof | Number of element degrees of freedom |
[in] | X | Global initial nodal coordinates of the element |
[in] | T | Local initial nodal coordinate systems of the element |
iwork | Integer work area for this element | |
rwork | Real work area for this element |
int FiUserElmPlugin::init | ( | int | eId, |
int | eType, | ||
int | nenod, | ||
int | nedof, | ||
int & | niwork, | ||
int & | nrwork | ||
) |
Returns the required length of the work areas for a given element.
[in] | eId | Unique id identifying this element instance (the baseID) |
[in] | eType | Unique id identifying the element type |
[in] | nenod | Number of element nodes |
[in] | nedof | Number of element degrees of freedom |
[out] | niwork | Required size of the integer work area for this element |
[out] | nrwork | Required size of the real work area for this element |
int FiUserElmPlugin::mass | ( | int | eId, |
int | eType, | ||
int | nenod, | ||
const double * | X, | ||
int * | iwork, | ||
double * | rwork, | ||
double & | mass | ||
) |
Calculates the total mass for a given user-defined element.
[in] | eId | Unique id identifying this element instance (the baseID) |
[in] | eType | Unique id identifying the element type |
[in] | nenod | Number of element nodes |
[in] | X | Global initial nodal coordinates of the element |
iwork | Integer work area for this element | |
rwork | Real work area for this element | |
[out] | mass | Mass of the element |
int FiUserElmPlugin::origin | ( | int | eId, |
int | eType, | ||
int | nenod, | ||
const double * | X, | ||
const double * | T, | ||
const int * | iwork, | ||
const double * | rwork, | ||
double * | Tlg | ||
) |
Calculates the local origin of a user-defined element.
[in] | eId | Unique id identifying this element instance (the baseID) |
[in] | eType | Unique id identifying the element type |
[in] | nenod | Number of element nodes |
[in] | X | Global nodal coordinates of the element |
[in] | T | Local nodal coordinate systems of the element |
[in] | iwork | Integer work area for this element |
[in] | rwork | Real work area for this element |
[out] | Tlg | Local-to-global transformation matrix for this element |
This function is invoked once per element in pre- and post-processing tasks, requiring the position of current element. It does not affect the response simulation.
int FiUserElmPlugin::result | ( | int | eId, |
int | eType, | ||
int | idx, | ||
const int * | iwork, | ||
const double * | rwork, | ||
double & | value | ||
) |
Returns the value of a result quantity of a user-defined element.
[in] | eId | Unique id identifying this element instance (the baseID) |
[in] | eType | Unique id identifying the element type |
[in] | idx | Result quantity index |
[in] | iwork | Integer work area for this element |
[in] | rwork | Real work area for this element |
[out] | value | The result quantity |
This function is invoked once per element as a pre-processing task, when saving results to file.
int FiUserElmPlugin::result | ( | int | eId, |
int | eType, | ||
int | idx, | ||
const int * | iwork, | ||
const double * | rwork, | ||
int | nchar, | ||
char * | name | ||
) |
Returns the name of a result quantity of a user-defined element.
[in] | eId | Unique id identifying this element instance (the baseID) |
[in] | eType | Unique id identifying the element type |
[in] | idx | Result quantity index |
[in] | iwork | Integer work area for this element |
[in] | rwork | Real work area for this element |
[in] | nchar | Maximum length of the result quantity name |
[out] | name | Name of result quantity |
This function is invoked once as per element as a post-processing task after each time increment, when saving results to file.
int FiUserElmPlugin::update | ( | int | eId, |
int | eType, | ||
int | nenod, | ||
int | nedof, | ||
const double * | X, | ||
const double * | T, | ||
const double * | V, | ||
const double * | A, | ||
int * | iwork, | ||
double * | rwork, | ||
double * | Kt, | ||
double * | Ct, | ||
double * | M, | ||
double * | Fs, | ||
double * | Fd, | ||
double * | Fi, | ||
double * | Q, | ||
double | t, | ||
double | dt, | ||
int | istep, | ||
int | iter | ||
) |
Updates the state of a given user-defined element.
[in] | eId | Unique id identifying this element instance (the baseID) |
[in] | eType | Unique id identifying the element type |
[in] | nenod | Number of element nodes |
[in] | nedof | Number of element degrees of freedom |
[in] | X | Global nodal coordinates of the element |
[in] | T | Local nodal coordinate systems of the element |
[in] | V | Global nodal velocities of the element |
[in] | A | Global nodal accelerations of the element |
iwork | Integer work area for this element | |
rwork | Real work area for this element | |
[out] | Kt | Tangent stiffness matrix |
[out] | Ct | Damping matrix |
[out] | M | Mass matrix |
[out] | Fs | Internal elastic forces |
[out] | Fd | Damping forces |
[out] | Fi | Intertia forces |
[out] | Q | External forces |
[in] | t | Current time |
[in] | dt | Time step size |
[in] | istep | Time step number |
[in] | iter | Iteration number |
This function is invoked once per element within the Newton iteration loop. It evaluates the updated tangent matrices and associated force vectors of the current linearized dynamic equilibrium equation.
bool FiUserElmPlugin::validate | ( | const std::string & | libName, |
int | nchar = 0 , |
||
char * | sign = NULL |
||
) |
Checks if the named library can be loaded as a plugin.
[in] | libName | Full path to the dynamic library. |
[in] | nchar | Max length of the signature string |
[out] | sign | A signature string describing the loaded plugin return true if the named plugin contains user-defined element types. |
|
friend |