XC Open source finite element analysis program
NodeLocker.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //NodeLocker.h
28 
29 #ifndef NodeLocker_h
30 #define NodeLocker_h
31 
32 #include "domain/component/ForceReprComponent.h"
33 
34 namespace XC {
35 class SFreedom_Constraint;
36 class SingleDomSFreedom_Iter;
37 class SFreedom_ConstraintIter;
38 class TaggedObjectStorage;
39 
41 //
45  {
46  void alloc_contenedores(void);
47  void alloc_iteradores(void);
48  NodeLocker(const NodeLocker &otro);
49  NodeLocker &operator=(const NodeLocker &otro);
50  protected:
51  int nextTag;
52  int currentGeoTag;
53  int lastGeoSendTag;
54 
55  // storage objects for the constraints
57  // iterator objects for the objects added to the storage objects
59 
60  DbTagData &getDbTagData(void) const;
61  int sendData(CommParameters &cp);
62  int recvData(const CommParameters &cp);
63 
64 
65  friend class NodeLockers;
66  friend class FEM_ObjectBroker;
67  NodeLocker(void);
68  NodeLocker(int tag);
69  NodeLocker(int tag, int classTag);
70  virtual bool addSFreedom_Constraint(SFreedom_Constraint *theSp);
71  public:
72  virtual ~NodeLocker(void);
73 
74  // method to set the associated Domain
75  virtual void setDomain(Domain *theDomain);
76 
77  // methods to add loads
78  virtual SFreedom_Constraint *addSFreedom_Constraint(const int &tagNodo,const int &id_gdl,const double &valor);
79 
80  virtual SFreedom_ConstraintIter &getSPs(void);
81  int getNumSPs(void) const;
82 
83  // methods to remove loads
84  virtual void clearAll(void);
85  SFreedom_Constraint *newSPConstraint(const int &,const int &,const double &);
86  virtual bool removeSFreedom_Constraint(int tag);
87 
88  // methods to apply loads
89  virtual void applyLoad(const double &pseudoTime= 0.0,const double &factor= 1.0);
90 
91  // methods for o/p
92  virtual int sendSelf(CommParameters &);
93  virtual int recvSelf(const CommParameters &);
94 
95  virtual void Print(std::ostream &s, int flag =0);
96 
97 
98 
99  std::deque<int> getTagsSPsNode(int theNode, int theDOF) const;
100  std::deque<int> getTagsSPsNode(int theNode) const;
101  bool nodeAffectedBySPs(int nodeTag) const;
102  };
103 
104 
105 } // end of XC namespace
106 
107 #endif
108 
109 
110 
111 
112 
113 
114 
virtual bool removeSFreedom_Constraint(int tag)
Elimina la coacción mononodal cuyo tag being passed as parameter.
Definition: NodeLocker.cc:201
Single freedom constraints that make part of a load pattern.
Definition: NodeLocker.h:44
SingleDomSFreedom_Iter * theSpIter
Constraint iterator.
Definition: NodeLocker.h:58
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
virtual void applyLoad(const double &pseudoTime=0.0, const double &factor=1.0)
Aplica the load en el instante being passed as parameter.
Definition: NodeLocker.cc:211
std::deque< int > getTagsSPsNode(int theNode, int theDOF) const
Returns the constraint that affect the node and DOF being passed as parameter.
Definition: NodeLocker.cc:284
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: NodeLocker.cc:228
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: NodeLocker.cc:247
Definition: SingleDomSFreedom_Iter.h:72
virtual void clearAll(void)
Deletes all constraints.
Definition: NodeLocker.cc:191
virtual ~NodeLocker(void)
Destructor.
Definition: NodeLocker.cc:124
FEM_ObjectBroker is is an object broker class for the finite element method. All methods are virtual ...
Definition: FEM_ObjectBroker.h:138
Base class for components that represent forces.
Definition: ForceReprComponent.h:37
TaggedObjectStorage * theSPs
Constraint container.
Definition: NodeLocker.h:56
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: NodeLocker.cc:221
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: NodeLocker.cc:237
virtual SFreedom_ConstraintIter & getSPs(void)
Returns an iterator a las coacciones mononodales.
Definition: NodeLocker.cc:175
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: NodeLocker.cc:260
int getNumSPs(void) const
Returns the número de coacciones monopunto.
Definition: NodeLocker.cc:182
virtual void Print(std::ostream &s, int flag=0)
Imprime el load pattern.
Definition: NodeLocker.cc:273
virtual void setDomain(Domain *theDomain)
Set the domain for the constraints.
Definition: NodeLocker.cc:132
int nextTag
Default tag for next node locker.
Definition: NodeLocker.h:51
TaggedObjectStorage. A TaggedObjectStorage object a container object used to hold objects of type Tag...
Definition: TaggedObjectStorage.h:76
NodeLocker(void)
Default constructor.
Definition: NodeLocker.cc:106
NodeLocker container.
Definition: NodeLockers.h:41
Single freedom constraint.
Definition: SFreedom_Constraint.h:79
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
virtual bool addSFreedom_Constraint(SFreedom_Constraint *theSp)
Adds the single freedom constraint being passed as parameter.
Definition: NodeLocker.cc:156
Iterator over single freedom constraints.
Definition: SFreedom_ConstraintIter.h:75
bool nodeAffectedBySPs(int nodeTag) const
Returns true if the single freedom constraints affect the node which identifier is being passed as pa...
Definition: NodeLocker.cc:325