Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
zone::IZone Class Referenceabstract

Interface to provide access to a zone. More...

#include <izone.h>

Inheritance diagram for zone::IZone:
models::IGenericZone

Classes

struct  FaceCheckInput
 
struct  FaceCheckOutput
 

Public Types

enum  Change {
  MechNull, AddToList, RemoveFromList, FlNull,
  ThNull
}
 
enum  Code { Code::Quad = 0, Code::Tria }
 Possible Zone types code. More...
 
enum  StrainMode {
  ShearRate =1, ShearInc =2, VolRate =3, VolInc =4,
  FullRate =5, FullInc =6, FullRotRate =7, FullRotInc =8
}
 

Public Member Functions

virtual const IThinggetIThing () const =0
 returns a const IThing pointer
 
virtual IThinggetIThing ()=0
 returns a IThing pointer
 
virtual const IZonegetNext () const =0
 
virtual IZonegetNext ()=0
 
virtual quint32 getNumGp () const =0
 Returns the number of gridpoints used by the zone.
 
virtual const IGpgetGp (quint32 index) const =0
 
virtual quint32 getFaceSize (quint32 face) const =0
 
virtual const IGpgetFaceGp (quint32 face, quint32 index) const =0
 
virtual quint32 getFaceGpIndex (quint32 face, quint32 index) const =0
 
virtual quint32 getEdgeGpIndex (quint32 edge, quint32 index) const =0
 
virtual FaceID getFaceID (quint32 side) const =0
 
virtual DVect getFaceNormal (quint32 face) const =0
 
virtual DVect getFaceCentroid (quint32 face) const =0
 
virtual const IZonegetJoin (quint32 face) const =0
 
virtual const IGroupgetFaceGroup (quint32 side, const ISlotID &slot=ISlotID((uint) 0)) const =0
 Given a face side and a group slot, returns a const pointer to an IGroup.
 
virtual QString getFaceGroupName (quint32 side, const ISlotID &slot=ISlotID()) const =0
 
virtual bool addFaceGroup (quint32 side, const IGroupID &group)=0
 
virtual bool removeFaceGroup (quint32 side, const IGroupID &group)=0
 Removes the association of a given group with face side.
 
virtual uint isFaceInGroup (quint32 side, const FArray< IGroupID > &ids, TType type=0, bool only=false) const =0
 
virtual uint getFaceGroupList (quint32 side, FArray< IGroupID > *list) const =0
 Return all groups and all slots assigned to the face in a list.
 
virtual void copyFaceGroups (quint32 side, const IThing *t)=0
 Copy the groups in IThing object to face /side.
 
virtual uint getFaceExtraSize (quint32 side) const =0
 
virtual const fish::IParametergetFaceExtra (quint32 side, uint index) const =0
 Given an index, returns a const pointer to IFishParam associated with this face side.
 
virtual void setFaceExtra (quint32 side, uint index, const fish::IParameter &p)=0
 
virtual bool getFaceHidden (quint32 side) const =0
 Returns TRUE if that face of the zone is marked as hidden.
 
virtual bool setFaceHidden (quint32 side, bool b)=0
 Sets the hidden condition of that face of the zone, returns true if the condition changed.
 
virtual bool getFaceSelected (quint32 side) const =0
 Returns TRUE if that face of the zone is marked as selected.
 
virtual bool setFaceSelected (quint32 side, bool b)=0
 sets the selected condition of that face of the zone, returns true if the condition chagned.
 
virtual bool isFaceInRange (quint32 side, const IRange *range) const =0
 Returns TRUE if the FACE is considered in the range. Creates a temp Face class.
 
virtual double getDensity () const =0
 Returns the zone density.
 
virtual void setDensity (const double &d)=0
 Sets the zone density.
 
virtual bool isMechanicalNull () const =0
 Returns true if the Mechanical model in the zone is null, returns \ b false otherwise.
 
virtual bool isThermalNull () const =0
 Returns true if the Thermal model in the zone is null, returns \ b false otherwise.
 
virtual bool isFluidNull () const =0
 Returns true if the Fluid model in the zone is null, returns \ b false otherwise.
 
virtual Code getCode () const =0
 Returns the Code corresponding the the Zone type, see the Code enumeration.
 
