Itasca C++ Interface
|
The base class for constitutive model plug-ins. More...
#include <conmodel.h>
Public Member Functions | |
virtual string | getName () const =0 |
Must be unique, used to identify model in save/restore, on command line, filename. | |
virtual string | getPluginName () const |
There should be no reason for an implementation to override the default behavior of this function. | |
virtual string | getFullName () const =0 |
The full name of the model. | |
virtual bool | isNull () const |
Returns true if this model represents a NULL material. Only the NULL model should return true. | |
virtual bool | isModelAdvanced () const |
virtual bool | isKGEv () const |
Return TRUE if the model can input (bulk,shear) or (young,poisson). | |
virtual bool | isOriented () const |
Return TRUE if the model can input (dip, dip-direction) or (norm). | |
virtual bool | isCreep () const |
virtual bool | isLiquefaction () const |
Return TRUE if the model should be considered "Liquefaction" model. | |
virtual unsigned | getMinorVersion () const |
Returns minor version of base implementation, override for actual model. | |
virtual string | getProperties () const =0 |
Returns a string containing the names of model properties. | |
virtual string | getStates () const =0 |
Returns a string containing state names. | |
virtual base::Property | getProperty (uint32 index) const =0 |
Return the value of the property of that index (base 1). | |
virtual void | setProperty (uint32, const base::Property &, uint32=0) |
Sets the value of the property with index i (base 1). | |
virtual bool | isPropertyReadOnly (uint32) const |
virtual bool | isPropertyAdvanced (uint32) const |
virtual void | save (std::ostream &o) const |
virtual void | restore (std::istream &i, uint32 restoreVersion) |
Allows data other than properties to be restored efficiently. | |
virtual ConstitutiveModel * | clone () const =0 |
Returns an instance this class. | |
virtual double | getConfinedModulus () const =0 |
Return estimate of maximum confined modulus. | |
virtual double | getShearModulus () const =0 |
Return estimate of tangent shear-modulus. | |
virtual double | getBulkModulus () const =0 |
Return estimate of tangent bulk-modulus. | |
virtual void | copy (const ConstitutiveModel *mod) |
Copy property values and state from another constitutive model. | |
virtual bool | performMixing () const |
Set true if an alternative mixing technqiue rather than the default one in the code is used. . | |
virtual void | mixStrain (uint32, State *, SymTensor *, double *) |
User defined strain mixing technique. . | |
virtual void | run (uint32 d, State *s) |
Calculate stress increment given a strain increment. | |
virtual void | mixStress (uint32, State *, SymTensor *, double *) |
User defined stress mixing technique. . | |
virtual void | initialize (uint32 d, State *) |
Initializes the constitutive model in preparation for calls to run(). | |
virtual double | getStrengthStressRatio (const SymTensor &) const |
Returns the ratio of the stress tensor to the current yield strength. | |
virtual void | scaleProperties (const double &, const std::vector< uint32 > &) |
Scales failure property indices v by the factor f. | |
virtual bool | supportsHystereticDamping () const |
Returns true if hysteretic damping is supported by run(). See State::hysteretic_damping_. | |
virtual bool | supportsStrengthStressRatio () const |
Returns true if strength-stress ratio calculations are supported via getStrengthStressRatio(). | |
virtual bool | supportsPropertyScaling () const |
Returns true if property scaling is supported for factor-of-safety calculations via scaleProperties(). | |
virtual bool | supportsSmallStrainEffect () const |
virtual bool | supportsPlaneStress () const |
Returns true if 2D plane-stress is supported by run(). | |
virtual bool | supportsUniaxial () const |
Returns true if 1D uniaxial is supported by run(). | |
virtual bool | supportsPlasticStrain () const |
Returns true if palstic strain calculation is supported. | |
virtual void | destroy () |
There should be no reason for an implementation to change the default behavior of this function. | |
ConstitutiveModel (unsigned short option=0) | |
The constitutive model constructor. The model is invald, and canFail is set to true. | |
virtual | ~ConstitutiveModel () |
The constitutive model destructor. | |
void * | operator new (size_t size, const char *file, unsigned line) |
void * | operator new (size_t size) |
void | operator delete (void *v) |
bool | isValid (uint32 d) const |
Indicates whether initializion is necessary - by dimension. | |
void | setValid (uint32 d) |
Sets the current valid state to dimension dim. | |
bool | canFail () const |
void | setIfCanFail (bool b) |
Specifies whether or not "failure" is being allowed for this instanced of the constitutive model. | |
std::vector< unsigned short > | gEOB () const |
Used by Itasa only. | |
void | sEOB (const std::vector< unsigned short > &reply) |
Used by Itasa only. | |
bool | cEOB () const |
Used by Itasa only. | |
Static Public Member Functions | |
static uint32 | getLibraryMinorVersion () |
Returns the minor version number of the constitutive model library. | |
The base class for constitutive model plug-ins.
All constitutive models (null, elastic, mohr-coulomb, etc) are derived from this class.
Any custom constitutive model provided as a plug-in must be derived from this class.
Pure virtual method must be provided by the user - some utility functions are provided.
|
inline |
Indicates whether failure should be allowed.
Constitutive models should honor this state, and not allow failure if it returns true.
|
pure virtual |
Returns an instance this class.
A new object, of the same class as the current object, must be created, and a pointer to it of type ConstitutiveModel returned. This function is called whenever FLAC3D installs the model in a zone.
|
virtual |
Copy property values and state from another constitutive model.
This member function should first call the base class copy function, and then copy all essential data from the model object pointed to by cm (assumed to be of the same derived class as the current model).
It is not necessary to copy data members that are recomputed when the initialize() function is called.
Use dynamic cast<MyModel *>(cm) to upcast cm.
|
pure virtual |
Return estimate of tangent bulk-modulus.
This is used by FLAC3D zone relaxation to query the current elastic bulk modulus of a zone.
|
pure virtual |
Return estimate of maximum confined modulus.
The model object must return a value for its best estimate of the maximum confined modulus.
This is used by the code to compute the stable timestep or adjust inertial mass.
For an isotropic elastic model, the confined modulus is K + 4G/3.
|
pure virtual |
The full name of the model.
Returns a string containing the name of the constitutive model that is to be used on printout
(e.g., resulting from the LIST zone command).
The name may or may not be the same as that given by the getName() member function,
but note that the code may truncate long strings on printout.
An example of a valid string is "Linearly elastic".
|
static |
Returns the minor version number of the constitutive model library.
This indicates the minor version of the constitutive model library routines.
This will be updated to indicate bug fixes, and minor changes that do not affect binary compatibility.
|
virtual |
Returns minor version of base implementation, override for actual model.
The version number of the constitutive model should be returned.
This may be used to deal with the case of restoring files containing objects of earlier versions of the model, which perhaps omit certain variables.
|
pure virtual |
Must be unique, used to identify model in save/restore, on command line, filename.
Returns a string containing the name of the constitutive model as the user will refer to it with the MODEL command.
For example, "elastic" would be a valid string in C++.
This must be a unique name, and is used for synchronizing Save/Restore.
This name is also used in the file name of the DLL.
|
pure virtual |
Returns a string containing the names of model properties.
The following string is a valid example: "shear, bulk".
The given names will be those recognized by the PROPERTY command.
Property names are delimited by commas, synonyms of the same property may be provided within one entry, separated by spaces.
|
pure virtual |
Return the value of the property of that index (base 1).
A value should be returned for the model property of sequence number n
(previously defined by a getProperties() call, with n=1 denoting the first property). Return real/0.0 if property doesn't exist.
|
pure virtual |
Return estimate of tangent shear-modulus.
The model object must return a value for its best estimate of the current tangent shear-modulus.
This is used by the code to determine coefficients for quiet boundaries in dynamic mode.
|
pure virtual |
Returns a string containing state names.
The names are used on printout and in plotting to identify user-defined internal states of the model (e.g., plastic flow).
The following string is a valid example: "yielding, tension".
See the variable State::state_.
State names are delimited by commas
|
inlinevirtual |
Returns the ratio of the stress tensor to the current yield strength.
Returns the ratio of the passed stress tensor to the yield strength of the zone properties.
Implementing this function is optional.
By convention, 10.0 is the maximum value returned.
|
inlinevirtual |
Initializes the constitutive model in preparation for calls to run().
This function is called once for each model object (i.e., for each full zone) when the SOLVE/Step/CYCLE command is given when the large-strain update is performed, and at the beginning of the run() method if isValid() returns false.
The model object may perform initialization of its property or state variables, or it may do nothing.
The dimensionality (e.g., this is 3 for FLAC3D ) is given as dim, and structure s contains current information for the zone containing the model object.
Note that strains may be undefined when initialize() is called.
The average stress components for the full zone are available in the state structure; they should not be changed by the initialize() member function.
The base class implementation calls setValid(dim).
|
inlinevirtual |
Return TRUE if the model should be considered "creep", in that it contains time dependent material behavior.
|
inlinevirtual |
Return TRUE if the model should be considered an "advanced" model. From v9.1, all models are considered standard
so this should be returned FALSE always.
|
inlinevirtual |
Return TRUE if this property should be considered "Advanced". It should have a default value and should not be necessary to specify for simpler applications of the model.
|
inlinevirtual |
Return TRUE if property index i should be considered read only, and not allowed to be set by the user. Note that a setProperty() called directly will still be allowed (and should be skipped for this property) , just that the places in the code (Property command, FISH, etc) will check this first.
|
inlinevirtual |
Calculate stress increment given a strain increment.
This function is called for each tetra in each zone at each cycle from within FLAC3Ds zone scan.
The model must update the stress tensor from strain increments.
The structure State s contains the current stress components and the computed strain increment components for the zone being processed.
dim will be either 2 or 3, depending on the dimension of the calling program. The stress components already contain the rotation-correction terms when run() is called.
The base class implementation will call initialize() if isValid() returns false.
|
virtual |
Allows data other than properties to be saved efficiently. Note that you are responsible for adding data to allow multiple version compatibility yourself. Also note that you should use BINARY output (os.write, is.read) not formatted IO <<.
|
inlinevirtual |
Scales failure property indices v by the factor f.
This function is used to set scaled properties for the Safety Factor calculation. Implementing this function is optional.
|
inlinevirtual |
Sets the value of the property with index i (base 1).
The value of val supplied by the call comes from a command of the form PROP name=val; the supplied value of n is the sequence number (starting with 1) of the property name previously specified by means of a getProperties() call.
The model object is required to store the supplied value in an appropriate private member variable.
The third argument, restoreVersion, is currently only used to distinguish between calls made while processing data files versus values set during a restore of a save file. It will be zero for command processing, and 1 in a restore. The base class implementation calls setValid(0), invalidating the object.
|
inlinevirtual |
Returns true if small strain effect is supported by run(). Currently this has not yet been implemented.