xc
NDAdaptorMaterial.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 //NDAdaptorMaterial.h
29 
30 #ifndef NDAdaptorMaterial_h
31 #define NDAdaptorMaterial_h
32 
33 #include "utility/matrix/Vector.h"
34 #include "material/nD/NDMaterial.h"
35 
36 namespace XC {
40 //
42 //
48  {
49  protected:
50  double Tstrain22;
51  double Cstrain22;
52 
53  NDMaterial *theMaterial;
54  Vector strain;
55  protected:
56  void free(void);
57  void alloc(const NDMaterial *, const std::string &type);
58  int sendData(Communicator &);
59  int recvData(const Communicator &);
60  public:
61  NDAdaptorMaterial(int classTag, int tag, const NDMaterial &theMat, int strain_size);
62  NDAdaptorMaterial(int classTag, int tag, int strain_size);
63  NDAdaptorMaterial(int classTag, int strain_size);
65  NDAdaptorMaterial &operator=(const NDAdaptorMaterial &);
66  virtual ~NDAdaptorMaterial(void);
67 
68  const Vector& getStrain(void);
69  double getRho(void) const;
70 
71  int commitState(void);
72  int revertToLastCommit(void);
73  int revertToStart(void);
74 
75  Response *setResponse(const std::vector<std::string> &, Information &);
76 
77  void Print(std::ostream &s, int flag) const;
78 
79  };
80 } // end of XC namespace
81 
82 #endif
83 
84 
85 
Float vector abstraction.
Definition: Vector.h:94
double getRho(void) const
Get material density.
Definition: NDAdaptorMaterial.cc:117
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
void Print(std::ostream &s, int flag) const
Print stuff.
Definition: NDAdaptorMaterial.cc:144
int revertToStart(void)
Revert the material to its initial state.
Definition: NDAdaptorMaterial.cc:107
Base class for ND adaptor materials.
Definition: NDAdaptorMaterial.h:47
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: NDAdaptorMaterial.cc:134
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int commitState(void)
Commit the state of the material.
Definition: NDAdaptorMaterial.cc:94
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: NDAdaptorMaterial.cc:124