virtual double getAspectTest () const =0
 
virtual double getAspectTetTest () const =0
 
virtual void copyState (const IZone *zone)=0
 Copies the state information from zone zone to the current zone.
 
virtual int getFace (const std::array< quint64, minGPperFace_ > &uid) const =0
 
virtual bool getFaceNormalArea (int iFace, DVect *dvNorm, double *dArea) const =0
 
virtual double getSSR (StrainMode mode, SymTensor *fsr) const =0
 
virtual SymTensor getTetStrainRate (int overlay, int number) const =0
 
virtual SymTensor getTetStrainIncrement (int overlay, int number) const =0
 
virtual SymTensor getStrainRate () const =0
 
virtual SymTensor getStrainIncrement () const =0
 
virtual bool getIsDegenerate (QString &sErr) const =0
 Returns true if the zone is degenerate. Additionnal information are stored in sErr.
 
virtual bool getSupports2Overlays (QString &sErr)=0
 Returns true if the Zone supports two overlays.
 
virtual const ITetgetOverlay (quint32 ov) const =0
 Returns a const pointer to the head of the list of tetrahedron, Itet, comprising the first overlay.
 
virtual ITetgetOverlay (quint32 ov)=0
 Returns a pointer to the head of the list of tetrahedron, Itet, comprising the first overlay.
 
virtual int initializeModels ()=0
 Initialize all active models (Fluid, Thermal and mechanical). Returns 0 upon completion.
 
virtual bool getHasALiveMechModel () const =0
 Returns true if the zone contains a non-null mechanical constitutive model.
 
virtual bool getHasALiveFluidModel () const =0
 Returns true if the zone contains a non-null fluid model.
 
virtual bool getHasALiveThermModel () const =0
 Returns true if the zone contains a non-null thermal model.
 
virtual QString getModelName () const =0
 Returns the name of the mechanical constitutive model present in the zone.
 
virtual const models::ConstitutiveModelgetModel () const =0
 
virtual void setModelName (const QString &qs)=0
 
virtual double getSmallestNormalizedTetVolume () const =0
 Return the volume of the smallest tetrahedron in the overlays, normalized to the zone volume.
 
virtual int getNumTets () const =0
 Returns the number of tetrahedrons in the zone.
 
virtual double getOrthoTest () const =0
 Performs an orthogonality test on the zone.
 
virtual double getVolumeTest () const =0
 Performs an volume test on the zone.
 
virtual double getZoneCondition (int i=0) const =0
 Returns the condition of zone geometry.
 
virtual double getAvePP () const =0
 Retrieves the average of the zone gridpoints pore pressures.
 
virtual QVariant getProperty (const QString &sc) const =0
 
virtual QVariant getProperty (uint index) const =0
 
virtual bool setProperty (const QString &sc, const QVariant &v)=0
 
virtual bool setProperty (int index, const QVariant &v)=0
 
virtual double getVolumeD (bool deformed) const =0
 
virtual DVect getCentroid () const =0
 Returns the location of the centroid of the zone.
 
virtual SymTensor getAveStress (bool effective=false) const =0
 Computes the average of the overlays tetrahedron stress tensors.
 
virtual uint getAvgState (int *piNum, bool bAvgKeyword, bool noPast=false) const =0
 Returns a mask filled with a state indicator for the zone. More...
 
virtual QString getStateName (quint32 bit) const =0
 
virtual void setStress (const double &val, quint32 pn)=0
 
virtual void setStress (const SymTensor &sym)=0
 Assign the stress state in sym to the zone, overwriting every overlay tetrahedron.
 
virtual void setState (quint32 state)=0
 
virtual void getTetGridPoints (int iOverlay, int iTet, IGp *gplist[])=0
 
virtual QStringList getPropertyNames () const =0
 returns a list of all the valid properties of the current constitutive model assigned to this zone
 
virtual quint32 getPropertyIndex (const QString &sc) const =0
 
virtual QString getPropertyName (quint32 index) const =0
 
virtual bool getBit (int bit) const =0
 
virtual void setBit (int bit, bool b) const =0
 
virtual QVariant getValue (int index) const =0
 
