33 USE stel_kinds ,
only : rprec
34 USE stel_constants,
only : pi, zero
51 PRIVATE rprec, pi, zero
58 INTEGER,
PARAMETER :: chord_name_len=30
79 CHARACTER(LEN=chord_name_len) :: chord_name
80 CHARACTER(LEN=1) :: ip_type
81 REAL(rprec) :: wavelength
83 TYPE(vertex),
POINTER :: chordPath => null()
99 SUBROUTINE ipch_desc_construct(this, chord_name, &
100 & xcart_i, xcart_f, &
101 & ip_type, wavelength, &
109 TYPE (ipch_desc),
INTENT(inout) :: this
110 CHARACTER(LEN=chord_name_len),
INTENT(in) :: chord_name
111 REAL(rprec),
DIMENSION(3),
INTENT(in) :: xcart_i
112 REAL(rprec),
DIMENSION(3),
INTENT(in) :: xcart_f
113 CHARACTER(LEN=1),
INTENT(in) :: ip_type
114 REAL(rprec),
INTENT(in) :: wavelength
115 LOGICAL,
INTENT(in) :: inDegrees
122 this % chord_name = chord_name
123 this % ip_type = ip_type
124 this % wavelength = wavelength
125 this % inDegrees = indegrees
133 END SUBROUTINE ipch_desc_construct
144 SUBROUTINE ipch_desc_destroy(this)
146 TYPE (ipch_desc),
INTENT(inout) :: this
148 this % chord_name =
''
150 this % wavelength = zero
154 END SUBROUTINE ipch_desc_destroy
174 SUBROUTINE ipch_desc_write(this,iounit,filename)
183 TYPE (ipch_desc),
INTENT(in) :: this
184 INTEGER,
OPTIONAL,
INTENT(in) :: iounit
185 CHARACTER*300,
OPTIONAL,
INTENT(in) :: filename
191 REAL(rprec),
DIMENSION(3) :: xcart_i
192 REAL(rprec),
DIMENSION(3) :: xcart_f
197 xcart_i = this%chordPath%position
198 xcart_f = this%chordPath%next%position
200 IF (
PRESENT(iounit).AND.
PRESENT(filename))
THEN
202 CALL safe_open(iou,istat,filename,
'replace',
'formatted')
203 WRITE(iou,*)
'chord name - ', this % chord_name
204 WRITE(iou,*)
'start position -', xcart_i
205 WRITE(iou,*)
'end position -', xcart_f
206 WRITE(iou,*)
'ip_type -', this % ip_type
207 WRITE(iou,*)
'wavelength -', this % wavelength
209 WRITE(*,*)
'chord name - ',this % chord_name
210 WRITE(*,*)
'start position -', xcart_i
211 WRITE(*,*)
'end position -', xcart_f
212 WRITE(*,*)
'ip_type -', this % ip_type
213 WRITE(*,*)
'wavelength -', this % wavelength
216 END SUBROUTINE ipch_desc_write