Itasca C++ Interface
icontact.h
Go to the documentation of this file.
1 #pragma once
2 // icontact.h
3 
9 #include "dim.h"
10 
11 namespace itasca {
12  class IFishParam;
13  class IThing;
14  class IContainer;
15 }
16 
17 namespace itascaxd {
18  class IPiece;
19  class IContactModel;
20  using namespace itasca;
21 
23 
33  class IContact {
34  public:
36  inline static const TType type_ = 0x4c815b85;
37 
39  virtual TType getContainerType() const=0;
40 
42  virtual IThing * getIThing()=0;
43  virtual const IThing * getIThing() const=0;
44  // Get the IContainer of the contact.
45  virtual IContainer * getContainer()=0;
46  virtual const IContainer * getContainer() const=0;
47 
49  virtual QString getClassName() const=0;
51  virtual IString getTypeName() const=0;
53  virtual bool getActive() const=0;
55  virtual IPiece * getEnd1()=0;
56  virtual const IPiece * getEnd1() const=0;
58  virtual IPiece * getEnd2()=0;
59  virtual const IPiece * getEnd2() const=0;
61  virtual bool withWall() const=0;
63  virtual CAxes getLocalSystem() const=0;
65  virtual DVect getPosition() const=0;
67  virtual DVect3 getNormal() const=0;
69  virtual double getGap() const=0;
71  virtual double getArea() const=0;
73  virtual DVect2 getCharacteristicLength() const=0;
75  virtual bool getInhibit() const=0;
77  virtual bool getAlwaysActive() const=0;
79  virtual bool getFixed() const=0;
81  virtual bool getNeverDelete() const=0;
85  virtual bool canDelete() const=0;
87  virtual IContactModel * getModel() =0;
88  virtual const IContactModel * getModel() const=0;
90  virtual QString getModelName() const=0;
92  virtual IContactModel *setModelName(const QString &name)=0;
93  virtual IContactModel *setModel(const IContactModel *toClone,bool validate=true)=0;
94 
96  virtual bool isMechanical() const=0;
98  virtual bool isThermal() const=0;
101  virtual IContact * getParent() =0;
102  virtual const IContact * getParent() const =0;
104  virtual void setInhibit(bool b)=0;
106  virtual void setAlwaysActive(bool b)=0;
108  virtual void setNeverDelete(bool b)=0;
110  virtual void setFix(bool b)=0;
112  virtual uint32 getFID() const=0;
114  virtual void setActive(bool b)=0;
116  virtual void setFID(uint32 i)=0;
118  virtual void setOffSet(const DVect &v)=0;
120  virtual DVect getOffSet() const =0;
122  virtual bool getIsWithGhost() const=0;
123  // Extra Variable Section
125  virtual bool amInterestedIn(const QString &cmodel) const=0;
127  virtual void clean(bool addStiffness)=0;
129  virtual QVariant getProperty(const QString &name) const=0;
131  virtual bool setProperty(const QVariant &v,const QString &name)=0;
133  virtual uint32 getPropertyIndex(const QString &name) const=0;
135  virtual QString getPropertyName(uint32 index) const=0;
137  virtual void tagPropertyNotice()=0;
139  virtual IContact * getIContact()=0;
141  virtual TType getDerivedType() const=0;
143  virtual void getAssociatedThingsContact(std::vector<const IThing*> &) const=0;
144 
145 
146  };
147 } // namespace itasca
148 
149 // EoF
Class for specifying a particular 3D cartesian axes system, and converting to and from it.
Definition: caxes.h:103
Definition: istring.h:14
Interface for containers of IThings.
Definition: icontainer.h:21
Base class for items that will be stored in containers.
Definition: ithing.h:30
Contact class.
Definition: icontact.h:33
virtual IContact * getParent()=0
virtual bool canDelete() const =0
virtual void setNeverDelete(bool b)=0
sets the never delete condition flag
virtual bool getIsWithGhost() const =0
Gets whether or not the contact is with a ghost.
virtual bool withWall() const =0
returns whether or not a contact is with a wall
virtual IContactModel * getModel()=0
returns contact model
virtual QString getPropertyName(uint32 index) const =0
returns the name of the property with index index
virtual double getGap() const =0
returns the gap where, for a mechanical contact, negative gap corresponds to physical overlap.
virtual bool isMechanical() const =0
Returns TRUE if the contact is a mechanical contact - meaning it is derived from IContactMechanical.
virtual bool isThermal() const =0
Returns TRUE if the contact is a thermal contact - meaning it is derived from IContactThermal.
virtual void setFID(uint32 i)=0
Sets the FID ID number, an integer tag associated with each contact.
virtual void setFix(bool b)=0
sets the fix condition flag
virtual IThing * getIThing()=0
returns a IThing pointer
virtual TType getContainerType() const =0
Get the terminal interface TType of the instantiated contact.
virtual CAxes getLocalSystem() const =0
returns the contact local system axes
virtual IContact * getIContact()=0
Return self.
virtual void getAssociatedThingsContact(std::vector< const IThing * > &) const =0
Get a list of other things associated with contacts, like zone gridpoints.
virtual uint32 getPropertyIndex(const QString &name) const =0
returns the index of the property with name name
virtual IContactModel * setModelName(const QString &name)=0
assigns the contact model based on a name
virtual void setActive(bool b)=0
Sets the activity flag.
virtual double getArea() const =0
returns the area which is 0 for non-mechanical contacts and 0 if no area is used
virtual bool amInterestedIn(const QString &cmodel) const =0
Returns true if the contact model can be assigned to this contact.
virtual bool getAlwaysActive() const =0
returns true to indicate always active condition
virtual void setAlwaysActive(bool b)=0
sets the alwaysActive condition flag
virtual bool getNeverDelete() const =0
returns true to indicate never delete condition
virtual bool setProperty(const QVariant &v, const QString &name)=0
sets the value of the property with name name
virtual bool getFixed() const =0
returns true to indicate fixed active condition
virtual void clean(bool addStiffness)=0
Clean the contact, updating activity state.
virtual DVect getOffSet() const =0
Gets the contact offset (which is added to position of end2)
virtual IPiece * getEnd2()=0
returns a pointer to the contact second IPiece object (e.g. a wall)
virtual DVect3 getNormal() const =0
returns a normal vector to the contact
virtual QString getClassName() const =0
returns a string describing the contact class (eg. "mechanical")
virtual IPiece * getEnd1()=0
returns a pointer to the contact first IPiece object (e.g. a ball)
virtual QVariant getProperty(const QString &name) const =0
returns the value of the property with name name
virtual IString getTypeName() const =0
returns a string describing the contact class (eg. "mechanical")
virtual DVect getPosition() const =0
returns the contact position
virtual bool getActive() const =0
returns true if the contact object is active
virtual QString getModelName() const =0
returns the name of the contact model present at this mechanical contact
virtual void setOffSet(const DVect &v)=0
Sets the contact offset (which will be added to position of end2)
virtual void setInhibit(bool b)=0
sets the inhibit condition flag
virtual uint32 getFID() const =0
Gets the FID ID number, an integer tag associated with each contact.
virtual bool getInhibit() const =0
returns true to indicate inhibit condition
virtual void tagPropertyNotice()=0
Tag the contact property notice.
virtual TType getDerivedType() const =0
Get the ultimate derived type.
Definition: ipiece.h:15
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
namespace Itasca
Definition: basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition: icontactmodule.h:4