FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmDamperBase.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 
8 /*******************************************************************************
9  * CLASS: FmDamperBase
10  * AUTHOR: Jens LIEN
11  * LAST MODIFIED: 14 jun 1995
12  *
13  * DESCRIPTION:
14  * Parent class for the database entries.
15  * Has an additional element for the Damper ring.
16  ******************************************************************************/
17 
18 #ifndef FM_DAMPER_BASE_H
19 #define FM_DAMPER_BASE_H
20 
22 #include "vpmDB/FmMathFuncBase.H"
23 
24 
26 {
28 
29 protected:
30  FmDamperBase();
31  virtual ~FmDamperBase() {}
32 
33  virtual bool cloneLocal(FmBase* obj, int depth);
34  static bool localParse(const char* keyWord, std::istream& activeStatement,
35  FmDamperBase* obj);
36 
37 public:
38  // The constant damping coefficient, used only if damperFunction is none
39  double getInitDamp() const { return myDampCoeff.getValue(); }
40  bool setInitDamp(double d) { return myDampCoeff.setValue(d); }
41 
42  // The damper function, used only in fedem >= v3.0
45 
46  // The scale engine that scales the damper force/coefficient.
47  // In fedem < v3.0 : The damper coefficient function directly
48  // In fedem >= v3.0: A scale engine
49  FmEngine* getDampEngine() const { return this->getEngine(); }
50  void setDampEngine(FmEngine* func) { this->setEngine(func); }
51 
52  bool isForceFunc() const;
53 
54  // This is accessed by FmMathFuncBase only
55  std::pair<bool,bool> isForceFuncFromFile() const;
56 
57  virtual int getDOF() const { return 1; }
58 
59  virtual int printSolverEntry(FILE* fp);
60 
61 private:
63 
66 
67 public:
68  // Indicator for whether the damper velocity is associated with
69  // the deformational velocity of a matching spring
71 
72 private:
74 };
75 
76 #endif
bool setValue(const ValueT &newData, bool checkChanged=true)
Assigns a new value to the field.
Definition: FFaField.H:66
const ValueT & getValue() const
Returns a const reference to myData.
Definition: FFaField.H:56
bool setRef(FFaFieldContainer *ptr)
Sets the pointer value from a FFaFieldContainer pointer directly.
Definition: FFaReference.C:78
Type * getPointer() const
Returns the type-casted pointer this reference points to.
Definition: FFaReference.H:234
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Definition: FmDamperBase.H:26
void setFunction(FmMathFuncBase *func)
Definition: FmDamperBase.H:44
FmEngine * getDampEngine() const
Definition: FmDamperBase.H:49
virtual ~FmDamperBase()
Definition: FmDamperBase.H:31
FFaField< bool > isDefDamper
Definition: FmDamperBase.H:70
FFaField< FFaReferenceBase * > damperFunctionField
Definition: FmDamperBase.H:64
std::pair< bool, bool > isForceFuncFromFile() const
Definition: FmDamperBase.C:41
void setDampEngine(FmEngine *func)
Definition: FmDamperBase.H:50
FFaField< double > myDampCoeff
Definition: FmDamperBase.H:62
FmDamperBase()
Definition: FmDamperBase.C:15
bool setInitDamp(double d)
Definition: FmDamperBase.H:40
FFaReference< FmMathFuncBase > damperFunction
Definition: FmDamperBase.H:65
virtual bool cloneLocal(FmBase *obj, int depth)
Clones the data fields of *obj into *this.
Definition: FmDamperBase.C:61
bool isForceFunc() const
Definition: FmDamperBase.C:29
FFaObsoleteField< bool > isForceFunction
Definition: FmDamperBase.H:73
FmMathFuncBase * getFunction() const
Definition: FmDamperBase.H:43
static bool localParse(const char *keyWord, std::istream &activeStatement, FmDamperBase *obj)
Definition: FmDamperBase.C:50
double getInitDamp() const
Definition: FmDamperBase.H:39
virtual int getDOF() const
Definition: FmDamperBase.H:57
virtual int printSolverEntry(FILE *fp)
Hoook for printing the solver input file entry for this object.
Definition: FmDamperBase.C:67
Definition: FmEngine.H:28
Definition: FmIsControlledBase.H:27
bool setEngine(FmEngine *ctrl)
Definition: FmIsControlledBase.H:32
FmEngine * getEngine() const
Definition: FmIsControlledBase.H:31
Definition: FmMathFuncBase.H:22