Itasca C++ Interface
Loading...
Searching...
No Matches
icontainercontact.h
Go to the documentation of this file.
1#pragma once
2
3#include "dim.h"
4#include "base/src/callback.h"
11namespace itasca {
12 class IContainer;
13}
14
15namespace itascaxd {
16 using namespace itasca;
17 class IContact;
18 class IContactModel;
19 class IPiece;
20 class ContactClassDataBase;
21 class IContainerActiveContact;
22 class MonitorBase;
24
29 public:
31 inline static const TType type_ = 0x04c815ba7;
32
35 virtual const IContainer *getIContainer() const=0;
36
39 virtual const IContainer *getContainerAllContact() const=0;
40
44
47 virtual IContainer * getEnd2Container()=0;
48 virtual MonitorBase * getMonitorBase()=0;
49
51 virtual TType getType() const=0;
53 virtual IString getName() const=0;
55 virtual QString getContactClassName() const=0;
57 virtual IString getTypeName() const=0;
59 virtual TType getContactType() const=0;
61 virtual double getMinDistance() const=0;
63 virtual bool isMechanical() const=0;
65 virtual bool isThermal() const=0;
68 // meaning that the contact model will be assigned to this type of contact when prompted.
69 virtual void registerContactModel(const QString &cmodel)=0;
71 virtual bool amInterestedIn(const QString &cmodel) const=0;
73 virtual void clean(bool addStiffness)=0;
75 virtual void setClassData(ContactClassDataBase *) =0;
77 virtual ContactClassDataBase *getClassData() =0;
79 virtual double getEnergy(const QString &name) const = 0;
82 virtual const IContact * findContactWithEndIds(uint64 id1,uint64 id2) const = 0;
84 virtual const IContact* findContactNearest(DVect center) const=0;
87 virtual void setInhibit(IThing *t,bool b) = 0;
90 virtual const IContainer * getInhibitedContacts() const = 0;
92 virtual bool getOverlapRequired() const = 0;
93 virtual void setOverlapRequired(bool b) = 0;
94
95
97 virtual uint64 createBlocks() = 0;
99 virtual uint64 getBlocks() = 0;
100
102 virtual void threadedCallbackObject(Callback4<void,IContact *,uint32,uint32,void *> &callback,void *v=nullptr,bool useThreads=true) =0;
103
105 template <class S,void (S::*MFP)(IContact *,uint32,uint32,void *)>
106 void threadedCallbackMethod(S *s,void *v=nullptr,bool useThreads=true) {
108 threadedCallbackObject(callback,v,useThreads);
109 }
110
111 };
112
113} // namespace itasca
114// 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:28
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:106
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:31
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 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
namespace Itasca
Definition basememory.cpp:14
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4