virtual void setValue (int index, const QVariant &v) const =0
 
virtual IZonegetLinkZone (quint32 index)=0
 
virtual const IZonegetLinkZone (quint32 index) const =0
 
virtual quint32 getLinkIndex (quint32 index) const =0
 
virtual bool fishIO (bool save, fish::File *pnt)=0
 
virtual double getStressStrengthRatio (const SymTensor &s) const =0
 
virtual double getWPVol () const =0
 Returns the total volumetric plastic work dissipated, see SET ENERGY command. More...
 
virtual void setWPVol (const double &dwpv)=0
 Sets the total volumetric plastic work dissipated, see SET ENERGY command.
 
virtual double getWPShear () const =0
 Returns the total shear plastic work dissipated, see SET ENERGY command.
 
virtual void setWPShear (const double &dwps)=0
 Sets the total shear plastic work dissipated, see SET ENERGY command.
 
virtual double getWPTotal () const =0
 Returns the total shear plastic work dissipated (sum of getWPVol() and getWPShear()), see SET ENERGY command.
 
virtual double getWEVol () const =0
 Returns the total volumetric elastic work, see SET ENERGY command.
 
virtual void setWEVol (const double &dwpv)=0
 Sets the total volumetric elastic work, see SET ENERGY command.
 
virtual double getWEShear () const =0
 Returns the total shear elastic work, see SET ENERGY command.
 
virtual void setWEShear (const double &dwps)=0
 Sets the total shear elastic work, see SET ENERGY command.
 
virtual double getWETotal () const =0
 Returns the total elastic work (sum of getWEVol() and getWEShear()), see SET ENERGY command.
 
virtual bool invalidZone (bool mech=true, bool therm=false, bool fluid=false, bool orVal=false) const =0
 
virtual bool isInZn (const DVect &dv, const double &relTol=1.0e-5, bool use2=false) const =0
 
virtual bool checkZoneForPlot (bool removeHidden, bool showSelected, bool hideMech, bool hideTherm, bool hideFluid) const =0
 
virtual bool checkFaceForPlot (const FaceCheckInput &inp, FaceCheckOutput *outp) const =0
 
virtual bool checkFaceForPlotFace (quint32 side, quint64 *id, FArray< DVect > *vertices, bool excludeSelected=true) const =0
 
virtual bool checkFaceForPlotFaceSelected (quint32 side, quint64 *id, FArray< DVect > *vertices) const =0
 
virtual void fillZoneVertices (FArray< DVect > *vertices) const =0
 
virtual void fillAllZoneFaces (FArray< FArray< DVect >> *allVertices, bool *selected, quint64 *id) const =0
 
virtual int findFaceNormal (const DVect &v) const =0
 
virtual double getMultiplier () const =0
 
virtual bool CMSupportsHysDamp () const
 
- Public Member Functions inherited from models::IGenericZone
virtual TType getType () const =0
 Returns the actual type of the fully derived class represented by this object.
 

Static Public Attributes

static const TType type_ = 0x4c815bf8
 The type identification number for this class, for use in convert_cast() and convert_getcast().
 
- Static Public Attributes inherited from models::IGenericZone
static const TType type_ = 0x4e13414f
 The type of IGenericZone, used in the alternate dynamic typing system based on IThing.
 

Detailed Description

Interface to provide access to a zone.

Member Enumeration Documentation

◆ Code

enum zone::IZone::Code
strong

Possible Zone types code.

Enumerator
Quad 

Quadrilateral shaped zone.

Tria 

Triangular zone.

◆ StrainMode

This functions computes and returns zone deformation quantities.

  • imode is an integer ranging between 1 and 8.
    If imode is lower or equal to 4, then the returned value corresponds to:
  • imode=1: shear strain rate,
  • imode=2: shear strain increment,
  • imode=3: volumetric strain rate,
  • imode=4: volumetric strain increment.
    If imode is greater than 4, then the returned value is null, and the result of the compuatation is stored in the tensor dpFSR, with:
  • imode=5: full strain-rate tensor,
  • imode=6: full strain-increment tensor,
  • imode=7: full rotation-rate tensor,
  • imode=8: full rotation-increment tensor.

Member Function Documentation

