cmp_volume.f90 Source File


This file depends on

sourcefile~~cmp_volume.f90~~EfferentGraph sourcefile~cmp_volume.f90 cmp_volume.f90 sourcefile~forcad.f90 forcad.f90 sourcefile~cmp_volume.f90->sourcefile~forcad.f90 sourcefile~forcad_nurbs_curve.f90 forcad_nurbs_curve.f90 sourcefile~forcad.f90->sourcefile~forcad_nurbs_curve.f90 sourcefile~forcad_nurbs_surface.f90 forcad_nurbs_surface.f90 sourcefile~forcad.f90->sourcefile~forcad_nurbs_surface.f90 sourcefile~forcad_nurbs_volume.f90 forcad_nurbs_volume.f90 sourcefile~forcad.f90->sourcefile~forcad_nurbs_volume.f90 sourcefile~forcad_utils.f90 forcad_utils.f90 sourcefile~forcad.f90->sourcefile~forcad_utils.f90 sourcefile~forcad_nurbs_curve.f90->sourcefile~forcad_utils.f90 sourcefile~forcad_nurbs_surface.f90->sourcefile~forcad_utils.f90 sourcefile~forcad_nurbs_volume.f90->sourcefile~forcad_utils.f90

Source Code

program compute_volume

    use forcad

    implicit none

    type(nurbs_volume) :: shape
    real(rk) :: volume
    real(rk) :: Xc(8,3)

    Xc(1,:) = [0.0_rk, 0.0_rk, 0.0_rk]
    Xc(2,:) = [2.0_rk, 0.0_rk, 0.0_rk]
    Xc(3,:) = [0.0_rk, 2.0_rk, 0.0_rk]
    Xc(4,:) = [2.0_rk, 2.0_rk, 0.0_rk]
    Xc(5,:) = [0.0_rk, 0.0_rk, 2.0_rk]
    Xc(6,:) = [2.0_rk, 0.0_rk, 2.0_rk]
    Xc(7,:) = [0.0_rk, 2.0_rk, 2.0_rk]
    Xc(8,:) = [2.0_rk, 2.0_rk, 2.0_rk]

    call shape%set(&
        knot1=[0.0_rk, 0.0_rk, 1.0_rk, 1.0_rk],&
        knot2=[0.0_rk, 0.0_rk, 1.0_rk, 1.0_rk],&
        knot3=[0.0_rk, 0.0_rk, 1.0_rk, 1.0_rk],&
        Xc=Xc)

    call shape%cmp_volume(volume)
    print*, volume
end program