Itasca C++ Interface
Loading...
Searching...
No Matches
imodulewall.h
Go to the documentation of this file.
1#pragma once
7#include "base/src/farray.h"
8#include "shared/interface/signal.h"
9#include "base/src/callback.h"
10
11namespace itasca {
12 class IContainer;
13 class IEnergyMap;
14}
15
16namespace itascaxd {
17 class IContact;
18 class ICellSpace;
19 class IContainerContact;
20 class IHalfFacet;
21 class IHalfVertex;
22}
23
24namespace pfc {
25 using namespace itasca;
26 using namespace itascaxd;
27
28 class IWall;
29 class IFWall;
30
45 public:
47 using prop_signal = shared::Signal<const QString &,const QVariant &>;
48
50 virtual TType getFWallType() const=0;
52 virtual TType getFacetType() const=0;
54 virtual TType getVertexType() const=0;
56 virtual uint32 getFWallGeometryNotice() const=0;
58 virtual uint32 getFWallCycleNotice() const=0;
60 virtual uint32 getFWallVelocityNotice() const=0;
62 virtual uint32 getFWallDisplacementNotice() const=0;
64 virtual uint32 getFWallPropertyNotice() const=0;
66 virtual uint32 getFWallExtraNotice() const=0;
68 virtual uint32 getFWallGroupNotice() const=0;
70 virtual uint32 getFWallFacetExtraNotice() const=0;
72 virtual uint32 getFWallFacetGroupNotice() const=0;
74 virtual uint32 getFWallCleanNotice() const=0;
76 virtual const IContainer * getIContainerFWall() const=0;
82 virtual const IContainer * getIContainerFacet() const=0;
86 virtual const IContainer * getIContainerVertex() const=0;
87
89 virtual const ICellSpace * getFWallCellSpace() const=0;
93 virtual const IWall * findWallWithID(uint64 id) const=0;
95 virtual IWall * findWallWithID(uint64 id) =0;
97 virtual const IFWall * findFWallWithID(uint64 id) const=0;
99 virtual IFWall * findFWallWithID(uint64 id) =0;
101 virtual const IWall * findWallWithName(const QString &name) const=0;
103 virtual IWall * findWallWithName(const QString &name) =0;
105 virtual const IFWall * findFWallWithName(const QString &name) const=0;
107 virtual IFWall * findFWallWithName(const QString &name) =0;
109 virtual const IFWall * findFWallClosestTo(const DVect &v,const double &radius=limits<double>::max()) const=0;
111 virtual IFWall * findFWallClosestTo(const DVect &v,const double &radius=limits<double>::max())=0;
113 virtual IFWall * createIFWall(QString name,uint64 id=0)=0;
115 virtual const IHalfFacet * findFacetWithID(uint64 id,IFWall *w=0) const=0;
117 virtual IHalfFacet * findFacetWithID(uint64 id,IFWall *w=0) =0;
119 virtual IHalfFacet * findFacetAloneWithID(uint64 id) =0;
121 virtual const IHalfFacet * findFacetClosestTo(const DVect &v,const double &radius=limits<double>::max()) const=0;
123 virtual IHalfFacet * findFacetClosestTo(const DVect &v,const double &radius=limits<double>::max())=0;
125 virtual IFWall * removeIHalfFacet(IHalfFacet *fac) = 0;
126
128 virtual const IHalfVertex * findVertexWithID(uint64 id,IFWall *w=0) const=0;
130 virtual IHalfVertex * findVertexWithID(uint64 id,IFWall *w=0) =0;
132 virtual IHalfVertex * findVertexAloneWithID(uint64 id) =0;
134 virtual const IHalfVertex * findVertexClosestTo(const DVect &v,const double &radius=limits<double>::max()) const=0;
136 virtual IHalfVertex * findVertexClosestTo(const DVect &v,const double &radius=limits<double>::max())=0;
137
139 virtual void getWallList(FArray<IWall *> *ret)=0;
141 virtual void eraseIWall(IWall *w) = 0;
142
144 virtual const IEnergyMap * getIWallEnergies() const=0;
145
147 virtual void getWallInBoxList(const DExtent &d,FArray<IFWall *> *ret,bool intersect=true)=0;
148 virtual void getWallInBoxList(const DExtent &d,FArray<const IFWall *> *ret,bool intersect=true)=0;
149
151 virtual void getFacetInBoxList(const DExtent &d,FArray<IHalfFacet *> *ret,bool intersect=true)=0;
152 virtual void getFacetInBoxList(const DExtent &d,FArray<const IHalfFacet *> *ret,bool intersect=true)=0;
153
155 virtual void getVertexInBoxList(const DExtent &d,FArray<IHalfVertex *> *ret,bool intersect=true)=0;
156 virtual void getVertexInBoxList(const DExtent &d,FArray<const IHalfVertex *> *ret,bool intersect=true)=0;
157
159 virtual void populateAttributeSets(QStringList *scalarAtts,FArray<uint32> *scalarNotices,QStringList *stringAtts,FArray<uint32> *stringNotices,QStringList *vectorAtts,FArray<uint32> *vectorNotices) const=0;
161 virtual void populatePieceAttributeSets(QStringList *valueAtts,QStringList *labelAtts,QStringList *vectorAtts)const=0;
163 virtual void populatePropertySets(QStringList *valueProps,QStringList *labelProps,QStringList *vectorProps)const=0;
165 virtual prop_signal * getPropertySignal() const = 0;
166
168 virtual void threadedCallbackObjectWall(Callback4<void,IFWall *,uint32,uint32,void *> &callback,void *v=nullptr,bool useThreads=true) const=0;
169
171 template <class S,void (S::*MFP)(IFWall *,uint32,uint32,void *)>
172 void threadedCallbackMethodWall(S *s,void *v=nullptr,bool useThreads=true) const {
174 threadedCallbackObjectWall(callback,v,useThreads);
175 }
176
178 virtual void threadedCallbackObjectFacet(Callback4<void,IHalfFacet *,uint32,uint32,void *> &callback,void *v=nullptr,bool useThreads=true) const=0;
179
181 template <class S,void (S::*MFP)(IHalfFacet *,uint32,uint32,void *)>
182 void threadedCallbackMethodFacet(S *s,void *v=nullptr,bool useThreads=true) const {
184 threadedCallbackObjectFacet(callback,v,useThreads);
185 }
186
188 virtual void threadedCallbackObjectVertex(Callback4<void,IHalfVertex *,uint32,uint32,void *> &callback,void *v=nullptr,bool useThreads=true) const=0;
189
191 template <class S,void (S::*MFP)(IHalfFacet *,uint32,uint32,void *)>
192 void threadedCallbackMethodVertex(S *s,void *v=nullptr,bool useThreads=true) const {
194 threadedCallbackObjectVertex(callback,v,useThreads);
195 }
196
197 };
198} // namespace pfc
199// EoF
Definition callback.h:37
Definition callback.h:130
An array class that attempts to minimize unnecessary heap access.
Definition farray.h:25
Interface for containers of IThings.
Definition icontainer.h:21
Interface to EnergyMap class.
Definition ienergymap.h:15
Interface to a "refining" cell space.
Definition icellspace.h:24
Interface for a facet used in the faceted wall logic. This is the interface for a triangular facet as...
Definition ihalffacet.h:37
Interface for a vertex used in the faceted wall logic. This is the interface for a vertex used in the...
Definition ihalfvertex.h:27
debug checked shorthand for std::numeric_limits<T>::
Definition limit.h:25
Interface for a faceted wall.
Definition ifwall.h:45
Interface for the wall module.
Definition imodulewall.h:44
virtual IContainer * getIContainerFWall()=0
Return the IContainer of the FWalls.
virtual uint32 getFWallFacetExtraNotice() const =0
Return the FWallFacet extra notice.
virtual const IContainer * getIContainerFacet() const =0
Return the const IContainer of the Facets.
virtual void populateAttributeSets(QStringList *scalarAtts, FArray< uint32 > *scalarNotices, QStringList *stringAtts, FArray< uint32 > *stringNotices, QStringList *vectorAtts, FArray< uint32 > *vectorNotices) const =0
Populates sets of property names based on their type.
shared::Signal< const QString &, const QVariant & > prop_signal
Typedef for the small granularity signal used to indicate to the gui that a propery has been added.
Definition imodulewall.h:47
virtual void getWallInBoxList(const DExtent &d, FArray< IFWall * > *ret, bool intersect=true)=0
Return the Walls in a box.
virtual const IHalfVertex * findVertexClosestTo(const DVect &v, const double &radius=limits< double >::max()) const =0
Find the const IHalfVertex closest to v.
virtual IFWall * createIFWall(QString name, uint64 id=0)=0
Create a faceted wall with name name and ID id.
virtual const IEnergyMap * getIWallEnergies() const =0
Return the EnergyMap attached to the walls.
virtual const IContainer * getIContainerFWall() const =0
Return the const IContainer of the FWalls.
virtual IFWall * findFWallClosestTo(const DVect &v, const double &radius=limits< double >::max())=0
Find the FWall closest to v.
virtual const ICellSpace * getFWallCellSpace() const =0
Return a const ICellSpace pointer to the FWall cell space.
virtual uint32 getFWallPropertyNotice() const =0
Return the FWall property notice.
virtual uint32 getFWallExtraNotice() const =0
Return the FWall extra notice.
virtual const IHalfFacet * findFacetClosestTo(const DVect &v, const double &radius=limits< double >::max()) const =0
Find the const IHalfFacet closest to v.
virtual IContainer * getIContainerFacet()=0
Return the IContainer of the Facets.
virtual void threadedCallbackObjectFacet(Callback4< void, IHalfFacet *, uint32, uint32, void * > &callback, void *v=nullptr, bool useThreads=true) const =0
Object for creation of multithreaded loop over facets.
virtual IFWall * findFWallWithID(uint64 id)=0
Find the IFWall with ID id.
virtual TType getVertexType() const =0
Return the HalfVertexBase TType.
virtual IFWall * findFWallWithName(const QString &name)=0
Find the IWall with name name.
virtual TType getFacetType() const =0
Return the HalfFacetBase TType.
virtual void getVertexInBoxList(const DExtent &d, FArray< IHalfVertex * > *ret, bool intersect=true)=0
Return the Vertices in a box.
virtual const IHalfFacet * findFacetWithID(uint64 id, IFWall *w=0) const =0
Find the const IHalfFacet with ID id;.
virtual void threadedCallbackObjectWall(Callback4< void, IFWall *, uint32, uint32, void * > &callback, void *v=nullptr, bool useThreads=true) const =0
Object for creation of multithreaded loop over walls.
virtual void getWallList(FArray< IWall * > *ret)=0
Return a list of IWalls.
virtual IHalfFacet * findFacetWithID(uint64 id, IFWall *w=0)=0
Find the IHalfFacet with ID id.
void threadedCallbackMethodVertex(S *s, void *v=nullptr, bool useThreads=true) const
Implementation of the multithreaded loop using the threadedCallbackObjectVertex
Definition imodulewall.h:192
virtual IHalfFacet * findFacetAloneWithID(uint64 id)=0
Find the IHalfFacet with ID id.
virtual const IWall * findWallWithName(const QString &name) const =0
Find the const IWall with name name.
virtual IHalfVertex * findVertexWithID(uint64 id, IFWall *w=0)=0
Find the IHalfVertex with ID id.
virtual ICellSpace * getFWallCellSpace()=0
Return an ICellSpace pointer to the FWall cell space.
virtual IContainer * getIContainerVertex()=0
Return the IContainer of the Vertices.
virtual IWall * findWallWithID(uint64 id)=0
Find the IWall with ID id.
virtual uint32 getFWallCleanNotice() const =0
Return the FWall clean notice.
virtual void populatePropertySets(QStringList *valueProps, QStringList *labelProps, QStringList *vectorProps) const =0
Populates sets of property names based on their type.
virtual void getFacetInBoxList(const DExtent &d, FArray< IHalfFacet * > *ret, bool intersect=true)=0
Return the Facets in a box.
virtual const IWall * findWallWithID(uint64 id) const =0
Find the const IWall with ID id;.
virtual uint32 getFWallCycleNotice() const =0
Return the FWall cycle notice.
virtual uint32 getFWallGroupNotice() const =0
Return the FWall group notice.
virtual uint32 getFWallFacetGroupNotice() const =0
Return the FWallFacet group notice.
virtual TType getFWallType() const =0
Return the FWall TType.
virtual const IFWall * findFWallClosestTo(const DVect &v, const double &radius=limits< double >::max()) const =0
Find the const FWall closest to v.
virtual void threadedCallbackObjectVertex(Callback4< void, IHalfVertex *, uint32, uint32, void * > &callback, void *v=nullptr, bool useThreads=true) const =0
Object for creation of multithreaded loop over vertices.
virtual const IHalfVertex * findVertexWithID(uint64 id, IFWall *w=0) const =0
Find the const IHalfVertex with ID id;.
virtual prop_signal * getPropertySignal() const =0
Return the signal associated with the addition of a new property.
virtual uint32 getFWallDisplacementNotice() const =0
Return the FWall displacement notice.
virtual IHalfVertex * findVertexAloneWithID(uint64 id)=0
Find the IHalfVertex with ID id.
virtual IWall * findWallWithName(const QString &name)=0
Find the IWall with name name.
void threadedCallbackMethodWall(S *s, void *v=nullptr, bool useThreads=true) const
Implementation of the multithreaded loop using the threadedCallbackObjectFWall
Definition imodulewall.h:172
virtual const IFWall * findFWallWithID(uint64 id) const =0
Find the const IFWall with ID id;.
virtual const IFWall * findFWallWithName(const QString &name) const =0
Find the const IWall with name name.
virtual void eraseIWall(IWall *w)=0
Erase the IWall - could be of any type.
virtual IHalfFacet * findFacetClosestTo(const DVect &v, const double &radius=limits< double >::max())=0
Find the IHalfFacet closest to v.
virtual IFWall * removeIHalfFacet(IHalfFacet *fac)=0
Remove the facet fac from its faceted wall.
virtual uint32 getFWallVelocityNotice() const =0
Return the FWall velocity notice.
void threadedCallbackMethodFacet(S *s, void *v=nullptr, bool useThreads=true) const
Implementation of the multithreaded loop using the threadedCallbackObjectFacet
Definition imodulewall.h:182
virtual uint32 getFWallGeometryNotice() const =0
Return the FWall geometry notice.
virtual IHalfVertex * findVertexClosestTo(const DVect &v, const double &radius=limits< double >::max())=0
Find the IHalfVertex closest to v.
virtual void populatePieceAttributeSets(QStringList *valueAtts, QStringList *labelAtts, QStringList *vectorAtts) const =0
Populates sets of piece property names based on their type.
virtual const IContainer * getIContainerVertex() const =0
Return the const IContainer of the Vertices.
Interface for a generic wall. This is the interface for a generic wall. Specific wall types must deri...
Definition iwall.h:35
An array class that attempts to minimize unnecessary heap access.
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
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