Itasca C++ Interface
Loading...
Searching...
No Matches
izonelist.h
Go to the documentation of this file.
1//izonelist.h
2#pragma once
3
9#include "base/src/farray.h"
10#include "base/src/callback.h"
11
12#include "module/interface/igenericmodellist.h"
13#include "utility/interface/igroup.h"
14
15#include <set>
16
17namespace itasca {
18 class IContainer;
19 class IThing;
20}
21namespace itascaxd {
22 class IFetchProperty;
23}
24
25namespace zone {
26 using namespace itasca;
27
28 class IFace;
29 class IFetchFluidProperty;
30 class IFetchThermalProperty;
31 class IZone;
32 class IZoneData;
33
36 class IZoneList {
37 public:
40 virtual const IThing * getIThing() const=0;
42 virtual IThing * getIThing()=0;
44 virtual const IContainer * getIContainer() const=0;
46 virtual IContainer * getIContainer() =0;
48
49 virtual const IZone * getFirstZone() const=0;
51
52 virtual IZone * getFirstZone()=0;
54 virtual uint32 getZoneType() const=0;
56 virtual uint32 getFaceType() const=0;
58 virtual const IZone * findZoneWithID(uint64 id) const=0;
60 virtual IZone * findZoneWithID(uint64 id)=0;
64 virtual const IZone * findZoneNearest(const DVect &vec,const double &radius=limits<double>::max()) const=0;
68 virtual IZone * findZoneNearest(const DVect &vec,const double &radius=limits<double>::max()) =0;
70 virtual uint64 getNZone() const=0;
75 virtual IZone * findZoneContainingNull(const DVect &v,bool hideNull) const =0;
77
82 virtual IZone * findZoneNearestLive(const DVect &dv3) =0;
84 virtual uint32 getZoneExtraNotice() const=0;
86 virtual uint32 getModelNotice() const=0;
88 virtual uint32 getPropertyNotice() const=0;
90 virtual uint32 getStateNotice() const=0;
92 virtual uint32 getDensityNotice() const=0;
94 virtual uint32 getGroupNotice() const=0;
96 virtual uint32 getStressNotice() const=0;
98 virtual uint32 getThermalFluxNotice() const =0;
100 virtual uint32 getFaceGroupNotice() const=0;
102 virtual uint32 getFaceExtraNotice() const=0;
104 virtual uint32 getHideNotice() const=0;
106 virtual uint32 getSelectNotice() const=0;
108 virtual uint32 getFaceHideNotice() const=0;
110 virtual uint32 getFaceSelectNotice() const=0;
111 virtual uint32 getMultiplierNotice() const=0;
112 virtual uint32 getFluidPropNotice() const=0;
113 virtual uint32 getThermPropNotice() const=0;
115 virtual uint64 getNumberFacesHidden() const=0;
117 virtual uint64 getNumberFacesSelected() const=0;
128 virtual int claimBit() const=0;
130 virtual void releaseBit(int bit) const=0;
141 virtual int claimValue() const=0;
143 virtual void releaseValue(int bit) const=0;
146 virtual IZoneData * createIZoneData() const=0;
151
152 // Returns a ModelQueryInfo filled with information based on currently selected zones. Multithreaded!
153 virtual ModelQueryInfo getModelQueryOnSelected() const=0;
154
157 virtual const IFace * makeFace(const IZone *z,uint32 side) const=0;
160 virtual IFace * makeFace(IZone *z,uint32 side)=0;
161 virtual itascaxd::IFetchProperty *makeFetchProperty(const string &prop) const=0;
162 virtual IFetchThermalProperty *makeFetchThermalProperty(const string &prop) const=0;
163 virtual string getZoneGroupsOnSides(std::set<IGroupID> *zf1GroupList,
164 std::set<IGroupID> *zf2GroupList) const=0;
165
166 virtual std::vector<base::PropDesc> getMechanicalPropertiesAvailable() const=0;
167 virtual std::vector<base::PropDesc> getFluidPropertiesAvailable() const = 0;
168 virtual std::vector<base::PropDesc> getThermalPropertiesAvailable() const = 0;
169
170 virtual void threadedCallbackObject(Callback4<void,const IZone *,uint32,uint32,void *> &callback,void *v=nullptr,bool useThreads=true) const=0;
171 virtual void threadedCallbackFunction(void (*function)(const IZone *,uint32,uint32,void *),void *v=nullptr,bool useThreads=true) const=0;
172 template <class S,void (S::*MFP)(const IZone *,uint32,uint32,void *)>
173 void threadedCallbackMethod(S *s,void *v=nullptr,bool useThreads=true) const;
174
176 const IZone * zone_;
177 uint32 side_;
178 const IThing *entry_;
179 };
180 virtual void threadedCallbackObjectFaceGroups(Callback3<void,const FaceGroupCallbackData *,uint32,uint32> &callback,bool useThreads=true) const=0;
181 template <class S,void (S::*MFP)(const FaceGroupCallbackData *,uint32,uint32)>
182 void threadedCallbackMethodFaceGroups(S *s,bool useThreads=true) const;
183
185 const IZone * zone_;
186 uint32 side_;
187 };
188 virtual void threadedCallbackObjectFaceSelect(Callback3<void,const FaceSelectCallbackData *,uint32,uint32> &callback,bool useThreads=true) const=0;
189 template <class S,void (S::*MFP)(const FaceSelectCallbackData *,uint32,uint32)>
190 void threadedCallbackMethodFaceSelect(S *s,bool useThreads=true) const;
191 };
192
193 template <class S,void (S::*MFP)(const IZone *,uint32,uint32,void *)>
194 void IZoneList::threadedCallbackMethod(S *s,void *v,bool useThreads) const {
196 threadedCallbackObject(callback,v,useThreads);
197 }
198
199 template <class S,void (S::*MFP)(const IZoneList::FaceGroupCallbackData *,uint32,uint32)>
200 void IZoneList::threadedCallbackMethodFaceGroups(S *s,bool useThreads) const {
202 threadedCallbackObjectFaceGroups(callback,useThreads);
203 }
204
205 template <class S,void (S::*MFP)(const IZoneList::FaceSelectCallbackData *,uint32,uint32)>
206 void IZoneList::threadedCallbackMethodFaceSelect(S *s,bool useThreads) const {
208 threadedCallbackObjectFaceSelect(callback,useThreads);
209 }
210} // namespace zone
211// EoF
Definition callback.h:30
Definition callback.h:121
Definition callback.h:37
Definition callback.h:130
Definition basestring.h:89
Interface for containers of IThings.
Definition icontainer.h:21
Base class for items that will be stored in containers.
Definition ithing.h:30
Definition ifetchproperty.h:11
debug checked shorthand for std::numeric_limits<T>::
Definition limit.h:25
Interface to zone faces.
Definition iface.h:23
Definition ifetchthermalproperty.h:6
Access to zone scalar data.
Definition izonedata.h:24
Interface to provide access to a zone.
Definition izone.h:80
Interface for accessing the global list of zones, IZoneList.
Definition izonelist.h:36
virtual uint32 getStressNotice() const =0
Returns the tag for the zone stress state change notice.
virtual uint32 getStateNotice() const =0
Returns the tag for the zone state change notice.
virtual uint32 getHideNotice() const =0
Returns the tag for zone hide status.
virtual StringList getAllMechanicalModels() const =0
Returns a QStringList containing all unique mechanical constitutive models in all zones (null exclude...
virtual const IContainer * getIContainer() const =0
Returns a const pointer to the IContainer.
virtual IZone * findZoneWithID(uint64 id)=0
Returns a pointer to the zone, IZone, with the ID id, or 0 if the zone does not exist.
virtual const IZone * findZoneNearest(const DVect &vec, const double &radius=limits< double >::max()) const =0
virtual int claimBit() const =0
Claims a bit from the zones utility bit field.
virtual int claimValue() const =0
Claims a bit from the zones utility value array.
virtual IZone * findZoneContainingNull(const DVect &v, bool hideNull) const =0
virtual uint32 getGroupNotice() const =0
Returns the tag for the zone group change notice.
virtual uint64 getNumberFacesSelected() const =0
Returns the total number of faces (surface or otherwise) that are selected.
virtual uint32 getFaceExtraNotice() const =0
Returns the tag for the zone extra FISH variable change notice.
virtual uint32 getZoneType() const =0
Returns const pointer to the first character of the string retaining the type of zone.
virtual uint32 getSelectNotice() const =0
REturns the tag for zone select status.
virtual IZone * getFirstZone()=0
Returns a pointer to the first zone, IZone, in the list, or 0 if list is empty.
virtual uint32 getDensityNotice() const =0
Returns the tag for the zone density change notice.
virtual const IZone * findZoneWithID(uint64 id) const =0
Returns a const pointer to the zone, IZone, with the ID id, or 0 if the zone does not exist.
virtual uint64 getNumberFacesHidden() const =0
Returns the total number of faces (surface or otherwise) that are hidden.
virtual const IFace * makeFace(const IZone *z, uint32 side) const =0
virtual uint32 getFaceType() const =0
Returns const pointer to the first character of the string retaining the type of face.
virtual uint64 getNZone() const =0
Returns the total number of zone in the model.
virtual IZoneData * createIZoneData() const =0
virtual uint32 getThermalFluxNotice() const =0
Returns the tag for the zone thermal flux change notice.
virtual IThing * getIThing()=0
Returns a pointer to an IThing interface representing the IZoneList.
virtual const IZone * getFirstZone() const =0
Returns a const pointer to the first zone, IZone, in the list, or 0 if list is empty.
virtual uint32 getPropertyNotice() const =0
Returns the tag for the zone property change notice.
virtual uint32 getFaceSelectNotice() const =0
Returns the tag for face select status.
virtual IZone * findZoneNearest(const DVect &vec, const double &radius=limits< double >::max())=0
virtual uint32 getModelNotice() const =0
Returns the tag for the zone model change notice.
virtual IFace * makeFace(IZone *z, uint32 side)=0
virtual IZone * findZoneNearestLive(const DVect &dv3)=0
Returns a pointer to the zone closest to location dv3.
virtual IContainer * getIContainer()=0
Returns a pointer to the IContainer.
virtual uint32 getFaceGroupNotice() const =0
Returns the tag for the zone group change notice.
virtual const IThing * getIThing() const =0
Returns a const pointer to an IThing interface representing the IZoneList.
virtual uint32 getFaceHideNotice() const =0
Returns the tag for face hide status.
virtual void releaseBit(int bit) const =0
Releases a bit index previously obtained with claimBit(). Thread-safe.
virtual uint32 getZoneExtraNotice() const =0
Returns the tag for the zone extra variable change notice.
virtual void releaseValue(int bit) const =0
Releases a value index back to the zones utility value array. Thread-safe.
virtual StringList getAllMechanicalProperties() const =0
Returns a QStringList containing all unique property names of all mechanical constitutive models in a...
An array class that attempts to minimize unnecessary heap access.
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
Definition igenericmodellist.h:26
Definition izonelist.h:175
Definition izonelist.h:184