3 #include "conmodelbase.h" 40 virtual String
getName()
const=0;
49 virtual String getFullName()
const=0;
51 virtual bool isNull()
const {
return false; }
56 virtual bool isCreep()
const {
return false; }
69 virtual String getProperties()
const=0;
76 virtual String getStates()
const=0;
103 virtual void save(std::ostream &o)
const;
105 virtual void restore(std::istream &i,
UInt restoreVersion);
114 virtual Double getConfinedModulus()
const=0;
118 virtual Double getShearModulus()
const=0;
121 virtual Double getBulkModulus()
const=0;
165 virtual void scaleProperties(
const Double &f,
const std::vector<UInt> &v) { f; v;
throw std::logic_error(
"Does not support property scaling"); }
185 static UInt getLibraryMinorVersion();
196 std::vector<unsigned short> gEOB()
const;
198 void sEOB(
const std::vector<unsigned short> &reply);
206 void *
operator new(
size_t size);
207 void *
operator new(
size_t size,
const char *name,
const char *file,
unsigned line);
208 void operator delete(
void *v);
209 void operator delete(
void *v,
const char *name,
const char *file,
unsigned line);
210 typedef void *(*NewFunction)(size_t,
const char *,
const char *,unsigned);
211 typedef void (*DeleteFunction)(
void *,
const char *,
const char *,unsigned);
212 typedef std::pair<NewFunction,DeleteFunction> AllocFunctions;
213 static AllocFunctions setAllocFunctions(AllocFunctions afunc);
214 static AllocFunctions getDefaultAllocFunctions();
215 static AllocFunctions getAllocFunctions() {
return AllocFunctions(newFunc_,deleteFunc_); }
219 static NewFunction newFunc_;
220 static DeleteFunction deleteFunc_;
222 bool canFail_ =
true;
223 unsigned short option_ = 0;
227 static const unsigned long shear_now = 0x001;
228 static const unsigned long tension_now = 0x002;
229 static const unsigned long shear_past = 0x004;
230 static const unsigned long tension_past = 0x008;
231 static const unsigned long joint_shear_now = 0x010;
232 static const unsigned long joint_tension_now = 0x020;
233 static const unsigned long joint_shear_past = 0x040;
234 static const unsigned long joint_tension_past = 0x080;
235 static const unsigned long volume_now = 0x100;
236 static const unsigned long volume_past = 0x200;
238 static constexpr
double pi = 3.14159265358979323846264338327950;
239 static constexpr
double degrad = 0.01745329251994329576923690768488;
240 static constexpr
double d1d3 = 0.33333333333333333333333333333333;
241 static constexpr
double d2d3 = 0.66666666666666666666666666666667;
242 static constexpr
double d4d3 = 1.33333333333333333333333333333333;
243 static constexpr
double rt6 = 2.44948974278317809819728407470589;
245 static double cos3t(
const double& n11,
const double& n22,
const double& n33,
246 const double& n12,
const double& n31,
const double& n23,
double *tensornorm=0);
247 static double gfunc(
const double &c,
const double &cos3t,
const double &expn=-0.25,
double *B=0,
double *C=0);
250 # define C_M ConstitutiveModel virtual bool isPropertyAdvanced(UInt i) const
Definition: conmodel.h:99
char Byte
signed 8 bit
Definition: basedef.h:26
virtual void run(UByte d, State *s)
Calculate stress increment given a strain increment.
Definition: conmodel.h:140
virtual String getPluginName() const
There should be no reason for an implementation to override the default behavior of this function.
Definition: conmodel.h:42
A simpler (and slightly faster) version of a QVariant, added for interfaces that do not use Qt.
Definition: variant.h:28
void setValid(UByte d)
Sets the current valid state to dimension dim.
Definition: conmodel.h:189
virtual bool supportsSmallStrainEffect() const
Definition: conmodel.h:174
virtual bool supportsPropertyScaling() const
Returns true if property scaling is supported for factor-of-safety calculations via scaleProperties()...
Definition: conmodel.h:171
The Constitutive Model interface library.
Definition: conmodel.cpp:7
void setIfCanFail(bool b)
Specifies whether or not "failure" is being allowed for this instanced of the constitutive model.
Definition: conmodel.h:194
virtual void setProperty(UInt i, const Variant &val, UInt restoreVersion=0)
Sets the value of the property with index i (base 1).
Definition: conmodel.h:92
virtual bool isNull() const
Returns true if this model represents a NULL material. Only the NULL model should return true.
Definition: conmodel.h:51
virtual bool supportsStressStrengthRatio() const
Returns true if strength-stress ratio calculations are supported via getStrengthStressRatio().
Definition: conmodel.h:169
unsigned int UInt
unsigned 32 bit
Definition: basedef.h:31
virtual void destroy()
There should be no reason for an implementation to change the default behavior of this function.
Definition: conmodel.h:176
A symmetric 2nd order tensor.
Definition: symtensor.h:19
The base class for constitutive model plug-ins.
Definition: conmodel.h:32
virtual void scaleProperties(const Double &f, const std::vector< UInt > &v)
Scales failure property indices v by the factor f.
Definition: conmodel.h:165
virtual void initialize(UByte d, State *s)
Initializes the constitutive model in preparation for calls to run().
Definition: conmodel.h:154
virtual bool isPropertyReadOnly(UInt i) const
Definition: conmodel.h:96
virtual bool isLiquefaction() const
Return TRUE if the model should be considered "Liquefaction" model.
Definition: conmodel.h:58
virtual void mixStress(UByte d, State *s, SymTensor *stresses, double *volumes)
User defined stress mixing technique. .
Definition: conmodel.h:142
EXPORT_TAG const char * getName()
Definition: fishexample.cpp:43
double Double
64 bit floating point
Definition: basedef.h:40
virtual bool isModelAdvanced() const
Definition: conmodel.h:54
unsigned char UByte
unsigned 8 bit
Definition: basedef.h:27
virtual bool performMixing() const
Set true if an alternative mixing technqiue rather than the default one in the code is used....
Definition: conmodel.h:129
virtual Double getStressStrengthRatio(const SymTensor &) const
Returns the ratio of the stress tensor to the current yield strength.
Definition: conmodel.h:159
bool canFail() const
Definition: conmodel.h:192
virtual bool supportsHystereticDamping() const
Returns true if hysteretic damping is supported by run(). See State::hysteretic_damping_.
Definition: conmodel.h:167
virtual bool isCreep() const
Return TRUE if the model should be considered "creep", in that it contains time dependent material be...
Definition: conmodel.h:56
virtual void mixStrain(UByte d, State *s, SymTensor *strains, double *volumes)
User defined strain mixing technique. .
Definition: conmodel.h:131
EXPORT_TAG unsigned getMinorVersion()
Definition: fishexample.cpp:62
The structure used to pass information to the constitutive model.
Definition: state.h:32
The base class for constitutive model plug-ins.
bool isValid(UByte d) const
Indicates whether initializion is necessary - by dimension.
Definition: conmodel.h:187
The base class for constitutive model plug-ins.