◆ addFaceGroup()

virtual bool zone::IZone::addFaceGroup ( quint32  side,
const IGroupID group 
)
pure virtual

Associates an IGroup to face side in a given slot. If slot is set to limits<uint>::max(), program will use the first available slot.

◆ fishIO()

virtual bool zone::IZone::fishIO ( bool  save,
fish::File *  pnt 
)
pure virtual

If save is true, save the zone information to IFish.
If save is false, restore the zoneinformation to IFish.
Returns 0 if function is successful, otherwise an error code correspondig to a IFishIO error.
See 'Saving State Information' in FISH in FLAC manual.

◆ getAspectTest()

virtual double zone::IZone::getAspectTest ( ) const
pure virtual

Test the aspect ratio of the Zone and returns a double between 0 (if the zone has a bad geometry) and 1 (if the geometry is good).
A zone is considered to have a bad geometry if it contains negative or zero volume tetrahedra in its overlays.

◆ getAspectTetTest()

virtual double zone::IZone::getAspectTetTest ( ) const
pure virtual

Tests the aspect ratio of the Zones internal tetrahedra, and returns the minimum value obtained for all. Returns a double between 0 (bad geometry) and 1 (perfect possible).

◆ getAvgState()

virtual uint zone::IZone::getAvgState ( int *  piNum,
bool  bAvgKeyword,
bool  noPast = false 
) const
pure virtual

Returns a mask filled with a state indicator for the zone.

If bAvgKeyword is true, then sets a bit if the more than 50% of the volume of the internal tetrahedra have the bit set.
If false, then sets the bit if any of the internal tetrahdra have the bit set.

  • piNum, if non-null, is filled with the total number of states available.

◆ getBit()

virtual bool zone::IZone::getBit ( int  bit) const
pure virtual

Returns the boolean stored in utility bit bit in the zone.

◆ getEdgeGpIndex()

virtual quint32 zone::IZone::getEdgeGpIndex ( quint32  edge,
quint32  index 
) const
pure virtual

Returns the index of the gridpoint on edge edge and vertex index.

Parameters
edgestarts at 0, and must be lower than 12.
indexstarts at 0, and must be lower than 2.

◆ getFace()

virtual int zone::IZone::getFace ( const std::array< quint64, minGPperFace_ > &  uid) const
pure virtual

Returns the face index corresponding to any three (in 3D) or 2 (in 2D) gridpoint ids on a zone face, return the face index.
Returns -1 if the face is not found.

◆ getFaceCentroid()

virtual DVect zone::IZone::getFaceCentroid ( quint32  face) const
pure virtual

Returns the location of the centroid of face face in the global coordinate system.

Parameters
facestarts at 0, and must be lower than 6.

◆ getFaceExtraSize()

virtual uint zone::IZone::getFaceExtraSize ( quint32  side) const
pure virtual

Face Extra Variable support Returns the number of extra FISH variables associated with this face side

◆ getFaceGp()

virtual const IGp* zone::IZone::getFaceGp ( quint32  face,
quint32  index 
) const
pure virtual

Returns a const pointer to the gridpoint on face face and vertex index.

Parameters
facestarts at 0, and must be lower than 6.
indexstarts at 0, and must be lower than 4.

◆ getFaceGpIndex()

virtual quint32 zone::IZone::getFaceGpIndex ( quint32  face,
quint32  index 
) const
pure virtual

Returns the index of the gridpoint on face face and vertex index.

Parameters
facestarts at 0, and must be lower than 6.
indexstarts at 0, and must be lower than 4.

◆ getFaceGroupName()

virtual QString zone::IZone::getFaceGroupName ( quint32  side,
const ISlotID slot = ISlotID() 
) const
pure virtual

Given a face side and a group slot, returns the group name. If slot is not given

(or set to limits<uint>::max()), the group name will contain the name of all groups that this face is associated with, separated by character ':'.

◆ getFaceNormal()

virtual DVect zone::IZone::getFaceNormal ( quint32  face) const
pure virtual

Returns the unit normal vector to face face.

Parameters
facestarts at 0, and must be lower than 6.

◆ getFaceNormalArea()

