fracture.inbox

Syntax

arr = fracture.inbox(vlower,vupper<,dfn>)

Get fractures intersecting or contained within a box. If dfn is not given the calculation is undertaken over all fractures of all DFNs. Iterate over a FISH array using the loop and array.size constructs.

Returns:

arr - array of fractures

Arguments:

vlower - lower bound of the box

vupper - upper bound of the box

dfn - optional DFN pointer

Usage Example

The following example illustrates how fracture.inbox can be used to get fractures close to the DFN center of either a given DFN or all fractures.

model new
model random 10000
model domain extent -5 5
;Generate fractures using the default template
fracture generate fracture-count 100 dfn 'first'
fracture generate fracture-count 100 dfn 'second'

; find the fracture only close to the center
fish define find_closest
	local pt1 = vector(-1,-1,-1)
	local pt2 = vector(1,1,1)
	local farray1 = fracture.inbox(pt1,pt2,dfn.find('first'))
	local farray2 = fracture.inbox(pt1,pt2,dfn.find('second'))
	local farrayall = fracture.inbox(pt1,pt2)
	io.out(string(array.size(farray1,1)) + " fractures for dfn first")
	io.out(string(array.size(farray2,1)) + " fractures for dfn second")
	io.out(string(array.size(farrayall,1)) + " fractures for all fractures")
end
[find_closest]

program return