XC Open source finite element analysis program
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 //
38 //
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 
68  void setDomain(Domain *);
69 
70  virtual int getVtkCellType(void) const;
71  virtual int getMEDCellType(void) const;
72 
73  virtual void Print(std::ostream &s, int flag =0);
74  };
75 } // end of XC namespace
76 
77 #endif
78 
79 
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: Constraint.cc:117
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
virtual const Node * getNode(void) const
Returns a pointer to the constrained node.
Definition: Constraint.cc:96
void setNodeTag(const int &nt)
Sets the identifier of the node that will be constrained.
Definition: Constraint.cc:84
int constrNodeTag
constrained node tag
Definition: Constraint.h:52
Base class for components used to represent the material (continuum).
Definition: ContinuaReprComponent.h:37
Base class for model constraints.
Definition: Constraint.h:49
Mesh node.
Definition: Node.h:99
virtual int getNodeTag(void) const
Returns the identifier of the constrained node.
Definition: Constraint.cc:89
~Constraint(void)
Destructor.
Definition: Constraint.cc:51
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: Constraint.cc:126
virtual int getNodeIdx(void) const
Returns an index for the node (used for VTK arrays).
Definition: Constraint.cc:106
virtual void Print(std::ostream &s, int flag=0)
Prints some information about the constraint.
Definition: Constraint.cc:136
Constraint(int classTag)
Default constructor; receives the tag of the class as a paramenter.
Definition: Constraint.cc:39
virtual int getMEDCellType(void) const
returns the "MED fichier" cell type.
Definition: Constraint.cc:150
void setDomain(Domain *)
Sets the domain for the constraint.
Definition: Constraint.cc:63
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
virtual int getVtkCellType(void) const
returns the VTK cell type.
Definition: Constraint.cc:143