FEDEM Model Database  R8.0
Source code of the FEDEM model database
FFlWAVGM.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 #ifndef FFL_WAVGM_H
9 #define FFL_WAVGM_H
10 
11 #include "FFlLib/FFlElementBase.H"
14 #include "FFlLib/FFlTypeInfoSpec.H"
15 #ifdef FT_USE_MEMPOOL
17 #endif
18 
19 #ifdef FF_NAMESPACE
20 namespace FF_NAMESPACE {
21 #endif
22 
23 
25 {
26 public:
29  virtual ~FFlWAVGMTopSpec() {}
30 
31  // The first element node is a slave and cannot be external
32  virtual bool isSlaveNode(int node) const { return node == 1; }
33  virtual bool isReferenceNode(int node) const { return node == 1; }
34 };
35 
36 
37 class FFlWAVGM : public FFlElementBase
38 {
39 public:
40  FFlWAVGM(int ID);
41  FFlWAVGM(const FFlWAVGM& obj);
42  virtual ~FFlWAVGM();
43 
44  static void init();
45 
46  virtual bool setNode(const int topologicalPos, FFlNode* nodeRef);
47  virtual bool setNode(const int topologicalPos, int nodeRef);
48  virtual bool setNodes(const std::vector<int>& nodeRefs,
49  size_t offset, bool = false);
50  virtual bool setNodes(const std::vector<FFlNode*>& nodeRefs,
51  size_t offset, bool = false);
52 
53  void setSlaveNode(FFlNode* nodeRef);
54  void setSlaveNode(int nodeRef);
55 
56  void addMasterNode(FFlNode* nodeRef);
57  void addMasterNode(int nodeRef);
58  void addMasterNodes(const std::vector<int>& nodeRefs);
59  void addMasterNodes(const std::vector<FFlNode*>& nodeRefs);
60  bool removeMasterNodes(std::vector<int>& nodeRefs);
61 
62  FFlNode* getSlaveNode() const;
63  void getMasterNodes(std::vector<FFlNode*>& nodeRefs) const;
64 
65  // returns a unique topology spec for the WAVGM element
66  virtual FFlFEElementTopSpec* getFEElementTopSpec() const;
67 
71 
72 protected:
74 
75 #ifdef FT_USE_MEMPOOL
77 #endif
78 };
79 
80 #ifdef FF_NAMESPACE
81 } // namespace
82 #endif
83 #endif
Streamlined efficient memory allocation.
#define FFA_MAKE_MEMPOOL
Macro adding memory pool features to a class.
Definition: FFaMemPool.H:139
Definition: FFlElementBase.H:43
Definition: FFlFEElementTopSpec.H:31
FE node class. Stores node position and additional data for the node.
Definition: FFlNode.H:39
Definition: FFlWAVGM.H:25
virtual bool isReferenceNode(int node) const
Definition: FFlWAVGM.H:33
virtual bool isSlaveNode(int node) const
Definition: FFlWAVGM.H:32
virtual ~FFlWAVGMTopSpec()
Definition: FFlWAVGM.H:29
FFlWAVGMTopSpec(const FFlFEElementTopSpec &obj)
Definition: FFlWAVGM.H:28
FFlWAVGMTopSpec()
Definition: FFlWAVGM.H:27
Definition: FFlWAVGM.H:38
FFL_TYPE_INFO(FFlWAVGM)
FFlFEElementTopSpec * myWAVGMElemTopSpec
Definition: FFlWAVGM.H:73
FFL_FE_ATTRIBUTE_SPEC(FFlWAVGM)
FFL_FE_ELEMENT_FACTORY_INIT(FFlWAVGM)
void init()
Definition: FmDB.C:518