virtual bool zone::IZone::getFaceNormalArea ( int  iFace,
DVect dvNorm,
double *  dArea 
) const
pure virtual

Caculates the outward facing face normal and the face area, and stores the values in dvNorm and dArea. Returns false if this face has less than 3 gridpoints on it or if it does not exist.

◆ getFaceSize()

virtual quint32 zone::IZone::getFaceSize ( quint32  face) const
pure virtual

Returns the number of gridpoints used by the face of index face.

Parameters
facestarts at 0, and must be lower than 6.

◆ getGp()

virtual const IGp* zone::IZone::getGp ( quint32  index) const
pure virtual

Returns a const pointer to the gridpoint with index index.

Parameters
indexstarts at 0, and must be lower than the number of gridpoint used by the zone, see getNumGp()

◆ getJoin()

virtual const IZone* zone::IZone::getJoin ( quint32  face) const
pure virtual

Returns a const pointer to the zone, IZone, across face face.

Parameters
facestarts at 0, and must be lower than 6.

◆ getLinkIndex()

virtual quint32 zone::IZone::getLinkIndex ( quint32  index) const
pure virtual

Returns an the index of the gridpoint at index index, in the zone returned from getLinkZone(). Will return 0 if getLinkZone() returns null.

See also
IGp::getLinkZone().

◆ getLinkZone() [1/2]

virtual IZone* zone::IZone::getLinkZone ( quint32  index)
pure virtual

Returns a pointer to the next zone connected to the gridpoint at index index, or 0 if at the end of the list.

See also
IGp::getLinkZone().

◆ getLinkZone() [2/2]

virtual const IZone* zone::IZone::getLinkZone ( quint32  index) const
pure virtual

Returns a pointer to the next zone connected to the gridpoint at index index, or 0 if at the end of the list.

See also
IGp::getLinkZone().

◆ getNext() [1/2]

virtual const IZone* zone::IZone::getNext ( ) const
pure virtual

returns a const pointer to the next zone object, IZone, in the global zone list, or 0 to indicate the end of the list. See IZoneList::getFirstZone().

◆ getNext() [2/2]

virtual IZone* zone::IZone::getNext ( )
pure virtual

returns a pointer to the next zone object, IZone, in the global zone list, or 0 to indicate the end of the list. See IZoneList::getFirstZone().

◆ getProperty()

virtual QVariant zone::IZone::getProperty ( const QString &  sc) const
pure virtual

Returns the value of the zone MECHANICAL property corresponding to sc.
An exception is thrown if sc is not recognized.

◆ getPropertyIndex()

virtual quint32 zone::IZone::getPropertyIndex ( const QString &  sc) const
pure virtual

Given a property name, returns the index of the property of the constitutive model assigned to this zone.

Note
Base 1, returns 0 if name is not found.

◆ getPropertyName()

virtual QString zone::IZone::getPropertyName ( quint32  index) const
pure virtual

Given an index, returns the name of the property of the constitutive model assigned to this zone.

Note
Base 1, returns QString() if index is less then 1 or greater than the number of properties.

◆ getStateName()

virtual QString zone::IZone::getStateName ( quint32  bit) const
pure virtual

Returns the name of the state associated with bit bit in the current constitutive model, or QString() if none.

◆ getStressStrengthRatio()

virtual double zone::IZone::getStressStrengthRatio ( const SymTensor s) const
pure virtual

Returns the Stress to Strength ratio based on the current constitutive model properties and stress state s.
The Stress to Strength ratio is greater than or equal to 1.0. A value of 1.0 means that the zone is failing If the zone does not currently have any assigned constitutive model, or if the loaded constitutive model does not support this operation, then a default value of 10 is returned.

◆ getTetGridPoints()

virtual void zone::IZone::getTetGridPoints ( int  iOverlay,
int  iTet,
IGp gplist[] 
)
pure virtual

Retrieves the gridpoints associated with internal tetra iTet of overlay iOverlay (0 to 1). The gridpoint pointers are stored in the array gplist.

Note
No error checking is done on the values of iOverlay or iTet.

Passing in illegal values will result in undefined behavior.

◆ getValue()

virtual QVariant zone::IZone::getValue ( int  index) const
pure virtual

