FEDEM Solver  R8.0
Source code of the dynamics solver
FiUserElmPlugin.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
13 #ifndef FI_USER_ELM_PLUGIN_H
14 #define FI_USER_ELM_PLUGIN_H
15 
18 
19 
25  public FFaSingelton<FiUserElmPlugin>
26 {
27 protected:
31  virtual ~FiUserElmPlugin() {}
32 
33 public:
39  bool validate(const std::string& libName, int nchar = 0, char* sign = NULL);
44  bool getSign(int nchar, char* sign, bool silence = false);
45 
50  int getElementTypes(int maxUE, int* eType);
56  int getTypeName(int eType, int nchar, char* name);
57 
60  int init(const double* gdata);
68  int init(int eId, int eType, int nenod, int nedof, int& niwork, int& nrwork);
78  int init(int eId, int eType, int nenod, int nedof,
79  const double* X, const double* T, int* iwork, double* rwork);
80 
89  int mass(int eId, int eType, int nenod,
90  const double* X, int* iwork, double* rwork, double& mass);
91 
114  int update(int eId, int eType, int nenod, int nedof,
115  const double* X, const double* T,
116  const double* V, const double* A, int* iwork, double* rwork,
117  double* Kt, double* Ct, double* M,
118  double* Fs, double* Fd, double* Fi, double* Q,
119  double t, double dt, int istep, int iter);
120 
130  int origin(int eId, int eType, int nenod,
131  const double* X, const double* T,
132  const int* iwork, const double* rwork, double* Tlg);
133 
144  int result(int eId, int eType, int idx,
145  const int* iwork, const double* rwork, int nchar, char* name);
155  int result(int eId, int eType, int idx,
156  const int* iwork, const double* rwork, double& value);
157 
158 private:
159  friend class FFaSingelton<FiUserElmPlugin>;
160 };
161 
162 #endif
Management of dynamic loading of shared object libraries.
Base class for dynamic loading of shared object libraries.
Definition: FFaDynamicLibraryBase.H:37
Template class for singleton classes.
Definition: FFaSingelton.H:20
Singleton class for user-defined element plugins.
Definition: FiUserElmPlugin.H:26
bool validate(const std::string &libName, int nchar=0, char *sign=NULL)
Checks if the named library can be loaded as a plugin.
Definition: FiUserElmPlugin.C:38
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.
Definition: FiUserElmPlugin.C:337
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.
Definition: FiUserElmPlugin.C:289
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.
Definition: FiUserElmPlugin.C:414
int getTypeName(int eType, int nchar, char *name)
Returns the name of an element type.
Definition: FiUserElmPlugin.C:112
int init(const double *gdata)
Initializes the plugin.
Definition: FiUserElmPlugin.C:146
FiUserElmPlugin()
Default constructor.
Definition: FiUserElmPlugin.H:29
bool getSign(int nchar, char *sign, bool silence=false)
Returns the signature string of the loaded plugin.
Definition: FiUserElmPlugin.C:51
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.
Definition: FiUserElmPlugin.C:241
int getElementTypes(int maxUE, int *eType)
Returns a list of element types defined in the plugin.
Definition: FiUserElmPlugin.C:84
virtual ~FiUserElmPlugin()
Empty destructor.
Definition: FiUserElmPlugin.H:31
Definition: FiSwappedIO.H:15