setup an egg, with yolk, albumen and shell
function setup_egg() result(array) !! setup an egg, with yolk, albumen and shell use sdfs, only : sdf, sphere, box, egg use sdfModifiers, only : onion, revolution use vector_class use opticalProperties type(sdf), allocatable :: array(:) type(box) :: bbox type(revolution), save :: albumen, rev1 type(onion) :: shell type(sphere) :: yolk type(opticalProp_t) :: opt(4) type(egg), save :: egg_shell, egg_albumen real(kind=wp) :: r1, r2, h r1 = 3._wp r2 = 3._wp * sqrt(2._wp - sqrt(2._wp)) h = r2 !width = 42mm !height = 62mm !shell opt(1) = mono(100._wp, 10._wp, 0.0_wp, 1.37_wp) egg_shell = egg(r1, r2, h, opt(1), 2) rev1 = revolution(egg_shell, .2_wp) shell = onion(rev1, .2_wp) !albumen opt(2) = mono(1._wp, 0._wp, 0.0_wp, 1.37_wp) egg_albumen = egg(r1-.2_wp, r2, h, opt(2), 3) albumen = revolution(egg_albumen, .2_wp) !yolk opt(3) = mono(10._wp, 1._wp, 0.9_wp, 1.37_wp) yolk = sphere(1.5_wp, opt(3), 1) !bounding box opt(4) = mono(0._wp, 0._wp, 0.0_wp, 1._wp) bbox = box(vector(20.001_wp, 20.001_wp, 20.001_wp), opt(4), 4) allocate(array(4)) array(1) = yolk array(2) = albumen array(3) = shell array(4) = bbox end function setup_egg