xc
Material.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 /* ****************************************************************** **
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.3 $
48 // $Date: 2003/02/25 23:33:21 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/Material.h,v $
50 
51 
52 #ifndef Material_h
53 #define Material_h
54 
55 // File: Material.h
56 //
57 // Written: fmk
58 // Created: 05/98
59 // Revision: A
60 //
61 // Description: This file contains the class definition for Material.
62 // Material is an abstract base class and thus no objects of it's type
63 // can be instantiated. It has pure virtual functions which must be
64 // implemented in it's derived classes.
65 //
66 // What: "@(#) Material.h, revA"
67 
68 #include "utility/tagged/TaggedObject.h"
69 #include "utility/actor/actor/MovableObject.h"
70 #include "utility/actor/objectBroker/FEM_ObjectBroker.h"
71 #include "utility/matrix/ID.h"
72 #include "utility/actor/actor/BrokedPtrCommMetaData.h"
73 
74 namespace XC {
75 class Information;
76 class Response;
77 class MaterialHandler;
78 class ID;
79 
81 
83 //
91 class Material: public TaggedObject, public MovableObject
92  {
93  public:
94  Material(int tag, int classTag);
95 
96  const MaterialHandler *getMaterialHandler(void) const;
98  std::string getName(void) const;
99 
100  virtual int setVariable(const std::string &argv);
101  virtual int getVariable(int variableID, double &info);
102 
103  // methods for sensitivity studies
104  virtual int setParameter(const std::vector<std::string> &argv, Parameter &param);
105  virtual int updateParameter(int responseID, Information &eleInformation);
106 
107  virtual Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
108  virtual int getResponse(int responseID, Information &info);
109 
110  virtual void update(void);
111 
112  virtual const Vector &getGeneralizedStress(void) const= 0;
113  virtual const Vector &getGeneralizedStrain(void) const= 0;
114  virtual const Vector &getInitialGeneralizedStrain(void) const= 0;
115 
116  virtual void setInitialGeneralizedStrain(const Vector &)= 0;
117  virtual void addInitialGeneralizedStrain(const Vector &);
118  virtual void zeroInitialGeneralizedStrain(void);
119 
120  virtual int commitState(void) = 0;
121  virtual int revertToLastCommit(void) = 0;
122  virtual int revertToStart(void) = 0;
123 
124  };
125 
128 
129 } // end of XC namespace
130 
131 
132 #endif
133 
Float vector abstraction.
Definition: Vector.h:93
int sendMaterialPtr(Material *, DbTagData &, CommParameters &cp, const BrokedPtrCommMetaData &)
Sends a pointer to material through the communicator being passed as parameter.
Definition: Material.cpp:146
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
Material(int tag, int classTag)
Constructor.
Definition: Material.cpp:73
Object that can move between processes.
Definition: MovableObject.h:99
std::string getName(void) const
Returns the name of the material.
Definition: Material.cpp:97
virtual int getResponse(int responseID, Information &info)
Returns material response.
Definition: Material.cpp:119
virtual void update(void)
Update state variables for the material according to the new values of the parameters.
Definition: Material.cpp:124
Base class for materials.
Definition: Material.h:91
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
virtual int updateParameter(int responseID, Information &eleInformation)
Updates the parameter identified by parameterID with info.
Definition: Material.cpp:112
Material * receiveMaterialPtr(Material *, DbTagData &, const CommParameters &cp, const BrokedPtrCommMetaData &)
Receives a pointer to material through the communicator being passed as parameter.
Definition: Material.cpp:163
virtual void zeroInitialGeneralizedStrain(void)
zeroes initial generalized strain
Definition: Material.cpp:135
virtual void addInitialGeneralizedStrain(const Vector &)
Increments generalized strain.
Definition: Material.cpp:129
Material handler (definition, searching,...).
Definition: MaterialHandler.h:45
Data to transmit for a pointer «broked».
Definition: BrokedPtrCommMetaData.h:39
virtual int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: Material.cpp:109
Object idenfied by an integer (tag).
Definition: TaggedObject.h:91
const MaterialHandler * getMaterialHandler(void) const
Returns (if possible) a pointer to the material handler (owner).
Definition: Material.cpp:77
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
Definition: Parameter.h:65