xc
DOF_Numberer.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.1.1.1 $
49 // $Date: 2000/09/15 08:23:17 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/numberer/DOF_Numberer.h,v $
51 
52 
53 // File: ~/analysis/numberer/DOF_Numberer.h
54 //
55 // Written: fmk
56 // Created: 9/96
57 // Revision: A
58 //
59 // Description: This file contains the class definition for DOF_Numberer.
60 // DOF_Numberer is an abstract base class, i.e. no objects of it's
61 // type can be created.
62 //
63 // What: "@(#) DOF_Numberer.h, revA"
64 
65 #ifndef DOF_Numberer_h
66 #define DOF_Numberer_h
67 
68 #include <utility/actor/actor/MovableObject.h>
69 #include "utility/kernel/CommandEntity.h"
70 
71 namespace XC {
72 class AnalysisModel;
73 class GraphNumberer;
74 class FEM_ObjectBroker;
75 class ID;
76 class ModelWrapper;
77 
81 //
83 //
95  {
96  private:
97  ModelWrapper *getModelWrapper(void);
98  const ModelWrapper *getModelWrapper(void) const;
99 
100  GraphNumberer *theGraphNumberer;
101  protected:
104  const AnalysisModel *getAnalysisModelPtr(void) const;
105  const GraphNumberer *getGraphNumbererPtr(void) const;
106 
107  int sendData(Communicator &);
108  int recvData(const Communicator &);
109  void alloc(const std::string &);
110  void copy(const GraphNumberer &);
111  void free_mem(void);
112 
113  friend class ModelWrapper;
114  friend class FEM_ObjectBroker;
115  DOF_Numberer(ModelWrapper *,int classTag= NUMBERER_TAG_DOF_Numberer);
116  DOF_Numberer(const DOF_Numberer &);
117  DOF_Numberer &operator=(const DOF_Numberer &);
118  virtual DOF_Numberer *getCopy(void) const;
119  public:
120  virtual ~DOF_Numberer(void);
121 
122  // pure virtual functions
123  virtual int numberDOF(int lastDOF_Group = -1);
124  virtual int numberDOF(ID &lastDOF_Groups);
125 
126  void useAlgorithm(const std::string &);
127 
128  virtual int sendSelf(Communicator &);
129  virtual int recvSelf(const Communicator &);
130  };
131 } // end of XC namespace
132 
133 #endif
134 
Base class for DOF numbererers.
Definition: DOF_Numberer.h:94
Communication parameters between processes.
Definition: Communicator.h:66
virtual int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: DOF_Numberer.cpp:559
Object that can move between processes.
Definition: MovableObject.h:100
void copy(const GraphNumberer &)
Copy the graph numberer.
Definition: DOF_Numberer.cpp:103
FEM_ObjectBroker is is an object broker class for the finite element method.
Definition: FEM_ObjectBroker.h:151
Vector of integers.
Definition: ID.h:95
GraphNumberer * getGraphNumbererPtr(void)
Return a pointer to the GraphNumberer object associated with the DOF_Numberer, theGraphNumberer.
Definition: DOF_Numberer.cpp:612
virtual int numberDOF(int lastDOF_Group=-1)
Invoked to assign the equation numbers to the dofs.
Definition: DOF_Numberer.cpp:185
Wrapper for the finite element model "as seen" from the solver.
Definition: ModelWrapper.h:59
virtual ~DOF_Numberer(void)
Destructor.
Definition: DOF_Numberer.cpp:148
Container for FE_Element and DOF_Group objects created by the constraint handler. ...
Definition: AnalysisModel.h:134
Objet that can execute python scripts.
Definition: CommandEntity.h:40
AnalysisModel * getAnalysisModelPtr(void)
Returns a pointer to the analysis model.
Definition: DOF_Numberer.cpp:598
DOF_Numberer(ModelWrapper *, int classTag=NUMBERER_TAG_DOF_Numberer)
Constructor.
Definition: DOF_Numberer.cpp:121
Numberer for problem&#39;s degrees of freedom.
Definition: GraphNumberer.h:86
virtual int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: DOF_Numberer.cpp:543
void alloc(const std::string &)
Create the graph numberer (.
Definition: DOF_Numberer.cpp:86
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void free_mem(void)
Constructor.
Definition: DOF_Numberer.cpp:110
virtual DOF_Numberer * getCopy(void) const
Virtual constructor.
Definition: DOF_Numberer.cpp:152
void useAlgorithm(const std::string &)
Sets the algorithm to be used for numerating the graph «Reverse Cuthill-Macgee» o simple...
Definition: DOF_Numberer.cpp:144
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: DOF_Numberer.cpp:534
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: DOF_Numberer.cpp:518