Itasca C++ Interface
Loading...
Searching...
No Matches
icontactmechanical.h
Go to the documentation of this file.
1#pragma once
2// icontactmechanical.h
3#include "base/src/mat.h"
4
5#include "shared/interface/signal.h"
12namespace itasca {
13 class IThing;
14}
15
16namespace itascaxd {
17 using namespace itasca;
18
19 class IContact;
20 class IContactModel;
21 class IContactModelMechanical;
22 class IPiece;
23 class IPieceMechanical;
24
26
38 public:
40 inline static const TType type_ = 0x04c815ba9;
41
43 using fid_signal = shared::Signal<IContactModel *,const IContact *>;
44
46 virtual const IThing * getIThing() const=0;
47 virtual IThing * getIThing()=0;
49 virtual const IContact * getContact() const=0;
50 virtual IContact * getContact()=0;
52 virtual const IPiece * getEnd1() const=0;
53 virtual IPiece * getEnd1()=0;
55 virtual const IPieceMechanical * getEnd1Mechanical() const=0;
58 virtual const IPiece * getEnd2() const=0;
59 virtual IPiece * getEnd2()=0;
61 virtual const IPieceMechanical * getEnd2Mechanical() const=0;
63 // Return the curvature of end1
64 virtual DVect2 getEnd1Curvature() const=0;
65 // Return the curvature of end2
66 virtual DVect2 getEnd2Curvature() const=0;
67 // Return the curvature of end1
68 virtual DVect2 getEnd1Extent() const=0;
69 // Return the curvature of end2
70 virtual DVect2 getEnd2Extent() const=0;
72 virtual const IContactModel * getModel() const=0;
73 virtual IContactModel * getModel()=0;
75 virtual const IContactModelMechanical *getModelMechanical() const=0;
76 virtual IContactModelMechanical * getModelMechanical()=0;
78 virtual IContactModel * setModel(const IContactModel *toClone,bool validate=true)=0;
80 virtual void replaceContactModel(IContactModel*)=0;
82 virtual QString getModelName() const=0;
84 virtual IContactModel * setModelName(const QString &name)=0;
86 virtual QVariant getProperty(const QString &name) const=0;
88 virtual bool setProperty(const QVariant &v,const QString &name)=0;
90 virtual uint32 getPropertyIndex(const QString &name) const=0;
92 virtual QString getPropertyName(uint32 index) const=0;
94 virtual DVect getLocalForce() const=0;
96 virtual DAVect getLocalMomentOn1() const=0;
98 virtual DAVect getLocalMomentOn2() const=0;
100 virtual DVect getGlobalForce() const=0;
102 virtual double getNormalForce() const=0;
104 virtual double getShearForce() const=0;
106 virtual DAVect getGlobalMomentOn1() const=0;
108 virtual DAVect getGlobalMomentOn2() const=0;
110 virtual uint32 getFID() const=0;
112 virtual void setFID(uint32 i)=0;
114 virtual fid_signal * getFIDSignal() =0;
116 virtual void executeFIDSignal(IContactModel *)=0;
118 virtual void executeFIDSignal(IContactModel *) const=0;
120 virtual double getGap() const=0;
122 virtual double calculateOverlapVolume() const = 0;
126 virtual DVect getLength() const = 0;
128 virtual void updateResultingTorqueOn1Local(const DVect &forceOn2,DAVect *ret) const=0;
130 virtual void updateResultingTorqueOn2Local(const DVect &forceOn2,DAVect *ret) const=0;
132 virtual std::pair<DVect,DAVect> getRelativeVelocity() const=0;
134 virtual DVect inGlobal(const DVect &vin) const=0;
136 virtual DVect inLocal(const DVect &vin) const=0;
138 virtual DVect2 getEffectiveTranslationalStiffness() const =0;
139 virtual DAVect getEffectiveRotationalStiffness() const =0;
140
142 virtual bool getIsBonded() const = 0;
144 virtual void unbondMe()=0;
145
146 virtual void setFullUpdate(bool)=0;
147 virtual bool getFullUpdate() const=0;
148 virtual DVect localForceFromStress(const Mat &) const=0;
149 virtual void setForce(const DVect &vin) = 0;
151 virtual bool getJointGeometry(std::vector<DVect> *points,int whichProc=0) const=0;
153 virtual DVect getRelativeLocalVelocity(const DVect &pos) const = 0;
154 };
155} // namespace itascaxd
156// EoF
Base class for items that will be stored in containers.
Definition ithing.h:30
Definition mat.h:28
Contact class.
Definition icontact.h:33
ContactMechanical class.
Definition icontactmechanical.h:37
virtual std::pair< DVect, DAVect > getRelativeVelocity() const =0
Get the relative velocity and spin in global coordinates.
virtual DVect inGlobal(const DVect &vin) const =0
Convert a local quantity to the global system.
virtual double getNormalForce() const =0
Gets the normal force of this mechanical contact.
virtual void executeFIDSignal(IContactModel *) const =0
Execute the fid_signal with this IContactModel.
virtual DVect getGlobalForce() const =0
sets the force at this mechanical contact to v, expressed in the global coordinate system
virtual fid_signal * getFIDSignal()=0
Get the Signal2 for induction when a fid tag is active. This is used to set the contact model propert...
virtual void updateResultingTorqueOn1Local(const DVect &forceOn2, DAVect *ret) const =0
Given a force on end2 and the contact position calculate the torque on end1 - in local coordinates.
virtual const IPiece * getEnd2() const =0
returns a pointer to the mechanical contact second IPiece object (e.g. a ball)
virtual bool setProperty(const QVariant &v, const QString &name)=0
sets the value of the property with name name
virtual bool getJointGeometry(std::vector< DVect > *points, int whichProc=0) const =0
Return contact specific joint geometry. Returns true if triangles.
virtual uint32 getPropertyIndex(const QString &name) const =0
returns the index of the property with name name
virtual DVect2 getEffectiveTranslationalStiffness() const =0
Get the contact model effective stiffness in translation (normal,shear) and rotation.
virtual void updateResultingTorqueOn2Local(const DVect &forceOn2, DAVect *ret) const =0
Given a force on end2 and the contact force and position calculate the torque on end2 - in local coor...
virtual double getGap() const =0
Return the gap of this mechanical contact. A negative gap corresponds to physical overlap.
virtual DAVect getGlobalMomentOn1() const =0
returns the moment applied to end1 in the global coordinate system
virtual DVect getLocalForce() const =0
returns the force at this mechanical contact, in the contact local coordinate system
virtual DVect getLength() const =0
virtual const IPieceMechanical * getEnd2Mechanical() const =0
returns a pointer to the mechanical contact second IPieceMechanical object (e.g. a ball)
virtual DVect getRelativeLocalVelocity(const DVect &pos) const =0
Return the relative velocity at a point in local coordinate system.
virtual IContactModel * setModelName(const QString &name)=0
assigns the contact model based on a name
virtual double getShearForce() const =0
Gets the shear force of this mechanical contact.
virtual uint32 getFID() const =0
Gets the FID ID number, an integer tag associated with each contact.
virtual void replaceContactModel(IContactModel *)=0
Replace the contact model with a new one. The old one is deleted.
virtual QString getModelName() const =0
returns the name of the contact model present at this mechanical contact
virtual const IPiece * getEnd1() const =0
returns a pointer to the mechanical contact first IPiece object (e.g. a ball)
virtual const IThing * getIThing() const =0
returns a IThing pointer
virtual DAVect getLocalMomentOn1() const =0
returns the moment applied to end1 in the contact local coordinate system
virtual DVect inLocal(const DVect &vin) const =0
Convert a global quantity to the local system.
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition icontactmechanical.h:40
virtual void setFID(uint32 i)=0
Sets the FID ID number, an integer tag associated with each contact.
shared::Signal< IContactModel *, const IContact * > fid_signal
Fracture ID signal.
Definition icontactmechanical.h:43
virtual bool getIsBonded() const =0
Return the bonding state.
virtual DAVect getGlobalMomentOn2() const =0
returns the moment applied to end2 in the global coordinate system
virtual QString getPropertyName(uint32 index) const =0
returns the name of the property with index index
virtual const IContactModel * getModel() const =0
returns a pointer to the contact model present at this mechanical contact
virtual const IPieceMechanical * getEnd1Mechanical() const =0
returns a pointer to the mechanical contact first IPieceMechanical object (e.g. a ball)
virtual void unbondMe()=0
Unbond the contact.
virtual void executeFIDSignal(IContactModel *)=0
Execute the fid_signal with this IContactModel.
virtual IContactModel * setModel(const IContactModel *toClone, bool validate=true)=0
assigns a clone of the contact model passed in arguments, and copies its properties
virtual QVariant getProperty(const QString &name) const =0
returns the value of the property with name name
virtual const IContact * getContact() const =0
returns a IContact pointer
virtual DAVect getLocalMomentOn2() const =0
returns the moment applied to end2 in the contact local coordinate system
virtual const IContactModelMechanical * getModelMechanical() const =0
returns a pointer to the mechanical contact model present at this mechanical contact
virtual double calculateOverlapVolume() const =0
Return the actual volume of the overlaping region between the contacting pieces - null if the overlap...
Definition ipiece.h:15
Definition ipiecemechanical.h:11
uint32 TType
class type indicator
Definition basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:154
DAVect3 DAVect
Angular vector of doubles, either 2D or 3D.
Definition dim.h:162
namespace Itasca
Definition basememory.cpp:14
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4