Subversion Repositories OpenSees

Rev

Rev 260 | Rev 340 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 fmk 1
/* ****************************************************************** **
2
**    OpenSees - Open System for Earthquake Engineering Simulation    **
3
**          Pacific Earthquake Engineering Research Center            **
4
**                                                                    **
5
**                                                                    **
6
** (C) Copyright 1999, The Regents of the University of California    **
7
** All Rights Reserved.                                               **
8
**                                                                    **
9
** Commercial use of this program without express permission of the   **
10
** University of California, Berkeley, is strictly prohibited.  See   **
11
** file 'COPYRIGHT'  in main directory for information on usage and   **
12
** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
13
**                                                                    **
14
** Developed by:                                                      **
15
**   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
16
**   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
17
**   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
18
**                                                                    **
19
** ****************************************************************** */
20
 
297 fmk 21
// $Revision: 1.8 $                                                              
22
// $Date: 2001-06-16 04:41:14 $                                                                  
17 jeremic 23
// $Source: /usr/local/cvs/OpenSees/SRC/material/nD/ElasticIsotropicMaterial.cpp,v $                                                                
2 fmk 24
 
25
 
26
// File: ~/material/ElasticIsotropicMaterial.C
27
//
28
// Written: MHS 
29
// Created: Feb 2000
30
// Revision: A
31
//
32
// Description: This file contains the class implementation for ElasticIsotropicMaterial.
33
//
34
// What: "@(#) ElasticIsotropicMaterial.C, revA"
35
 
36
#include <string.h>
37
 
38
#include <ElasticIsotropicMaterial.h>
39
#include <ElasticIsotropicPlaneStress2D.h>
40
#include <ElasticIsotropicPlaneStrain2D.h>
17 jeremic 41
#include <ElasticIsotropic3D.h>
236 fmk 42
#include <ElasticIsotropicPlateFiber.h>
2 fmk 43
 
44
#include <Tensor.h>
45
 
46
#include <G3Globals.h>
47
 
48
ElasticIsotropicMaterial::ElasticIsotropicMaterial
297 fmk 49
(int tag, int classTag, double e, double nu, double r)
50
  :NDMaterial(tag, classTag), E(e), v(nu), rho(r)
2 fmk 51
{
52
 
53
}
54
 
55
ElasticIsotropicMaterial::ElasticIsotropicMaterial
297 fmk 56
(int tag, double e, double nu, double r)
57
  :NDMaterial(tag, ND_TAG_ElasticIsotropic), E(e), v(nu), rho(r)
2 fmk 58
{
59
 
60
}
61
 
62
ElasticIsotropicMaterial::~ElasticIsotropicMaterial()
63
{
260 mhscott 64
 
2 fmk 65
}
66
 
297 fmk 67
double
68
ElasticIsotropicMaterial::getRho()
69
{
70
  return rho ;
71
}
72
 
73
 
2 fmk 74
NDMaterial*
75
ElasticIsotropicMaterial::getCopy (const char *type)
76
{
17 jeremic 77
    if (strcmp(type,"PlaneStress2D") == 0)
2 fmk 78
    {
79
        ElasticIsotropicPlaneStress2D *theModel;
297 fmk 80
        theModel = new ElasticIsotropicPlaneStress2D (this->getTag(), E, v, rho);
2 fmk 81
                // DOES NOT COPY sigma, D, and epsilon ...
82
                // This function should only be called during element instantiation, so
83
                // no state determination is performed on the material model object
84
                // prior to copying the material model (calling this function)
85
        return theModel;
86
    }
87
 
17 jeremic 88
    else if (strcmp(type,"PlaneStrain2D") == 0)
2 fmk 89
    {
90
        ElasticIsotropicPlaneStrain2D *theModel;
297 fmk 91
        theModel = new ElasticIsotropicPlaneStrain2D (this->getTag(), E, v, rho);
2 fmk 92
                // DOES NOT COPY sigma, D, and epsilon ...
93
                // This function should only be called during element instantiation, so
94
                // no state determination is performed on the material model object
95
                // prior to copying the material model (calling this function)
96
        return theModel;
97
    }
260 mhscott 98
    else if (strcmp(type,"ThreeDimensional") == 0)
17 jeremic 99
    {
100
        ElasticIsotropic3D *theModel;
127 jeremic 101
        theModel = new ElasticIsotropic3D (this->getTag(), E, v, 100.0, 0.0);
17 jeremic 102
                // DOES NOT COPY sigma, D, and epsilon ...
103
                // This function should only be called during element instantiation, so
104
                // no state determination is performed on the material model object
105
                // prior to copying the material model (calling this function)
106
        return theModel;
107
    }
236 fmk 108
    else if (strcmp(type,"PlateFiber") == 0)
109
    {
110
        ElasticIsotropicPlateFiber *theModel;
297 fmk 111
        theModel = new ElasticIsotropicPlateFiber(this->getTag(), E, v, rho);
236 fmk 112
                // DOES NOT COPY sigma, D, and epsilon ...
113
                // This function should only be called during element instantiation, so
114
                // no state determination is performed on the material model object
115
                // prior to copying the material model (calling this function)
116
        return theModel;
117
    }
2 fmk 118
 
236 fmk 119
 
2 fmk 120
    // Handle other cases
121
    else
122
    {
123
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getModel failed to get model %s",
124
                              type);
125
 
126
        return 0;
127
    }
128
}
129
 
130
int
131
ElasticIsotropicMaterial::setTrialStrain (const Vector &v)
132
{
133
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
134
 
17 jeremic 135
    return 0;
2 fmk 136
}
137
 
138
int
139
ElasticIsotropicMaterial::setTrialStrain (const Vector &v, const Vector &rate)
140
{
141
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
142
 
17 jeremic 143
    return 0;
2 fmk 144
}
145
 
