xc
MeshRegion.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.3 $
49 // $Date: 2003/02/14 23:01:02 $
50 // $Source: domain/mesh/region/MeshRegion.h,v $
51 
52 
53 // Written: fmk
54 //
55 // Description: This file contains the class definition for MeshRegion.
56 // A Region is a part of the domain which is defined by a set of
57 // Elements and Nodes (all the end nodes of the elements are in the region,
58 // as are all elements whose end nodes are in the region)
59 //
60 // What: "@(#) Region.h, revA"
61 
62 #ifndef MeshRegion_h
63 #define MeshRegion_h
64 
65 #include "domain/component/ContinuaReprComponent.h"
66 #include "domain/mesh/element/utils/RayleighDampingFactors.h"
67 
68 namespace XC {
69 class Element;
70 class Node;
71 class ElementRecorder;
72 class NodeRecorder;
73 class ID;
74 
76 //
79  {
80  private:
81  RayleighDampingFactors rayFactors;
82 
83  ID theNodes;
84  ID theElements;
85 
86  int currentGeoTag;
87  int lastGeoSendTag;
88 
89  int sendData(Communicator &);
90  int recvData(const Communicator &);
91  public:
92  MeshRegion(int tag);
93  MeshRegion(int tag, int classTag);
94  virtual ~MeshRegion(void);
95  virtual MeshRegion *getCopy(void) const;
96 
97  // methods dealing with setting up the region
98  virtual int setNodes(const ID &theNodes);
99  virtual int setElements(const ID &theEles);
100 
101  // methods getting the ID's of nodes & ele
102  virtual const ID &getNodes(void);
103  virtual const ID &getElements(void);
104 
105  // methods dealing with setting parameters in the region
106  virtual int setRayleighDampingFactors(const RayleighDampingFactors &rF);
107 
108  // methods to send & recv data for database/parallel applications
109  virtual int sendSelf(Communicator &);
110  virtual int recvSelf(const Communicator &);
111  boost::python::dict getPyDict(void) const;
112  void setPyDict(const boost::python::dict &);
113 
114  virtual void Print(std::ostream &s, int flag =0) const;
115  };
116 } // end of XC namespace
117 
118 
119 #endif
120 
Communication parameters between processes.
Definition: Communicator.h:66
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: MeshRegion.cpp:311
Vector of integers.
Definition: ID.h:95
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: MeshRegion.cpp:323
virtual int recvSelf(const Communicator &)
Receive the object.
Definition: MeshRegion.cpp:290
Base class for components used to represent the material (continuum).
Definition: ContinuaReprComponent.h:39
virtual void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: MeshRegion.cpp:333
virtual MeshRegion * getCopy(void) const
Virtual constructor.
Definition: MeshRegion.cpp:90
Rayleigh damping factors.
Definition: RayleighDampingFactors.h:59
virtual ~MeshRegion(void)
Destructor.
Definition: MeshRegion.cpp:94
virtual int sendSelf(Communicator &)
Send the object.
Definition: MeshRegion.cpp:276
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Nodes and elements of a mesh region.
Definition: MeshRegion.h:78