# tem_canonicalND_type Derived Type

## type, public :: tem_canonicalND_type

Definition of the canonicalND

## Components

TypeVisibility AttributesNameInitial
real(kind=rk), public :: origin(3)

origin of the canonical shape

real(kind=rk), public :: vec(3,3)

vector along the edge A (also defines size) 1st dimension defines x,y, z coord 2nd dimension vec number

integer, public :: segments(3)

how many discrete points the canonicalND is divided into

character(len=labellen), public :: distribution

spatial distribution of the points

character(len=labellen), public :: kind

kind of canonicalND (line, plane, point, box)

logical, public :: active(3)

identify which vectors are active (not equal 0)

integer, public :: nDim

dimension of canonical object nDim=0 - point nDim=1 - line nDim=2 - plane nDim=3 - box

logical, public :: only_surface =.false.

To choose what to do with intersection of box if only_surface = true than the only the surface of the object is intersected if only_surface = false then the whole object is intersected default is set to false

type(tem_point_type), public :: point

canonical point

type(tem_line_type), public :: line
type(tem_plane_type), public :: plane
type(tem_box_type), public :: box

### Source Code

type tem_canonicalND_type

!> origin of the canonical shape
real(kind=rk) :: origin(3)

!> vector along the edge A (also defines size)
!! 1st dimension defines x,y, z coord
!! 2nd dimension vec number
real(kind=rk) :: vec(3,3)

!> how many discrete points the canonicalND is divided into
integer       :: segments(3)

!> spatial distribution of the points
character(len=labellen) :: distribution

!> kind of canonicalND (line, plane, point, box)
character( len=labellen ) :: kind

!> identify which vectors are active (not equal 0)
logical :: active(3)

!> dimension of canonical object
!! nDim=0 - point
!! nDim=1 - line
!! nDim=2 - plane
!! nDim=3 - box
integer :: nDim

!> To choose what to do with intersection of box
!! if only_surface = true than the only the surface of the object
!! is intersected
!! if only_surface = false then the whole object is intersected
!! default is set to false
logical :: only_surface = .false.

!> canonical point
type(tem_point_type) :: point
type(tem_line_type) :: line !< canonical line
type(tem_plane_type) :: plane !< canonical plane
type(tem_box_type) :: box !< canonical box
end type tem_canonicalND_type