Itasca C++ Interface
Loading...
Searching...
No Matches
ipebble.h
1#pragma once
2// ipebble.h
3
4#include "base/src/matrix.h"
5#include "module/interface/ibody.h"
6#include "utility/src/thing.h"
7#include "utility/src/locallink.h"
8
9namespace itasca {
10 class IGroup;
11}
12namespace itascaxd {
13 class IPiece;
14 class IPieceMechanical;
15 class IPieceMechanicalData;
16}
17
18namespace pfc {
19 using namespace itasca;
20 using namespace itascaxd;
21 class IClump;
22 class IClumpTemplate;
23 class IPebble: public ThingID,
24 public LocalLink<IPebble>
25 {
26 public:
27 inline static const TType type_ = 0x4e6627a1;
28 IPebble(uint64 id) : ThingID(id) { }
29 virtual ~IPebble() { };
30 virtual IThing * getIThing() { return this; }
31 virtual const IThing * getIThing() const { return this; }
32 virtual IPiece * getIPiece()=0;
33 virtual const IPiece * getIPiece() const=0;
34 virtual IPieceMechanical * getIPieceMechanical()=0;
35 virtual const IPieceMechanical * getIPieceMechanical() const=0;
36 virtual IPieceMechanicalData * getIPieceMechanicalData()=0;
37 virtual const IPieceMechanicalData *getIPieceMechanicalData() const=0;
38 virtual IClump * getIClump()=0;
39 virtual const IClump * getIClump() const=0;
40 virtual void setIClump(IClump *)=0;
41 virtual IPebble * getNext()=0;
42 virtual const IPebble * getNext() const=0;
43 virtual IPebble * getPrev()=0;
44 virtual void setNext(IPebble *)=0;
45 virtual void setPrev(IPebble *)=0;
46 virtual const IPebble * getPrev() const=0;
47 virtual bool baseIsIn(const DVect &d,const double &tol=1e-7) const { d; tol; throw Exception("Not in IPiece baseIsIn"); }
48 virtual bool baseBoxIsIn(const DExtent &d,const double &tol=1e-7) const { d; tol; throw Exception("Not in IPiece baseBoxIsIn"); }
49 virtual bool baseIntersects(const DExtent &d,const double &tol=1e-7) const { d; tol; throw Exception("Not in IPiece baseIntersects"); }
50 virtual IBody::InOutMode baseCheckInOutSphere(const DVect &,const double &) const=0;
51 virtual void baseScale(const double &d)=0;
52 virtual double baseRadius() const=0;
53 virtual void baseSetOnRestore(bool b)=0;
54 virtual void baseSetMapTolConst(const double &d)=0;
55 virtual double baseTolerance() const=0;
56 virtual bool checkExtent(bool localLock=false)=0;
57 virtual bool regularPebble() const=0;
58
59 virtual void copy(const IPebble *)=0;
60
61 virtual DVect getPosition() const=0;
62 virtual double getRadius() const=0;
63 virtual DVect getVelocity() const=0;
64 virtual DAVect getAngVelocity() const=0;
65 virtual DExtent getDExtent() const=0;
66 virtual DExtent getCellExtent() const=0;
67 virtual DExtent getToleranceExtent() const=0;
68 virtual bool getIsClumpTemplate() const=0;
69 virtual bool getIsClumpTemplateAndReferredTo() const=0;
70 virtual void spinTranslate(const DMatrix<dim,dim> &rm,const DVect &trans,bool lock=false,bool checkExtent=true)=0;
74 virtual const IClumpTemplate * getMyClumpTemplate() const =0;
75
76 virtual void setPosition(const DVect &p)=0;
77 virtual void setRadius(const double &d,bool lock=false)=0;
78 virtual void setRadiusNoLock(const double &d)=0;
79
80 virtual int getFragmentIndex() const = 0;
81
82 // for plotting
83 virtual void getFacetGeometry(FArray<DVect> *vert,double &) const=0;
84
85
86 };
87} // namespace pfc
88// EoF
89
DMatrix is a Matrix that defaults to type double...
Definition matrix.h:758
Base exception class for all Itasca code.
Definition baseexception.h:10
An array class that attempts to minimize unnecessary heap access.
Definition farray.h:25
Base class for items that will be stored in containers.
Definition ithing.h:30
InOutMode
Enumerator for defining the geometric attributes of a body relative to a geometric shape.
Definition ibody.h:26
Definition ipiece.h:15
Definition ipiecemechanicaldata.h:13
Definition ipiecemechanical.h:11
Interface for a clump. This is the interface for a clump. A clump is a collection of pebbles that def...
Definition iclump.h:37
Interface for a clump template. This is the interface for a clump template. A clump template is compo...
Definition iclumptemplate.h:25
Definition ipebble.h:25
virtual IClumpTemplate * getMyClumpTemplate()=0
Return the IClumpTemplate pointer.
virtual const IClumpTemplate * getMyClumpTemplate() const =0
Return the const IClumpTemplate pointer.
uint32 TType
class type indicator
Definition basedef.h:46
DExtent3 DExtent
A DExtent2 in 2D, a DExtent3 in 3D.
Definition dim.h:160
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
A template-based matrix class, size fixed at compile time.
namespace Itasca
Definition basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4
PFC namespace.
Definition iballfluid.h:15