Itasca C++ Interface
Loading...
Searching...
No Matches
icontact.h
Go to the documentation of this file.
1#pragma once
2// icontact.h
3
9#include "dim.h"
10
11namespace itasca {
12 class IFishParam;
13 class IThing;
14 class IContainer;
15}
16
17namespace 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 getNeverDelete() const=0;
83 virtual bool canDelete() const=0;
85 virtual IContactModel * getModel() =0;
86 virtual const IContactModel * getModel() const=0;
88 virtual QString getModelName() const=0;
90 virtual IContactModel *setModelName(const QString &name)=0;
91 virtual IContactModel *setModel(const IContactModel *toClone,bool validate=true)=0;
92
94 virtual bool isMechanical() const=0;
96 virtual bool isThermal() const=0;
99 virtual IContact * getParent() =0;
100 virtual const IContact * getParent() const =0;
102 virtual void setInhibit(bool b)=0;
104 virtual void setAlwaysActive(bool b)=0;
106 virtual void setNeverDelete(bool b)=0;
108 virtual void setFix(bool b)=0;
110 virtual uint32 getFID() const=0;
112 virtual void setActive(bool b)=0;
114 virtual void setFID(uint32 i)=0;
116 virtual void setOffSet(const DVect &v)=0;
118 virtual DVect getOffSet() const =0;
120 virtual bool getIsWithGhost() const=0;
121 // Extra Variable Section
123 virtual bool amInterestedIn(const QString &cmodel) const=0;
125 virtual void clean(bool addStiffness)=0;
127 virtual QVariant getProperty(const QString &name) const=0;
129 virtual bool setProperty(const QVariant &v,const QString &name)=0;
131 virtual uint32 getPropertyIndex(const QString &name) const=0;
133 virtual QString getPropertyName(uint32 index) const=0;
135 virtual void tagPropertyNotice()=0;
137 virtual IContact * getIContact()=0;
139 virtual TType getDerivedType() const=0;
141 virtual void getAssociatedThingsContact(std::vector<const IThing*> &) const=0;
142
143
144 };
145} // namespace itasca
146
147// 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
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition icontact.h:36
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 QString getPropertyName(uint32 index) const =0
returns the name of the property with index index
virtual IThing * getIThing()=0
returns a IThing pointer
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 IContactModel * setModelName(const QString &name)=0
assigns the contact model based on a name
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 IPiece * getEnd1()=0
returns a pointer to the contact first IPiece object (e.g. a ball)
virtual void setFix(bool b)=0
sets the fix condition flag
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 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 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 IPiece * getEnd2()=0
returns a pointer to the contact second IPiece object (e.g. a wall)
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 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 IContact * getIContact()=0
Return self.
virtual DVect3 getNormal() const =0
returns a normal vector to the contact
virtual IContactModel * getModel()=0
returns contact model
virtual QString getClassName() const =0
returns a string describing the contact class (eg. "mechanical")
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 DVect2 getCharacteristicLength() const =0
Returns the length from getPosition() in the normal direction that is generally representative of the...
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:154
namespace Itasca
Definition basememory.cpp:14
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4