xc
HalfDiagramMaterial.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis C. 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 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.5 $
48 // $Date: 2008-04-14 21:26:50 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/HalfDiagramMaterial.h,v $
50 
51 // Created: Aug 2022
52 //
53 // Description: This file contains the class definition for
54 // HalfDiagramMaterial. HalfDiagramMaterial wraps a UniaxialMaterial
55 // and removes the positive or negative part of its diagram
56 // (see derived classes).
57 
58 #ifndef HalfDiagramMaterial_h
59 #define HalfDiagramMaterial_h
60 
61 #include "material/uniaxial/EncapsulatedUniaxialMaterial.h"
62 
63 namespace XC {
67  {
68  protected:
69  const double factor= 0.0001;
70  protected:
71  DbTagData &getDbTagData(void) const;
72  public:
73  HalfDiagramMaterial(int tag, int classTag, UniaxialMaterial &material);
74  HalfDiagramMaterial(int tag, int classTag);
75 
76  int setTrialStrain(double strain, double strainRate = 0.0);
77  //int setTrialStrain(double strain, double FiberTemperature, double strainRate);
78 
79  inline double getInitialTangent(void) const
80  { return this->getMaterial()->getInitialTangent();}
81 
82  int revertToLastCommit(void);
83  int revertToStart(void);
84 
85 
86  int sendSelf(Communicator &);
87  int recvSelf(const Communicator &);
88 
89  void Print(std::ostream &s, int flag =0) const;
90 
91  // AddingSensitivity:BEGIN //////////////////////////////////////////
92  int setParameter(const std::vector<std::string> &, Parameter &);
93  int updateParameter(int parameterID, Information &info);
94  double getStrainSensitivity (int gradIndex);
95  double getInitialTangentSensitivity(int gradIndex);
96  double getRhoSensitivity (int gradIndex);
97  // AddingSensitivity:END ///////////////////////////////////////////
98  };
99 } // end of XC namespace
100 
101 #endif
102 
HalfDiagramMaterial(int tag, int classTag, UniaxialMaterial &material)
Constructor.
Definition: HalfDiagramMaterial.cc:62
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: HalfDiagramMaterial.cc:136
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: HalfDiagramMaterial.cc:121
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
Removes negative part of the stress-strain diagram.
Definition: HalfDiagramMaterial.h:66
int setTrialStrain(double strain, double strainRate=0.0)
Sets the value of the trial strain.
Definition: HalfDiagramMaterial.cc:70
int setParameter(const std::vector< std::string > &, Parameter &)
Sets the value param to the parameter argv.
Definition: HalfDiagramMaterial.cc:127
int recvSelf(const Communicator &)
Receive the object.
Definition: HalfDiagramMaterial.cc:108
const UniaxialMaterial * getMaterial(void) const
Return a pointer to the encapsulated material.
Definition: EncapsulatedUniaxialMaterial.h:49
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: HalfDiagramMaterial.cc:89
Parameter.
Definition: Parameter.h:68
int sendSelf(Communicator &)
Send the object.
Definition: HalfDiagramMaterial.cc:96
Encapsulates a copy to an uniaxial material.
Definition: EncapsulatedUniaxialMaterial.h:39