Itasca C++ Interface
imoduledfn.h
1 #pragma once
2 // imoduledfn.h
3 // For DFN Module
4 #include "base/src/farray.h"
5 
6 #include "shared/interface/signal.h"
7 
8 namespace itasca {
9  class IContainer;
10 }
11 
12 namespace itascaxd {
13  class IContact;
14  class ICellSpace;
15  class IContainerContact;
16  class IGeomSet;
17  class IRange;
18 }
19 
20 namespace dfn {
21  using namespace itasca;
22  using namespace itascaxd;
23 
24  class IVertexDFN;
25  class IFracture;
26  class IFracNetwork;
27  class IIntersect;
28  class IIntersectionSet;
29  class IDFNTemplate;
30  class IDFNCluster;
31 
32  class IModuleDFN {
33  public:
34 
35  using prop_signal = shared::Signal<const QString &,const QVariant &>;
36 
38  virtual TType getFracNetworkType() const=0;
40  virtual TType getInterSetType() const=0;
42  virtual TType getFractureType() const=0;
44  virtual TType getVertexDFNType() const=0;
46  virtual TType getIntersectType() const=0;
48  virtual TType getContactType() const=0;
50  virtual uint32 getFracNetworkGeometryNotice() const=0;
52  virtual uint32 getInterSetGeometryNotice() const=0;
54  virtual uint32 getFracNetworkIntersectNotice() const=0;
56  virtual uint32 getFracNetworkPropertyNotice() const=0;
58  virtual uint32 getFracNetworkExtraNotice() const=0;
60  virtual uint32 getFracNetworkGroupNotice() const=0;
62  virtual uint32 getInterSetExtraNotice() const=0;
64  virtual uint32 getInterSetGroupNotice() const=0;
66  virtual const IContainer * getIContainerFracNetwork() const=0;
70  virtual const IContainer * getIContainerIntersectionSet() const=0;
74  virtual const IContainer * getIContainerCluster() const=0;
78  virtual QStringList findAllFracNetworks() const=0;
80  virtual const IContainer * getIContainerFracture() const=0;
84  virtual const IContainer * getIContainerTemplate() const=0;
87 
91  virtual const IContainer * getIContainerVertexDFN() const=0;
92 
96  virtual const IContainer * getIContainerIntersects() const=0;
97 
99  virtual const ICellSpace * getFractureCellSpace() const=0;
103  virtual const IFracNetwork * findFracNetworkWithID(uint64 id) const=0;
105  virtual IFracNetwork * findFracNetworkWithID(uint64 id) =0;
107  virtual const IFracNetwork * findFracNetworkWithName(const QString &name) const=0;
109  virtual IFracNetwork * findFracNetworkWithName(const QString &name) =0;
111  virtual const IFracture * findFractureWithID(uint64 id,IFracNetwork *fn=0) const=0;
113  virtual IFracture* findFractureWithID(uint64 id,IFracNetwork *fn=0) =0;
115  virtual const IVertexDFN * findVertexWithID(uint64 id) const=0;
117  virtual IVertexDFN* findVertexWithID(uint64 id) =0;
119  virtual const IIntersect * findIntersectWithID(uint64 id,IFracNetwork *fn=0) const=0;
121  virtual IIntersect * findIntersectWithID(uint64 id,IFracNetwork *fn=0) =0;
123  virtual const IIntersectionSet * findInterSetWithID(uint64 id) const=0;
125  virtual IIntersectionSet * findInterSetWithID(uint64 id) =0;
127  virtual const IDFNCluster * findClusterWithID(uint64 id) const=0;
129  virtual IDFNCluster * findClusterWithID(uint64 id) =0;
131  virtual const IDFNCluster * findClusterWithName(const QString& name) const=0;
133  virtual IDFNCluster * findClusterWithName(const QString& name) =0;
134 
136  virtual const IDFNTemplate * getTemplateOfDFN(IFracNetwork*fn=0) const=0;
140  virtual const IDFNTemplate * findTemplateWithID(uint64 id) const = 0;
142  virtual IDFNTemplate* findTemplateWithID(uint64 id) = 0;
144  virtual const IDFNTemplate * findTemplateWithName(const QString& name) const = 0;
146  virtual IDFNTemplate* findTemplateWithName(const QString& name) = 0;
147 
149  virtual const IFracture * findFractureClosestTo(const DVect &v,const double &radius=limits<double>::max()) const=0;
151  virtual IFracture * findFractureClosestTo(const DVect &v,const double &radius=limits<double>::max())=0;
153  virtual const IFracture * findAnyFractureClosestTo(const DVect &v,const double &radius=limits<double>::max(),const IRange *r=0) const=0;
155  virtual IFracture * findAnyFractureClosestTo(const DVect &v,const double &radius=limits<double>::max(),const IRange *r=0)=0;
157  //virtual const IFracture * findLDFractureClosestTo(const DVect &v,const double &radius=limits<double>::max()) const=0;
159  virtual IFracture * findLDFractureClosestTo(const DVect &v,IFracNetwork *fn=0,const double &radius=limits<double>::max())=0;
161  virtual IFracture * findLDFractureInBox(const DExtent &d,IFracNetwork *fn=0)=0;
163  virtual IFracture * findLDFractureIntSeg(const DVect &d1,const DVect &d2,IFracNetwork *fn=0)=0;
165  //virtual IFracture * findLDFracturePoly(const FArray<FArray<DVect,5>,8> &d1,IFracNetwork *fn=0)=0;
166 
168  //virtual const IVertexDFN * findVertexDFNClosestTo(const DVect &v,const double &radius=limits<double>::max()) const=0;
170  //virtual IVertexDFN * findVertexDFNClosestTo(const DVect &v,const double &radius=limits<double>::max())=0;
172  //virtual void removeIVertexDFN(IVertexDFN *fac) = 0;
173 
175  //virtual void getFracNetworkList(FArray<IFracNetwork *> *ret)=0;
177  virtual void eraseIFracNetwork(IFracNetwork *w) = 0;
178 
180  virtual void eraseIInterSet(IIntersectionSet *is) = 0;
181 
183  virtual void eraseICluster(IDFNCluster *is) = 0;
184 
186  virtual IFracNetwork* createIFracNetwork(uint32 id=0,const QString &name = QString()) = 0;
187 
189  virtual IFracNetwork * getFirstIFracNetwork() const = 0;
190 
192  virtual void validate()=0;
193 
195  virtual void removeFracture(IFracture *frac) = 0;
196 
198  virtual void removeIntersectsWithFracture(IFracture * frac)=0;
199 
201  virtual void delineateIntersectionsDirty(IFracture * frac)=0;
202 
204  virtual void getIntersectList(FArray<IIntersect *> *ret,IFracNetwork *fn=0, IFracture *frac=0) =0;
205 
207  virtual void getIntersectList(FArray<const IIntersect *> *ret,IFracNetwork *fn=0, IFracture *frac=0) const = 0;
208 
210  virtual IDFNCluster* createIDFNCLuster(uint64 &id,QString &name) = 0;
211 
212  // Get the fractures of cluster
213  virtual void getFractureOfClusterList(FArray<IFracture *> *ret,IDFNCluster *cl=0, uint64 ind=0) const = 0;
214 
215  // get the shortest fracture path between two fractures
216  virtual void getPathClusterList(FArray<IFracture *> *ret,IDFNCluster *cl=0,IFracture* f1=0, IFracture* f2=0) const=0;
217 
218  // get the index of the largest cluster
219  virtual int getLargestCluster(IDFNCluster *cl=0) const = 0;
220 
221  // get the index of the largest cluster
222  virtual int getMaxIndCluster(IDFNCluster *cl=0) const = 0;
223 
225  virtual void getFractureInBoxList(const DExtent &d,FArray<IFracture *> *ret,const IRange *r=0,bool intersect=true)=0;
226 
228  virtual void getFractureInBoxList(const DExtent &d,FArray<const IFracture *> *ret,const IRange *r=0,bool intersect=true)=0;
229 
231  virtual double calcP10(const DVect&,const DVect&,const IRange *r=0) const =0;
232 
234  virtual double calcP10Geom(const IGeomSet *,const IRange *r=0) const =0;
235 
236 
237 #ifdef THREED
238 
240  virtual double calcAveTrace(const IGeomSet *,const IRange *r=0) const =0;
241 
243  virtual double calcP20(const IGeomSet *,const IRange *r=0) const =0;
244 
246  virtual double calcP21(const IGeomSet *,const IRange *r=0) const =0;
247 
249  virtual double calcP30(const DExtent &,const IRange *r=0) const =0;
250 
252  virtual double calcP32(const DExtent &,const IRange *r=0) const =0;
253 
255  virtual double calcPerc(const DExtent &,const IRange *r=0, uint option = 0) const =0;
256 #else
257 
259  virtual double calcP20(const DExtent &,const IRange *r=0) const =0;
260 
262  virtual double calcP21(const DExtent &,const IRange *r=0) const =0;
263 
265  virtual double calcPerc(const DExtent &,const IRange *r=0) const =0;
266 
267 
268 #endif
269 
271  virtual void populateAttributeSets(QStringList *scalarAtts,QStringList *stringAtts,QStringList *vectorAtts)const=0;
273  virtual void populateAttributeInterSets(QStringList *scalarAtts,QStringList *stringAtts,QStringList *vectorAtts)const=0;
275  virtual void populatePropertySets(QStringList *scalarProps,QStringList *stringProps,QStringList *vectorProps)const=0;
276 
278  virtual prop_signal * getPropertySignal() const = 0;
279 
280  };
281 } // namespace dfn
282 // EoF
An array class that attempts to minimize unnecessary heap access.
Definition: farray.h:25
Definition: idfncluster.h:16
Definition: idfntemplate.h:13
Definition: ifracnetwork.h:22
Definition: ifracture.h:24
Definition: iintersect.h:20
Definition: iintersectionset.h:22
Definition: imoduledfn.h:32
virtual TType getVertexDFNType() const =0
Return the VertexDFN TType.
virtual IFracture * findLDFractureClosestTo(const DVect &v, IFracNetwork *fn=0, const double &radius=limits< double >::max())=0
Find the const Fracture closest to v with lowest dominance.
virtual const IDFNTemplate * getTemplateOfDFN(IFracNetwork *fn=0) const =0
find the const template associated to the dfn
virtual void populateAttributeSets(QStringList *scalarAtts, QStringList *stringAtts, QStringList *vectorAtts) const =0
Populates sets of property names based on their type.
virtual TType getFracNetworkType() const =0
Return the FracNetwork TType.
virtual const ICellSpace * getFractureCellSpace() const =0
Return a const ICellSpace pointer to the FracNetwork cell space.
virtual IContainer * getIContainerIntersectionSet()=0
Return the IContainer of the IntersectionSets.
virtual IIntersect * findIntersectWithID(uint64 id, IFracNetwork *fn=0)=0
Find the IIntersect with ID id.
virtual uint32 getInterSetGroupNotice() const =0
Return the InterSet group notice.
virtual const IDFNCluster * findClusterWithName(const QString &name) const =0
Find the const DFNCLuster with name id;.
virtual uint32 getFracNetworkPropertyNotice() const =0
Return the FracNetwork property notice.
virtual double calcPerc(const DExtent &, const IRange *r=0) const =0
Calculate the p20 for all factures regardless of the fracture network.
virtual const IFracture * findFractureWithID(uint64 id, IFracNetwork *fn=0) const =0
Find the const IFracture with ID id;.
virtual const IIntersect * findIntersectWithID(uint64 id, IFracNetwork *fn=0) const =0
Find the const IIntersect with ID id;.
virtual prop_signal * getPropertySignal() const =0
Return the signal associated with the addition of a new property.
virtual const IDFNTemplate * findTemplateWithName(const QString &name) const =0
find the const Template with the given name
virtual const IDFNCluster * findClusterWithID(uint64 id) const =0
Find the const DFNCLuster with ID id;.
virtual uint32 getFracNetworkGeometryNotice() const =0
Return the FracNetwork geometry notice.
virtual const IFracture * findFractureClosestTo(const DVect &v, const double &radius=limits< double >::max()) const =0
Find the const FracNetwork closest to v.
virtual TType getIntersectType() const =0
Return the Intersection TType.
virtual void eraseICluster(IDFNCluster *is)=0
Erase the IDFNCluster - could be of any type.
virtual IContainer * getIContainerIntersects()=0
Return the IContainer of the Intersects.
virtual IFracture * findFractureClosestTo(const DVect &v, const double &radius=limits< double >::max())=0
Find the FracNetwork closest to v.
virtual uint32 getInterSetExtraNotice() const =0
Return the InterSet extra notice.
virtual void eraseIFracNetwork(IFracNetwork *w)=0
Find the fracture with lowest dominance that intersects a general polygon. Can filter by the optional...
virtual const IContainer * getIContainerIntersects() const =0
Return the const IContainer of the Intersects.
virtual void populatePropertySets(QStringList *scalarProps, QStringList *stringProps, QStringList *vectorProps) const =0
Populates sets of property names based on their type.
virtual uint32 getFracNetworkGroupNotice() const =0
Return the FracNetwork group notice.
virtual IFracture * findLDFractureIntSeg(const DVect &d1, const DVect &d2, IFracNetwork *fn=0)=0
Find the fracture with lowest dominance that intersects a line segment. Can filter by the optional fr...
virtual void delineateIntersectionsDirty(IFracture *frac)=0
Delineate all of the intersections with this fracture.
virtual const IFracNetwork * findFracNetworkWithID(uint64 id) const =0
Find the const IFracNetwork with ID id;.
virtual void populateAttributeInterSets(QStringList *scalarAtts, QStringList *stringAtts, QStringList *vectorAtts) const =0
Populates sets of attribute for intersection sets.
virtual IDFNCluster * findClusterWithID(uint64 id)=0
Find the DFNCluster with ID id.
virtual IFracNetwork * createIFracNetwork(uint32 id=0, const QString &name=QString())=0
Create an empty IFracNetwork.
virtual uint32 getInterSetGeometryNotice() const =0
Return the InterSet geometry notice.
virtual const IContainer * getIContainerFracNetwork() const =0
Return the const IContainer of the FracNetworks.
virtual IIntersectionSet * findInterSetWithID(uint64 id)=0
Find the IIntersect with ID id.
virtual void getIntersectList(FArray< IIntersect * > *ret, IFracNetwork *fn=0, IFracture *frac=0)=0
Get the intersection list.
virtual IFracNetwork * getFirstIFracNetwork() const =0
Get the first fracture network.
virtual void getFractureInBoxList(const DExtent &d, FArray< const IFracture * > *ret, const IRange *r=0, bool intersect=true)=0
Get the list of fractures within a box.
virtual TType getFractureType() const =0
Return the Fracture TType.
virtual IFracture * findAnyFractureClosestTo(const DVect &v, const double &radius=limits< double >::max(), const IRange *r=0)=0
Find the Fracture closest to v.
virtual void eraseIInterSet(IIntersectionSet *is)=0
Erase the IIntersectionSet - could be of any type.
virtual const IDFNTemplate * findTemplateWithID(uint64 id) const =0
find the const Template with the given id
virtual const IContainer * getIContainerVertexDFN() const =0
Return the const IContainer of the VertexDFNs.
virtual const IContainer * getIContainerFracture() const =0
Return the const IContainer of the Fracture.
virtual const IFracture * findAnyFractureClosestTo(const DVect &v, const double &radius=limits< double >::max(), const IRange *r=0) const =0
Find the const Fracture closest to v.
virtual double calcP21(const DExtent &, const IRange *r=0) const =0
Calculate the p21 for all factures regardless of the fracture network.
virtual TType getContactType() const =0
Return the Contact TType.
virtual const IContainer * getIContainerTemplate() const =0
Return the const IContainer of the templates.
virtual const IContainer * getIContainerCluster() const =0
Return the const IContainer of the dfncluster.
virtual double calcP10(const DVect &, const DVect &, const IRange *r=0) const =0
Calculate the p10 - works in 2D and 3D. This calculates the P10 for all fractures regardless of the f...
virtual IContainer * getIContainerVertexDFN()=0
Return the IContainer of the VertexDFNs.
virtual IDFNTemplate * findTemplateWithID(uint64 id)=0
find the Template with the given id
virtual IVertexDFN * findVertexWithID(uint64 id)=0
Find the IVertexDFN with ID id.
virtual void removeFracture(IFracture *frac)=0
Remove the fracture.
virtual IFracNetwork * findFracNetworkWithID(uint64 id)=0
Find the IFracNetwork with ID id.
virtual IFracture * findLDFractureInBox(const DExtent &d, IFracNetwork *fn=0)=0
Find the Fracture with lowest dominance that intersects the box d. Can filter by the optional fractur...
virtual uint32 getFracNetworkIntersectNotice() const =0
Return the FracNetwork geometry notice.
virtual IFracture * findFractureWithID(uint64 id, IFracNetwork *fn=0)=0
Find the IFracture with ID id.
virtual uint32 getFracNetworkExtraNotice() const =0
Return the FracNetwork extra notice.
virtual IDFNCluster * findClusterWithName(const QString &name)=0
Find the DFNCluster with ID id.
virtual void validate()=0
Validate the fracture cell space if there is no cell space.
virtual QStringList findAllFracNetworks() const =0
Return the list of the names of all FracNetworks.
virtual IDFNCluster * createIDFNCLuster(uint64 &id, QString &name)=0
Create an empty cluster.
virtual IDFNTemplate * getTemplateOfDFN(IFracNetwork *fn=0)=0
find the template associated to the dfn
virtual const IFracNetwork * findFracNetworkWithName(const QString &name) const =0
Find the const IFracNetwork with name name.
virtual double calcP10Geom(const IGeomSet *, const IRange *r=0) const =0
Calculate the p10 using a geometry set.
virtual const IIntersectionSet * findInterSetWithID(uint64 id) const =0
Find the const IIntersectionSet with ID id;.
virtual ICellSpace * getFractureCellSpace()=0
Return an ICellSpace pointer to the FracNetwork cell space.
virtual IContainer * getIContainerTemplate()=0
Return the IContainer of the templates.
virtual double calcP20(const DExtent &, const IRange *r=0) const =0
Calculate the p21 for all factures regardless of the fracture network.
virtual IDFNTemplate * findTemplateWithName(const QString &name)=0
find the Template with the given id
virtual const IContainer * getIContainerIntersectionSet() const =0
Return the const IContainer of the IntersectionSets.
virtual void getIntersectList(FArray< const IIntersect * > *ret, IFracNetwork *fn=0, IFracture *frac=0) const =0
Get the intersection list.
virtual IContainer * getIContainerFracNetwork()=0
Return the IContainer of the FracNetworks.
virtual TType getInterSetType() const =0
Return the FracNetwork TType.
virtual void removeIntersectsWithFracture(IFracture *frac)=0
Remove all the intersections with this fracture.
virtual const IVertexDFN * findVertexWithID(uint64 id) const =0
Find the const IVertexDFN with ID id;.
virtual void getFractureInBoxList(const DExtent &d, FArray< IFracture * > *ret, const IRange *r=0, bool intersect=true)=0
Get the list of fractures within a box.
virtual IContainer * getIContainerFracture()=0
Return the IContainer of the Fracture.
virtual IContainer * getIContainerCluster()=0
Return the IContainer of the IntersectionSets.
virtual void getPathClusterList(FArray< IFracture * > *ret, IDFNCluster *cl=0, IFracture *f1=0, IFracture *f2=0) const =0
returns the path between two fractures
virtual IFracNetwork * findFracNetworkWithName(const QString &name)=0
Find the IFracNetwork with name name.
Definition: ivertexdfn.h:16
Interface for containers of IThings.
Definition: icontainer.h:21
Interface to a "refining" cell space.
Definition: icellspace.h:24
A container for a single "set" of geometric elements. A geometric set is a named collection of geomet...
Definition: igeomset.h:27
Interface to a filter, used as the main method for filtering objects.
Definition: irange.h:32
debug checked shorthand for std::numeric_limits<T>::
Definition: limit.h:25
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:156
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition: dim.h:150
namespace Itasca
Definition: basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition: icontactmodule.h:4