Itasca C++ Interface
igp.h
Go to the documentation of this file.
1 #pragma once
2 // igp.h
3 
9 // Gp Masks
10 //static const uint32 N_XFIX = 0x00000001; /* X Fix Flag */
11 //static const uint32 N_YFIX = 0x00000002; /* Y Fix Flag */
12 //static const uint32 N_ZFIX = 0x00000004; /* Z Fix Flag */
13 //static const uint32 N_MULT = 0x00000008; /* Multiplier manually set flag */
14 static const uint32 GF_AVAIL = 0x00000020; // Available to user
15 static const uint32 GF_AVAIL2 = 0x00000040; // Available to user
16 static const uint32 GF_GEN1 = 0x00000080; // Gen Iterator Mask
17 static const uint32 GF_GEN2 = 0x00000100; // Gen Iterator Mask
18 static const uint32 GF_XQUIET = 0x00000200; // Quiet bound. flag
19 static const uint32 GF_YQUIET = 0x00000400; // Quiet bound. flag
20 static const uint32 GF_ZQUIET = 0x00000800; // Quiet bound. flag
21 static const uint32 GF_NOEOM = 0x00010000; // Indiciates equations-of-motion are to be skipped
22 static const uint32 GF_TEMP = 0x00020000; // TEMPORARY FLAG - used internally
23 static const uint32 GF_FF1 = 0x00040000; // Gp in corner FF
24 static const uint32 GF_FF2 = 0x00080000; // Gp in side FF
25 static const uint32 GF_INTER = 0x00100000; // Indicates GP is a coincidentGp on a host interface node
26 static const uint32 GF_FDSCRG = 0x00200000; // Fluid discharge flag
27 static const uint32 GF_FLKG = 0x00400000; // Fluid leakage flag
28 static const uint32 GF_FPWELL = 0x00800000; // Fluid pwell flag
29 static const uint32 GF_LOCSMALL = 0x01000000; // Local small-strain Motion update
30 static const uint32 GF_WG = 0x40000000; // Westergaard condition flag
31 
32 
33 #include "module/interface/dim.h"
34 
35 namespace fish {
36  class File;
37 }
38 
39 namespace itasca {
40  class IThing;
41  class IFishParam;
42  class IFish;
43  class IGroup;
44 }
45 
46 namespace zone {
47  class INode;
48  class IFluidGp;
49  class IThermGp;
50  class IZone;
51  using itasca::IThing;
52 
55  class IGp {
56  public:
58  inline static const TType type_ = 0x4c815bed;
59  enum class Change { MechNull, FlNull, ThNull, AddToList, RemoveFromList };
61  virtual const IThing * getIThing() const=0;
63  virtual IThing * getIThing()=0;
65  virtual const INode * getINode() const=0;
66  virtual INode * getINode()=0;
69  virtual const IGp * getNext() const=0;
71  virtual bool isMechanicalNull() const=0;
73  virtual bool isThermalNull() const=0;
75  virtual bool isFluidNull() const=0;
77  virtual DVect getVelocity(bool local=false) const=0;
79  virtual void setVelocity(const DVect &v,bool local=false)=0;
81  virtual DVect getDisplacement(bool local=false) const=0;
83  virtual void setDisplacement(DVect v,bool local=false) =0;
85  virtual DVect getSmallDisplacement(bool local=false) const=0;
87  virtual void setSmallDisplacement(DVect v,bool local=false) =0;
89  virtual DVect getFobLast(bool local=false) const=0;
91  virtual DVect getFap(bool local=false) const=0;
96  virtual DVect getTotalForceLast(bool reaction=false,bool local=false) const=0;
97  virtual DVect getTotalForceCurrent(const DVect &gravity,bool reaction=false,bool local=false) const=0;
99  virtual DVect getPosition() const=0;
101  virtual void setPosition(const DVect &v) =0;
103  virtual const IFluidGp * getIFluidGp() const=0;
105  virtual IFluidGp * getIFluidGp() =0;
107  virtual void copyState(const IGp *gp)=0;
109  virtual bool getLocSmall() const =0;
111  virtual void setLocSmall(bool b) =0;
113  virtual double getInertialMass() const=0;
115  virtual double getGravitationalMass() const=0;
117  virtual void setGravitationalMass(const double &d)=0;
119  virtual double getPP() const =0;
121  virtual void setPP(double d) =0;
123  virtual bool getPPFix() const = 0;
125  virtual void setPPFix(bool b) = 0;
127  virtual double getSat() const=0;
129  virtual void setSat(const double &d) =0;
131  virtual const IThermGp * getIThermGp() const =0;
133  virtual IThermGp * getIThermGp() =0;
135  virtual bool getTFix() const =0;
137  virtual void setTFix(bool b) =0;
140  virtual IVect getFix() const =0;
143  virtual void setFix(IVect v) =0;
146  virtual DVect getFApplyUser(bool local=false) const=0;
149  virtual DVect getMassAdd(bool local=false) const=0;
151  virtual void setMassAdd(const DVect &v,bool local=false) =0;
153  virtual void setFApplyUser(const DVect &d,bool local=false) =0;
154  virtual bool getLocalSystem() const=0;
156  virtual Axes getSystem() const=0;
158  virtual void setSystem(const Axes &a) = 0;
161  virtual bool getBit(int bit) const=0;
166  virtual void setBit(int bit,bool b) const=0;
169  virtual QVariant getValue(int index) const=0;
173  virtual void setValue(int index,const QVariant &v) const=0;
186  virtual IZone * getLinkZone()=0;
187  virtual const IZone * getLinkZone() const=0;
190  virtual uint32 getLinkIndex() const=0;
195  virtual bool fishIO(bool save,fish::File *f)=0;
197  virtual double getStiff() const=0;
199  //virtual void setStiff(const double &d) =0;
201  virtual double getTempChange() const=0;
203  virtual void setTempChange(const double &d)=0;
204  virtual double getConvergence() const=0;
205  virtual double getRatioTarget() const=0;
206  virtual void setRatioTarget(const double &d)=0;
207  virtual bool getAttached() const=0;
208  };
209 } // namespace zone
210 // EoF
Class for specifying a particular 3D cartesian axes system, and converting to and from it.
Definition: axes.h:121
Base class for items that will be stored in containers.
Definition: ithing.h:30
Interface to access fluid gridpoint data.
Definition: ifluidgp.h:14
Interface to provide access to a gridpoint.
Definition: igp.h:55
virtual QVariant getValue(int index) const =0
virtual IFluidGp * getIFluidGp()=0
Returns a pointer to the gridpoint fluid-flow data.
virtual void setBit(int bit, bool b) const =0
virtual IVect getFix() const =0
virtual bool getBit(int bit) const =0
virtual void setTFix(bool b)=0
If parameter is true, sets the thermal FIX flag on.
virtual bool getTFix() const =0
Returns 1 if the gridpoint thermal FIX flag is set, otherwise value 0 indicates that the thermal fix ...
virtual const INode * getINode() const =0
Returns a pointer to itself.
virtual void setMassAdd(const DVect &v, bool local=false)=0
Sets the additional applied mass at a gridpoint.
virtual double getPP() const =0
Returns the gridpoint pore-pressure, see setPP()
virtual void setPosition(const DVect &v)=0
Sets the gridpoint position, see getPosition()
virtual void setVelocity(const DVect &v, bool local=false)=0
Sets the gridpoint velocity, see getVelocity();.
virtual void setSat(const double &d)=0
Sets the gridpoint fluid saturation, see getSat()
virtual void setGravitationalMass(const double &d)=0
Sets the gridpoint gravitational mass, see getGravitationalMass()
virtual const IZone * getLinkZone() const =0
virtual double getTempChange() const =0
Sets the gridpoint stiffness.
virtual void setSmallDisplacement(DVect v, bool local=false)=0
Sets the gridpoint displacement for small strain, see getSmallDisplacement()
virtual double getStiff() const =0
Returns the gridpoint stiffness.
virtual DVect getVelocity(bool local=false) const =0
Returns the gridpoint velocity, see setVelocity();.
virtual const IFluidGp * getIFluidGp() const =0
Returns a const pointer to the gridpoint fluid-flow data.
virtual void setPPFix(bool b)=0
If parameter b is treu, sets the gridpoint pore-pressure to be kept fixed during calculation,...
virtual bool isThermalNull() const =0
Returns true to indicate that gridpoint thermal flag is set to NULL.
virtual bool getLocSmall() const =0
Returns 1 if gridpoint behaves as in small-strain mode. See setLocSmall();.
virtual bool isMechanicalNull() const =0
Returns true to indicate that gridpoint is "nulled".
virtual void setFApplyUser(const DVect &d, bool local=false)=0
using the APPLY command. See getFApplyUser()
virtual void setLocSmall(bool b)=0
If parameter b is true, the gridpoint will behave as in small-strain mode. See getLocSmall();.
virtual DVect getDisplacement(bool local=false) const =0
Returns the gridpoint displacement, seet setDisplacement();.
virtual DVect getTotalForceLast(bool reaction=false, bool local=false) const =0
virtual void setPP(double d)=0
Sets the gridpoint pore-pressure, see getPP()
virtual DVect getFobLast(bool local=false) const =0
Returns the gridpoint out of balance force.
virtual bool fishIO(bool save, fish::File *f)=0
virtual DVect getFApplyUser(bool local=false) const =0
virtual DVect getSmallDisplacement(bool local=false) const =0
Returns the gridpoint displacement accumulated for small strain, see setSmallDisplacement()
virtual void setFix(IVect v)=0
virtual DVect getPosition() const =0
Returns the gridpoint position, see setPosition()
virtual DVect getFap(bool local=false) const =0
Returns the sum of the gridpoint static applied force and the dynamic applied force.
virtual void setTempChange(const double &d)=0
Sets dDTemp.
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition: igp.h:58
virtual const IThermGp * getIThermGp() const =0
Returns a const pointer to IThermGp.
virtual DVect getMassAdd(bool local=false) const =0
virtual const IGp * getNext() const =0
virtual IZone * getLinkZone()=0
virtual double getInertialMass() const =0
Returns the gridpoint inertial mass, see setInertialMass()
virtual double getSat() const =0
Returns the gridpoint fluid saturation, see setSat()
virtual void setValue(int index, const QVariant &v) const =0
virtual bool getPPFix() const =0
Returns 1 if the gridpoint has fixed pore-pressure, otherwise value 0 indicates non-fixed pore-pressu...
virtual IThing * getIThing()=0
Returns a IThing pointer.
virtual void setDisplacement(DVect v, bool local=false)=0
Sets the gridpoint displacement, seet getDisplacement();.
virtual const IThing * getIThing() const =0
Returns a const IThing pointer.
virtual void setSystem(const Axes &a)=0
Sets the user-defined local axes.
virtual bool isFluidNull() const =0
Returns true to indicate that gridpoint fluid flag is set to NULL.
virtual double getGravitationalMass() const =0
Returns the gridpoint gravitational mass, see setGravitationalMass()
virtual uint32 getLinkIndex() const =0
virtual IThermGp * getIThermGp()=0
Returns a pointer to IThermGp.
virtual Axes getSystem() const =0
Returns the user-defined local axes.
virtual void copyState(const IGp *gp)=0
Copies the state of this gridpoint to gp.
Interface to access node data.
Definition: inode.h:18
Interface to access gridpoint thermal data.
Definition: ithermgp.h:12
Interface to provide access to a zone.
Definition: izone.h:80
DIM - Provides code portability between 2D and 3D codes.
uint32 TType
class type indicator
Definition: basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition: dim.h:150
IVect3 IVect
Vector of ints, either 2D or 3D.
Definition: dim.h:152
namespace Itasca
Definition: basememory.cpp:10