xc
PBowlLoading.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 //# COPYRIGHT (C): Woody's license (by BJ):
30 // ``This source code is Copyrighted in
31 // U.S., for an indefinite period, and anybody
32 // caught using it without our permission, will be
33 // mighty good friends of ourn, cause we don't give
34 // a darn. Hack it. Compile it. Debug it. Run it.
35 // Yodel it. Enjoy it. We wrote it, that's all we
36 // wanted to do.''
37 //
38 //# PROJECT: Object Oriented Finite Element Program
39 //# PURPOSE: Plastic Bowl (aka Domain Reduction) implementation:
40 //# This file contains the class definition for PBowlLoading.
41 //# PBowlLoading is a subclass of loadPattern,
42 //# which implements the plastic bowl loading
43 //# (aka Domain Reduction Method) as described
44 //# by Jacobo Bielak et al.
45 //# CLASS: PBowlLoading
46 //#
47 //# VERSION: 0.61803398874989 (golden section)
48 //# LANGUAGE: C++
49 //# TARGET OS: all...
50 //# DESIGN: Zhaohui Yang, Boris Jeremic
51 //# PROGRAMMER(S): Jinxiu Liao, Zhaohui Yang, Boris Jeremic
52 //#
53 //#
54 //# DATE: 21Oct2002
55 //# UPDATE HISTORY: 31Oct2002 fixed some memory leaks
56 //# 04Nov2002 changed the way plastic bowl elements are
57 //# input.
58 //# 10Nov2002 Zeroing diagonal and out of diagaonal blocks
59 //# for b<->e nodes
60 //# 13Nov2002 changes to split "b" and "e" nodes within
61 //# the plastic bowl elements. Also, simple definition of
62 //# of cubic bowl is now facilitated ...
63 //#
64 //#
65 //#
66 //===============================================================================
67 
68 #ifndef PBowlLoading_h
69 #define PBowlLoading_h
70 
71 // Purpose:
72 #include <domain/load/pattern/LoadPattern.h>
73 
74 namespace XC {
75 class Vector;
76 class Matrix;
77  class ID;
78 
80 //
83  {
84  private:
85  ID *PBowlElements; // vector containing the plastic bowling elements
86  ID *ExteriorNodes; // vector containing the nodes on plastic bowl except boundary nodes
87  ID *BoundaryNodes; // vector containing the nodes on the boundary of the plastic bowl
88  Matrix *PBowlLoads; // matrix containing the plastic bowling loads
89 
90  Matrix *U; // vector to store input displ. for all nodes and all time steps
91  int UnumDataPoints; // number of data points
92  Matrix *Udd; // vector to store input accel. for all nodes and all time steps
93  int UddnumDataPoints;// number of data points
94 
95  int thetimeSteps;
96 
97 
98  //Coordinates for the plastic box
99  double PBTimeIncr; // specifies the time increment used in load path vector
100  double cFactor; // additional factor on the returned load factor
101  double xPlus; // x-coor for the right surface
102  double xMinus; // x-coor for the left surface
103  double yPlus; // y-coor for the right surface
104  double yMinus; // y-coor for the left surface
105  double zPlus; // z-coor for the up surface
106  double zMinus; // z-coor for the bottom surface
107 
108  bool LoadComputed; // flag to indicate whether the equivalent force has been computed
109  protected:
110  //void addPBElements(const ID &PBEle); //Adding plastic bowl elements
111  //void addPBNodes(const ID &PBNodes); //Adding plastic bowl nodes
112  //void addPBLoads(const Matrix &PBLoads); //Adding plastic bowl loades
113  void CompPBLoads(); //Finding all plastic bowl nodes and compute the equivalent forces from plastic bowl loading
114  const Vector & getNodalLoad(int node, double time); //Getting the nodal load computed from plastic bowl loading corresponding to time
115  public:
116  PBowlLoading(void);
117  PBowlLoading(int tag);
118  PBowlLoading(int tag, const char *PBEfName, const char *DispfName,
119  const char *AccefName, double theTimeIncr=1.0,double theFactor=1.0,
120 // coordinates of "b" nodes for cubic plastic bowl
121  double xplus = 0.0,
122  double xminus = 0.0,
123  double yplus = 0.0,
124  double yminus = 0.0,
125  double zplus = 0.0,
126  double zminus = 0.0);
127  ~PBowlLoading(void);
128 
129  void setDomain(Domain *theDomain);
130  void applyLoad(double time);
131  void Print(std::ostream &s, int flag =0) const;
132 
133  // methods for o/p
134  int sendSelf(Communicator &);
135  int recvSelf(const Communicator &);
136 
137  };
138 } // end of XC namespace
139 
140 #endif
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: PBowlLoading.cpp:436
Float vector abstraction.
Definition: Vector.h:94
Communication parameters between processes.
Definition: Communicator.h:66
void setDomain(Domain *theDomain)
Set the domain for the pattern loads.
Definition: PBowlLoading.cpp:374
??.
Definition: PBowlLoading.h:82
void Print(std::ostream &s, int flag=0) const
Prints load pattern information.
Definition: PBowlLoading.cpp:587
Vector of integers.
Definition: ID.h:95
A load pattern is the spatial distribution as well as its variation in time of a specific set of forc...
Definition: LoadPattern.h:97
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: PBowlLoading.cpp:443
void applyLoad(double time)
Apply the load for pseudo-time being passed as parameter.
Definition: PBowlLoading.cpp:399
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117