Retrieves the value stored in the utility array at index.

◆ getVolumeD()

virtual double zone::IZone::getVolumeD ( bool  deformed) const
pure virtual

Calculates and returns the current volume of the zone.
If deformed is true, then includes the current displacement field in the calculation.

◆ getWPVol()

virtual double zone::IZone::getWPVol ( ) const
pure virtual

Returns the total volumetric plastic work dissipated, see SET ENERGY command.

Applies a boundary condition to face face of this zone.

  • item must be "sxx", "syy", "szz", "sxy", "syz", "sxz", "dstress", "sstress", or "nstress".
  • options can be "add", "mul", or "remove", otherwise the value is assigned.
  • val is the value of that item applies. It is ignored if options is "remove".

◆ invalidZone()

virtual bool zone::IZone::invalidZone ( bool  mech = true,
bool  therm = false,
bool  fluid = false,
bool  orVal = false 
) const
pure virtual

Function returns TRUE if the zone is considered "invalid" by being null. By default, function only checks for mechanical null, but it can check for fluid and thermal as well. If or is false, then all conditions need to be true for the zone to be considered invalid. (in other words invalidZone(true,true,false,false) will return true only if the zone is both mechanically null and has a null fluid model). If or is true then it is considered invalid if any of the conditions are true.

◆ isFaceInGroup()

virtual uint zone::IZone::isFaceInGroup ( quint32  side,
const FArray< IGroupID > &  ids,
TType  type = 0,
bool  only = false 
) const
pure virtual

Returns true is face side us associated with a given group in a given slot. If the slot is set to limits<uint>::max(), returns true the association occurs in any slot for that group.

◆ isInZn()

virtual bool zone::IZone::isInZn ( const DVect dv,
const double &  relTol = 1.0e-5,
bool  use2 = false 
) const
pure virtual

Returns TRUE if the point dv falls inside this zone, within a relative tolerance of relTol. Implemented by checking the volume owned by the internal tetra overlays. If use2 is set to true, then BOTH internal overlays are checked, otherwise only the first overlay is checked. relTol is a tolerance factor used in the "inside" check.

Multiplied by maximum zone extent edge size to get absolute tolerance. Uses internal tetra, and by default uses one of the two tetra overlays.

If useTwo is true, checks both overlays.

◆ setBit()

virtual void zone::IZone::setBit ( int  bit,
bool  b 
) const
pure virtual

Sets the boolean stored in utility bit bit in the zone. This function is const, to indicate that setting bit values does not impact the calculation logic in any way.

◆ setFaceExtra()

virtual void zone::IZone::setFaceExtra ( quint32  side,
uint  index,
const fish::IParameter p 
)
pure virtual

Given an index, returns a pointer to IFishParam associated with this face side. Throws an exception if index is greater than 128. Function will automaticlly resize the array of FISH varaiables if necessary.

◆ setModelName()

virtual void zone::IZone::setModelName ( const QString &  qs)
pure virtual

Load the constitutive model corresponding to name qs.

Parameters
qsis the name of the model to be loaded. An exception is thrown if this name is not recognized.

◆ setProperty()

virtual bool zone::IZone::setProperty ( const QString &  sc,
const QVariant &  v 
)
pure virtual

Sets the value v to zone MECHANICAL property sc.
Returns true if the value was assigned, or false if sc is not recognized

◆ setState()

virtual void zone::IZone::setState ( quint32  state)
pure virtual

Assigns the value state to the state fields of ALL internal tetraha. Note that this assigns all bit values at once.

◆ setStress()

virtual void zone::IZone::setStress ( const double &  val,
quint32  pn 
)
pure virtual

assign the value val to the component pn of every overlay tetrahedron.

  • pn indicates the stress tensor component as follows.
  • pn=0: XX-component.
  • pn=1: YY-component.
  • pn=2: ZZ-component.
  • pn=3: XY-component.
  • pn=4: YZ-component.
  • pn=5: XZ-component.

◆ setValue()

virtual void zone::IZone::setValue ( int  index,
const QVariant &  v 
) const
pure virtual

Sets the value stored in the utility array at index. This is const to indicate that these bit values to not modify the model in any way.


The documentation for this class was generated from the following file: