34 USE stel_kinds ,
only : rprec
35 USE stel_constants,
only : pi, zero
52 PRIVATE rprec, pi, zero
59 INTEGER,
PARAMETER :: chord_name_len=30
77 CHARACTER(LEN=chord_name_len) :: chord_name
78 TYPE(vertex),
POINTER :: chordPath
94 SUBROUTINE sxrch_desc_construct(this, chord_name, &
102 TYPE (sxrch_desc),
INTENT(inout) :: this
103 CHARACTER(LEN=chord_name_len),
INTENT(in) :: chord_name
104 REAL(rprec),
DIMENSION(3),
INTENT(in) :: xcart_i
105 REAL(rprec),
DIMENSION(3),
INTENT(in) :: xcart_f
112 this % chord_name = chord_name
120 END SUBROUTINE sxrch_desc_construct
131 SUBROUTINE sxrch_desc_destroy(this)
133 TYPE (sxrch_desc),
INTENT(inout) :: this
135 this % chord_name =
''
139 END SUBROUTINE sxrch_desc_destroy
159 SUBROUTINE sxrch_desc_write(this,iounit,filename)
168 TYPE (sxrch_desc),
INTENT(in) :: this
169 INTEGER,
OPTIONAL,
INTENT(in) :: iounit
170 CHARACTER*300,
OPTIONAL,
INTENT(in) :: filename
176 REAL(rprec),
DIMENSION(3) :: xcart_i
177 REAL(rprec),
DIMENSION(3) :: xcart_f
182 xcart_i = this%chordPath%position
183 xcart_f = this%chordPath%next%position
185 IF (
PRESENT(iounit).AND.
PRESENT(filename))
THEN
187 CALL safe_open(iou,istat,filename,
'replace',
'formatted')
188 WRITE(iou,*)
'chord name - ', this % chord_name
189 WRITE(iou,*)
'start position -', xcart_i
190 WRITE(iou,*)
'end position -', xcart_f
192 WRITE(*,*)
'chord name - ',this % chord_name
193 WRITE(*,*)
'start position -', xcart_i
194 WRITE(*,*)
'end position -', xcart_f
197 END SUBROUTINE sxrch_desc_write