Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
icontainercontact.h
Go to the documentation of this file.
1#pragma once
2
3#include "dim.h"
4#include "base/src/callback.h"
12namespace itasca {
13 class IContainer;
14}
15
16namespace itascaxd {
17 using namespace itasca;
18 class IContact;
19 class IContactModel;
20 class IPiece;
21 class ContactClassDataBase;
22 class IContainerActiveContact;
23 class MonitorBase;
25
30 public:
32 inline static const TType type_ = 0x04c815ba7;
33
36 virtual const IContainer *getIContainer() const=0;
37
40 virtual const IContainer *getContainerAllContact() const=0;
41
45
48 virtual IContainer * getEnd2Container()=0;
49 virtual MonitorBase * getMonitorBase()=0;
50
52 virtual TType getType() const=0;
54 virtual IString getName() const=0;
56 virtual QString getContactClassName() const=0;
58 virtual IString getTypeName() const=0;
60 virtual TType getContactType() const=0;
62 virtual double getMinDistance() const=0;
64 virtual bool isMechanical() const=0;
66 virtual bool isThermal() const=0;
69 // meaning that the contact model will be assigned to this type of contact when prompted.
70 virtual void registerContactModel(const QString &cmodel)=0;
72 virtual bool amInterestedIn(const QString &cmodel) const=0;
74 virtual void clean(bool addStiffness)=0;
76 virtual void setClassData(ContactClassDataBase *) =0;
78 virtual ContactClassDataBase *getClassData() =0;
80 virtual double getEnergy(const QString &name) const = 0;
83 virtual const IContact * findContactWithEndIds(uint64 id1,uint64 id2) const = 0;
85 virtual const IContact* findContactNearest(DVect center) const=0;
88 virtual void setInhibit(IThing *t,bool b) = 0;
91 virtual const IContainer * getInhibitedContacts() const = 0;
93 virtual bool getOverlapRequired() const = 0;
94 virtual void setOverlapRequired(bool b) = 0;
95
96
98 virtual uint64 createBlocks() = 0;
100 virtual uint64 getBlocks() = 0;
101
103 virtual void threadedCallbackObject(Callback4<void,IContact *,uint32,uint32,void *> &callback,void *v=nullptr,bool useThreads=true) =0;
104
106 template <class S,void (S::*MFP)(IContact *,uint32,uint32,void *)>
107 void threadedCallbackMethod(S *s,void *v=nullptr,bool useThreads=true) {
109 threadedCallbackObject(callback,v,useThreads);
110 }
111
113 virtual void modelStateInformation(StateInfoOutput &rv,const QStringList &types) const=0;
114 };
115
116} // namespace itasca
117// EoF
Definition callback.h:37
Definition callback.h:130
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
Definition icontaineractivecontact.h:13
Contact container class.
Definition icontainercontact.h:29
virtual bool amInterestedIn(const QString &cmodel) const =0
Returns true if the contact model can be assigned to this type of contact.
virtual void clean(bool addStiffness)=0
Updates the state of all contacts in the container.
virtual double getMinDistance() const =0
Returns the minimum distance.
virtual IContainer * getIContainer()=0
returns a pointer to the IContainer class representing a list of contacts.
virtual TType getContactType() const =0
Returns the TType of the contact.
void threadedCallbackMethod(S *s, void *v=nullptr, bool useThreads=true)
Implementation of the multithreaded loop using the threadedCallbackObject
Definition icontainercontact.h:107
virtual TType getType() const =0
Returns the TType of the contact.
virtual IContainer * getContainerAllContact()=0
returns a pointer to the IContainer class representing a list of all contacts.
virtual bool isThermal() const =0
Returns true if the contact is thermal.
virtual bool isMechanical() const =0
Returns true if the contact is mechanical.
virtual const IContact * findContactWithEndIds(uint64 id1, uint64 id2) const =0
virtual QString getContactClassName() const =0
Returns the contact class name.
virtual IString getName() const =0
Returns the container name.
virtual IString getTypeName() const =0
Returns the contact type name.
virtual void setInhibit(IThing *t, bool b)=0
virtual void threadedCallbackObject(Callback4< void, IContact *, uint32, uint32, void * > &callback, void *v=nullptr, bool useThreads=true)=0
Object for creation of multithreaded loop over bodies.
virtual uint64 createBlocks()=0
Interface access to the Multicontainer createBlock function.
virtual IContainer * getEnd1Container()=0
returns a pointer to the Piece containers representing each end of the contact
virtual uint64 getBlocks()=0
Interface access to the Multicontainer getNumberOfBlocks function.
virtual void setClassData(ContactClassDataBase *)=0
Set the contact class data pointer.
virtual IContainerActiveContact * getContainerActiveContact()=0
returns a pointer to the IContainer class representing a list of active contacts.
virtual bool getOverlapRequired() const =0
Get/set the overlap required flag to change the detection state.
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition icontainercontact.h:32
virtual ContactClassDataBase * getClassData()=0
Get the contact class data pointer.
virtual double getEnergy(const QString &name) const =0
Get the contact container energy contribution.
virtual void modelStateInformation(StateInfoOutput &rv, const QStringList &types) const =0
Each container may return information for the objects pane.
virtual void registerContactModel(const QString &cmodel)=0
virtual IContainer * getInhibitedContacts()=0
Return the inhibited contacts.
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
This interface provides an entry point for command processing.
namespace Itasca
Definition basememory.cpp:14
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4