xc
Constraint.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 //Constraint.h
28 
29 #ifndef Constraint_h
30 #define Constraint_h
31 
32 #include "domain/component/ContinuaReprComponent.h"
33 
34 
35 namespace XC {
37 //
40 //
42 //
45 //
47 //
50  {
51  protected:
53 
54  int sendData(CommParameters &);
55  int recvData(const CommParameters &);
56  public:
57  // constructors
58  Constraint(int classTag);
59  Constraint(int spTag, int nodeTag, int classTag);
60  ~Constraint(void);
61 
62  void setNodeTag(const int &nt);
63  virtual int getNodeTag(void) const;
64  virtual const Node *getNode(void) const;
65  virtual int getNodeIdx(void) const;
66  virtual int applyConstraint(double loadFactor)= 0;
67  virtual bool affectsNode(int ) const;
68  virtual bool affectsNodeAndDOF(int , int ) const;
69 
70  void setDomain(Domain *);
71 
72  virtual int getVtkCellType(void) const;
73 
74  virtual void Print(std::ostream &s, int flag =0);
75  };
76 } // end of XC namespace
77 
78 #endif
79 
80 
virtual const Node * getNode(void) const
Returns a pointer to the constrained node.
Definition: Constraint.cc:95
int constrNodeTag
constrained node tag
Definition: Constraint.h:52
virtual bool affectsNode(int) const
Returns true ifafecta to the node cuyo tag being passed as parameter.
Definition: Constraint.cc:115
virtual bool affectsNodeAndDOF(int, int) const
Returns true if the constraint affects the node and DOF arguments.
Definition: Constraint.cc:119
void setNodeTag(const int &nt)
Sets the identifier of the node that will be constrained.
Definition: Constraint.cc:83
Constraint(int classTag)
Default constructor; receives the tag of the class as a paramenter.
Definition: Constraint.cc:38
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: Constraint.cc:138
Base class for components used to represent the material (continuum).
Definition: ContinuaReprComponent.h:37
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: Constraint.cc:129
virtual int getNodeIdx(void) const
Returns an index for the node (used for VTK arrays).
Definition: Constraint.cc:105
virtual int getVtkCellType(void) const
returns the VTK cell type.
Definition: Constraint.cc:155
~Constraint(void)
Destructor.
Definition: Constraint.cc:50
virtual void Print(std::ostream &s, int flag=0)
Prints some information about the constraint.
Definition: Constraint.cc:148
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
Base class for model constraints.
Definition: Constraint.h:49
virtual int getNodeTag(void) const
Returns the identifier of the constrained node.
Definition: Constraint.cc:88
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116
Mesh node.
Definition: Node.h:110
void setDomain(Domain *)
Sets the domain for the constraint.
Definition: Constraint.cc:62