MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / OPS_ElasticPPcpp

Function OPS_ElasticPPcpp

DEVELOPER/material/cpp/ElasticPPcpp.cpp:51–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49static int numElasticPPcpp = 0;
50
51OPS_Export void *
52OPS_ElasticPPcpp()
53{
54 // print out some KUDO's
55 if (numElasticPPcpp == 0) {
56 opserr << "ElasticPPcpp unaxial material - Written by fmk UC Berkeley Copyright 2008 - Use at your Own Peril\n";
57 numElasticPPcpp =1;
58 }
59
60 // Pointer to a uniaxial material that will be returned
61 UniaxialMaterial *theMaterial = 0;
62
63 //
64 // parse the input line for the material parameters
65 //
66
67 int iData[1];
68 double dData[2];
69 int numData;
70 numData = 1;
71 if (OPS_GetIntInput(&numData, iData) != 0) {
72 opserr << "WARNING invalid uniaxialMaterial ElasticPP tag" << endln;
73 return 0;
74 }
75
76 numData = 2;
77 if (OPS_GetDoubleInput(&numData, dData) != 0) {
78 opserr << "WARNING invalid E & ep\n";
79 return 0;
80 }
81
82 //
83 // create a new material
84 //
85
86 theMaterial = new ElasticPPcpp(iData[0], dData[0], dData[1]);
87
88 if (theMaterial == 0) {
89 opserr << "WARNING could not create uniaxialMaterial of type ElasticPPCpp\n";
90 return 0;
91 }
92
93 // return the material
94 return theMaterial;
95}
96
97
98

Callers

nothing calls this directly

Calls 2

OPS_GetIntInputFunction · 0.50
OPS_GetDoubleInputFunction · 0.50

Tested by

no test coverage detected