146
int
147
ElasticIsotropicMaterial::setTrialStrainIncr (const Vector &v)
148
{
149
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
150
 
17 jeremic 151
    return 0;
2 fmk 152
}
153
 
154
int
155
ElasticIsotropicMaterial::setTrialStrainIncr (const Vector &v, const Vector &rate)
156
{
157
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
158
 
17 jeremic 159
    return 0;
2 fmk 160
}
161
 
162
const Matrix&
163
ElasticIsotropicMaterial::getTangent (void)
164
{
165
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getTangent -- subclass responsibility");
166
 
167
        // Just to make it compile
168
        Matrix *ret = new Matrix();
169
        return *ret;
170
}
171
 
172
const Vector&
173
ElasticIsotropicMaterial::getStress (void)
174
{
175
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStress -- subclass responsibility");
176
 
177
        // Just to make it compile
178
        Vector *ret = new Vector();
179
        return *ret;
180
}
181
 
182
const Vector&
183
ElasticIsotropicMaterial::getStrain (void)
184
{
185
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStrain -- subclass responsibility");
186
 
187
        // Just to make it compile
188
        Vector *ret = new Vector();
189
        return *ret;
190
}
191
 
192
int
17 jeremic 193
ElasticIsotropicMaterial::setTrialStrain (const Tensor &v)
194
{
195
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
196
 
197
    return 0;
198
}
199
 
200
int
201
ElasticIsotropicMaterial::setTrialStrain (const Tensor &v, const Tensor &r)
202
{
203
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrain -- subclass responsibility");
204
 
205
    return 0;
206
}
207
 
208
int
209
ElasticIsotropicMaterial::setTrialStrainIncr (const Tensor &v)
210
{
211
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
212
 
213
    return 0;
214
}
215
 
216
int
217
ElasticIsotropicMaterial::setTrialStrainIncr (const Tensor &v, const Tensor &r)
218
{
219
    g3ErrorHandler->fatal("ElasticIsotropicMaterial::setTrialStrainIncr -- subclass responsibility");
220
 
221
    return 0;
222
}
223
 
224
const Tensor&
225
ElasticIsotropicMaterial::getTangentTensor (void)
226
{
227
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getTangent -- subclass responsibility");
228
 
229
        // Just to make it compile
230
        Tensor *t = new Tensor;
231
        return *t;
232
}
233
 
153 jeremic 234
const stresstensor ElasticIsotropicMaterial::getStressTensor (void)
17 jeremic 235
{
236
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStress -- subclass responsibility");
237
 
238
        // Just to make it compile
153 jeremic 239
     stresstensor t;
240
         return t;
17 jeremic 241
}
242
 
243
const Tensor&
244
ElasticIsotropicMaterial::getStrainTensor (void)
245
{
246
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getStrain -- subclass responsibility");
247
 
248
        // Just to make it compile
249
     Tensor *t = new Tensor;
250
         return *t;
251
}
252
 
253
int
2 fmk 254
ElasticIsotropicMaterial::commitState (void)
255
{
256
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::commitState -- subclass responsibility");
257
 
17 jeremic 258
        return 0;
2 fmk 259
}
260
 
261
int
262
ElasticIsotropicMaterial::revertToLastCommit (void)
263
{
264
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::revertToLastCommit -- subclass responsibility");
265
 
17 jeremic 266
        return 0;
2 fmk 267
}
268
 
269
int
270
ElasticIsotropicMaterial::revertToStart (void)
271
{
272
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::revertToStart -- subclass responsibility");
273
 
17 jeremic 274
        return 0;
2 fmk 275
}
276
 
277
NDMaterial*
278
ElasticIsotropicMaterial::getCopy (void)
279
{
280
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getCopy -- subclass responsibility");
281
 
282
        return 0;
283
}
284
 
285
const char*
286
ElasticIsotropicMaterial::getType (void) const
287
{
288
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::getType -- subclass responsibility");
260 mhscott 289
 
2 fmk 290
        return 0;
291
}
292
 
293
int
294
ElasticIsotropicMaterial::getOrder (void) const
295
{
296
         g3ErrorHandler->fatal("ElasticIsotropicMaterial::getOrder -- subclass responsibility");
297
 
17 jeremic 298
        return 0;
2 fmk 299
}
300
 
301
int
302
ElasticIsotropicMaterial::sendSelf (int commitTag, Channel &theChannel)
303
{
304
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::sendSelf -- subclass responsibility");
305
 
17 jeremic 306
        return 0;
2 fmk 307
}
308
 
309
int
310
ElasticIsotropicMaterial::recvSelf (int commitTag, Channel &theChannel,
311
                 FEM_ObjectBroker &theBroker)
312
{
313
        g3ErrorHandler->fatal("ElasticIsotropicMaterial::recvSelf -- subclass responsibility");
314
 
17 jeremic 315
        return 0;
2 fmk 316
}
317
 
318
void
319
ElasticIsotropicMaterial::Print (ostream &s, int flag)
320
{
17 jeremic 321
        s << "Elastic Isotropic Material Model" << endl;
2 fmk 322
        s << "\tE:  " << E << endl;
323
        s << "\tv:  " << v << endl;
297 fmk 324
        s << "\trho:  " << rho << endl;
2 fmk 325
 
17 jeremic 326
        return;
2 fmk 327
}
20 fmk 328
 
329
int
330
ElasticIsotropicMaterial::setParameter(char **argv, int argc, Information &info)
331
{
332
  return -1;
333
}
334
 
335
int
336
ElasticIsotropicMaterial::updateParameter(int parameterID, Information &info)
337
{
338
  return -1;
339
}