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 {
30  virtual ~FiUserElmPlugin() {}
31 
33  friend class FFaSingelton<FiUserElmPlugin>;
34 
35 public:
40  bool validate(const std::string& lib, int nchar = 0, char* sign = NULL);
45  bool getSign(int nchar, char* sign, bool silence = false);
46 
51  int getElementTypes(int maxUE, int* eType);
57  int getTypeName(int eType, int nchar, char* name);
58 
61  int init(const double* gdata);
69  int init(int eId, int eType, int nenod, int nedof, int& niwork, int& nrwork);
79  int init(int eId, int eType, int nenod, int nedof,
80  const double* X, const double* T, int* iwork, double* rwork);
81 
90  int mass(int eId, int eType, int nenod,
91  const double* X, int* iwork, double* rwork, double& mass);
92 
115  int update(int eId, int eType, int nenod, int nedof,
116  const double* X, const double* T,
117  const double* V, const double* A, int* iwork, double* rwork,
118  double* Kt, double* Ct, double* M,
119  double* Fs, double* Fd, double* Fi, double* Q,
120  double t, double dt, int istep, int iter);
121 
131  int origin(int eId, int eType, int nenod,
132  const double* X, const double* T,
133  const int* iwork, const double* rwork, double* Tlg);
134 
145  int result(int eId, int eType, int idx,
146  const int* iwork, const double* rwork, int nchar, char* name);
156  int result(int eId, int eType, int idx,
157  const int* iwork, const double* rwork, double& value);
158 };
159 
160 #endif
Management of dynamic loading of shared object libraries.
Template for singleton classes.
Base class for dynamic loading of shared object libraries.
Definition: FFaDynamicLibraryBase.H:37
Template for singleton classes.
Definition: FFaSingelton.H:26
Singleton class for user-defined elements plugins.
Definition: FiUserElmPlugin.H:26
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:335
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:408
int getTypeName(int eType, int nchar, char *name)
Returns the name of an element type.
Definition: FiUserElmPlugin.C:120
int init(const double *gdata)
Initializes the plugin.
Definition: FiUserElmPlugin.C:153
FiUserElmPlugin()
The constructor is private to allow singelton construction only.
Definition: FiUserElmPlugin.H:28
bool getSign(int nchar, char *sign, bool silence=false)
Returns the signature string of the loaded plugin.
Definition: FiUserElmPlugin.C:61
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:245
int getElementTypes(int maxUE, int *eType)
Returns a list of element types defined in the plugin.
Definition: FiUserElmPlugin.C:93
virtual ~FiUserElmPlugin()
The destructor is private to allow singelton destruction only.
Definition: FiUserElmPlugin.H:30
bool validate(const std::string &lib, int nchar=0, char *sign=NULL)
Checks if the named library can be loaded as a plugin.
Definition: FiUserElmPlugin.C:49
File handling utilities.
Definition: FiSwappedIO.H:20