V3FIT
pprofile_T.f
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! The @header, @table_section, @table_subsection, @item and @end_table commands
3 ! are custom defined commands in Doxygen.in. They are defined under ALIASES.
4 ! For the page created here, the 80 column limit is exceeded. Arguments of
5 ! aliases are separated by ','. If you intended ',' to be a string you must use
6 ! an escaped comma '\,'.
7 !
78 !*******************************************************************************
81 !
82 ! Note separating the Doxygen comment block here so detailed decription is
83 ! found in the Module not the file.
84 !
87 !*******************************************************************************
88  MODULE pprofile_t
89  USE stel_kinds
90  USE stel_constants
91  USE v3_utilities
92  USE mpi_inc
93  USE profiler
94 
95  IMPLICIT NONE
96 
97 !*******************************************************************************
98 ! model module parameters
99 !*******************************************************************************
101  INTEGER, PARAMETER, PUBLIC :: p_type_len=20
102 
104  INTEGER, PARAMETER, PUBLIC :: ilb_b = 0
106  INTEGER, PARAMETER, PUBLIC :: iub_b = 21
108  INTEGER, PARAMETER, PUBLIC :: iub_asf = 101
109 
111  INTEGER, PARAMETER, PRIVATE :: pprofile_none_type = -1
113  INTEGER, PARAMETER, PRIVATE :: pprofile_two_power_type = 0
115  INTEGER, PARAMETER, PRIVATE :: pprofile_two_power_gs_type = 1
117  INTEGER, PARAMETER, PRIVATE :: pprofile_power_series_type = 2
119  INTEGER, PARAMETER, PRIVATE :: pprofile_cubic_spline_type = 3
121  INTEGER, PARAMETER, PRIVATE :: pprofile_akima_spline_type = 4
123  INTEGER, PARAMETER, PRIVATE :: pprofile_line_segment_type = 5
125  INTEGER, PARAMETER, PRIVATE :: pprofile_two_power_r_type = 6
127  INTEGER, PARAMETER, PRIVATE :: pprofile_gp_1d_sexp_type = 7
129  INTEGER, PARAMETER, PRIVATE :: pprofile_gp_1d_ln_sexp_type = 8
130 
131 !*******************************************************************************
132 ! DERIVED-TYPE DECLARATIONS
133 ! 1) model class
134 !
135 !*******************************************************************************
136 !-------------------------------------------------------------------------------
138 !-------------------------------------------------------------------------------
141  INTEGER :: p_type = pprofile_none_type
143  REAL (rprec), DIMENSION(ilb_b:iub_b) :: b = 0.0
145  REAL (rprec), DIMENSION(:), POINTER :: as => null()
147  REAL (rprec), DIMENSION(:), POINTER :: af => null()
149  INTEGER :: maxsplineindex = 1
150 
152  REAL (rprec), DIMENSION(:), POINTER :: cache => null()
154  REAL (rprec), DIMENSION(:), POINTER :: cache_hyper => null()
155  END TYPE
156 
157 !-------------------------------------------------------------------------------
160 !-------------------------------------------------------------------------------
162  TYPE (pprofile_class), POINTER :: p => null()
163  END TYPE
164 
165 !*******************************************************************************
166 ! SECTION III. INTERFACE BLOCKS
167 !*******************************************************************************
168 !-------------------------------------------------------------------------------
170 !-------------------------------------------------------------------------------
171  INTERFACE pprofile_get_gp
172  MODULE PROCEDURE pprofile_get_gp_ij, &
173  & pprofile_get_gp_pi, &
175  END INTERFACE
176 
177  PRIVATE findmaxindex
178 
179  CONTAINS
180 !*******************************************************************************
181 ! CONSTRUCTION SUBROUTINES
182 !*******************************************************************************
183 !-------------------------------------------------------------------------------
193 !-------------------------------------------------------------------------------
194  FUNCTION pprofile_construct(p_type, b, as, af)
195 
196  IMPLICIT NONE
197 
198 ! Declare Arguments
199  TYPE (pprofile_class), POINTER :: pprofile_construct
200  CHARACTER (len=*), INTENT(in) :: p_type
201  REAL(rprec), DIMENSION(:), INTENT(in) :: b
202  REAL(rprec), DIMENSION(:), INTENT(in) :: as
203  REAL(rprec), DIMENSION(:), INTENT(in) :: af
204 
205 ! local variables
206  CHARACTER (len=p_type_len) :: p_type_lc
207  REAL (rprec) :: start_time
208 
209 ! Start of executable code
210  start_time = profiler_get_start_time()
211 
212  ALLOCATE(pprofile_construct)
213 
214 ! Store profile coeffients.
215  pprofile_construct%b = b
216 
217 ! Find and store the maximum s index if specifying splines.
218  pprofile_construct%maxSplineIndex = findmaxindex(as)
219  ALLOCATE(pprofile_construct%as(pprofile_construct%maxSplineIndex))
220  pprofile_construct%as = as(1:pprofile_construct%maxSplineIndex)
221 
222  ALLOCATE(pprofile_construct%af(pprofile_construct%maxSplineIndex))
223  pprofile_construct%af = af(1:pprofile_construct%maxSplineIndex)
224 
225 ! Convert the type to lower case, and truncate
226  p_type_lc = p_type
227  CALL tolower(p_type_lc)
228  SELECT CASE(trim(p_type_lc))
229 
230  CASE ('two_power')
232 
233  CASE ('two_power_gs')
235 
236  CASE ('two_power_r')
238 
239  CASE ('power_series')
241 
242  CASE ('cubic_spline')
243  IF (pprofile_construct%maxSplineIndex .lt. 4) THEN
244  WRITE(*,*) 'pprofile:cubic spline: too few as values'
245  WRITE(*,*) 'maxSplineIndex, as = ', &
246  & pprofile_construct%maxSplineIndex
247  WRITE(*,*) pprofile_construct%as
248  CALL exit(1)
249  END IF
251 
252  CASE ('akima_spline')
253  IF (pprofile_construct%maxSplineIndex .lt. 4) THEN
254  WRITE(*,*) 'pprofile:akima spline: too few as values'
255  WRITE(*,*) 'maxSplineIndex, as = ', &
256  & pprofile_construct%maxSplineIndex
257  WRITE(*,*) pprofile_construct%as
258  CALL exit(1)
259  END IF
261 
262  CASE ('line_segment')
264 
265  CASE ('sq_exp_1d')
267  ALLOCATE(pprofile_construct%cache( &
268  & SIZE(pprofile_construct%af)))
269  ALLOCATE(pprofile_construct%cache_hyper(2))
270 
271  CASE ('sq_exp_1d_ln')
273  ALLOCATE(pprofile_construct%cache( &
274  & SIZE(pprofile_construct%af)))
275  ALLOCATE(pprofile_construct%cache_hyper(2))
276 
277  CASE ('none')
279 
280  CASE DEFAULT
282  WRITE(*,*) 'Unrecognized p_type:', p_type_lc
283  WRITE(*,*) ' *** CHECK YOUR INPUT ***'
284 
285  END SELECT
286 
287  CALL profiler_set_stop_time('pprofile_construct', start_time)
288 
289  END FUNCTION
290 
291 !*******************************************************************************
292 ! DESTRUCTION SUBROUTINES
293 !*******************************************************************************
294 !-------------------------------------------------------------------------------
300 !-------------------------------------------------------------------------------
301  SUBROUTINE pprofile_destruct(this)
302 
303  IMPLICIT NONE
304 
305 ! Declare Arguments
306  TYPE (pprofile_class), POINTER :: this
307 
308 ! Start of executable code
309  IF (ASSOCIATED(this%as)) THEN
310  DEALLOCATE(this%as)
311  this%as => null()
312  END IF
313 
314  IF (ASSOCIATED(this%af)) THEN
315  DEALLOCATE(this%af)
316  this%af => null()
317  END IF
318 
319  IF (ASSOCIATED(this%cache)) THEN
320  DEALLOCATE(this%cache)
321  this%cache => null()
322  END IF
323 
324  IF (ASSOCIATED(this%cache_hyper)) THEN
325  DEALLOCATE(this%cache_hyper)
326  this%cache_hyper => null()
327  END IF
328 
329  DEALLOCATE(this)
330 
331  END SUBROUTINE
332 
333 !*******************************************************************************
334 ! GETTER SUBROUTINES
335 !*******************************************************************************
336 !-------------------------------------------------------------------------------
348 !-------------------------------------------------------------------------------
349  FUNCTION pprofile_get_value(this, s_arg)
351  USE functions
352 
353  IMPLICIT NONE
354 
355 ! Declare Arguments
356  REAL (rprec) :: pprofile_get_value
357  TYPE (pprofile_class), INTENT (in) :: this
358  REAL (rprec), INTENT(in) :: s_arg
359 
360 ! local variables
361  REAL (rprec) :: s_use
362  REAL (rprec) :: s_01
363  LOGICAL :: l_01
364  INTEGER :: i
365  INTEGER :: iflag
366  REAL (rprec) :: start_time
367 
368 ! Start of executable code
369  start_time = profiler_get_start_time()
370 
371 ! Define argument and logical variable for s between zero and one
372  s_01 = max(zero, min(one,s_arg))
373  l_01 = (s_arg .ge. zero) .and. (s_arg .le. one)
374 
375  SELECT CASE(this%p_type)
376 
377  CASE (pprofile_none_type)
378  pprofile_get_value = -1.e49_rprec
379 
380 ! v3fit uses an extra varible as an offset than vmec as a result the b array is
381 ! one index shorter than what two_power takes.
383  pprofile_get_value = this%b(0)
384  IF (l_01) THEN
386  & + two_power(s_arg, this%b(1:iub_b))
387  END IF
388 
389 ! v3fit uses an extra varible as an offset than vmec as a result the b array is
390 ! one index shorter than what two_power takes. This profile reverses the s
391 ! argument so that the maximum amplitude is at s=1 and the minimum is at s = 0.
393  pprofile_get_value = this%b(0)
394  IF (l_01) THEN
395  s_use = 1.0 - s_arg
397  & + two_power(s_use, this%b(1:iub_b))
398  END IF
399 
400 ! v3fit uses an extra varible as an offset than vmec as a result the b array is
401 ! one index shorter than what two_power_gs takes. As a result only 5 guassian
402 ! peaks maybe specified instead of the 6 vmec can use.
404  pprofile_get_value = this%b(0)
405  IF (l_01) THEN
407  & + two_power_gs(s_arg, &
408  & this%b(1:iub_b))
409  END IF
410 
412  pprofile_get_value = zero
413  DO i = iub_b, ilb_b, -1 ! all of b array, backwards
415  & + this%b(i)
416  END DO
417 
419  s_use = min(this%as(this%maxSplineIndex), &
420  & max(s_arg, this%as(1)))
421  CALL spline_cubic(s_use, pprofile_get_value, &
422  & this%as, this%af, &
423  & this%maxSplineIndex, iflag)
424  IF (iflag .ge. 0) THEN
425 
426  CALL profiler_set_stop_time('pprofile_get_value', &
427  & start_time)
428 
429  RETURN
430  ELSE IF (iflag .eq. -1) THEN
431  WRITE (*,*) 'ERROR: pprofile: outside value from ' // &
432  & 'spline_cubic'
433  ELSE IF(iflag .eq. -2) THEN
434  WRITE (*,*) 'ERROR: pprofile: decreasing s values ' // &
435  & 'in spline_cubic'
436  ELSE
437  WRITE (*,*) 'ERROR: pprofile: unknown error from ' // &
438  & 'spline_cubic'
439  END IF
440 ! Splines shuld not reach this point without triggering an error.
441  CALL exit(1)
442 
444  s_use = min(this%as(this%maxSplineIndex), &
445  & max(s_arg,this%as(1)))
446  CALL spline_akima(s_use, pprofile_get_value, &
447  & this%as, this%af, &
448  & this%maxSplineIndex, iflag)
449  IF (iflag < 0) THEN
450  WRITE (*,*) 'ERROR: pprofile: bad value from ' // &
451  & 'spline_akima requested'
452  CALL exit(1)
453  END IF
454 
458  CALL line_seg(s_arg, pprofile_get_value, this%as, this%af, &
459  & this%maxSplineIndex)
460 
461  END SELECT
462 
463  CALL profiler_set_stop_time('pprofile_get_value', start_time)
464 
465  END FUNCTION
466 
467 !-------------------------------------------------------------------------------
474 !-------------------------------------------------------------------------------
475  FUNCTION pprofile_get_p_type_name(this)
476 
477 ! Declare Arguments
478  CHARACTER (len=p_type_len) :: pprofile_get_p_type_name
479  TYPE (pprofile_class), INTENT(in) :: this
480 
481 ! local variables
482  REAL (rprec) :: start_time
483 
484 ! Start of executable code
485  start_time = profiler_get_start_time()
486 
487  SELECT CASE (this%p_type)
488 
490  pprofile_get_p_type_name = 'two_power'
491 
493  pprofile_get_p_type_name = 'two_power_gs'
494 
496  pprofile_get_p_type_name = 'two_power_r'
497 
499  pprofile_get_p_type_name = 'power_series'
500 
502  pprofile_get_p_type_name = 'cubic_spline'
503 
505  pprofile_get_p_type_name = 'akima_spline'
506 
508  pprofile_get_p_type_name = 'line_segment'
509 
511  pprofile_get_p_type_name = 'sq_exp_1d'
512 
514  pprofile_get_p_type_name = 'sq_exp_1d_ln'
515 
516  CASE DEFAULT
517  pprofile_get_p_type_name = 'none'
518 
519  END SELECT
520 
521  CALL profiler_set_stop_time('pprofile_get_p_type_name', &
522  & start_time)
523 
524  END FUNCTION
525 
526 !-------------------------------------------------------------------------------
536 !-------------------------------------------------------------------------------
537  FUNCTION pprofile_get_gp_ij(this, i, j)
538 
539  IMPLICIT NONE
540 
541 ! Declare Arguments
542  REAL (rprec) :: pprofile_get_gp_ij
543  TYPE (pprofile_class), INTENT (in) :: this
544  INTEGER, INTENT(in) :: i
545  INTEGER, INTENT(in) :: j
546 
547 ! local variables
548  REAL (rprec) :: start_time
549 
550 ! Start of executable code
551  start_time = profiler_get_start_time()
552 
553  SELECT CASE(this%p_type)
554 
557  & this%as(i), &
558  & this%as(j))
559 
562  & this%as(i), &
563  & this%as(j))
564 
565  CASE DEFAULT
566  pprofile_get_gp_ij = 0.0
567 
568  END SELECT
569 
570  CALL profiler_set_stop_time('pprofile_get_gp_ij', start_time)
571 
572  END FUNCTION
573 
574 !-------------------------------------------------------------------------------
584 !-------------------------------------------------------------------------------
585  FUNCTION pprofile_get_gp_pi(this, p, i)
586 
587  IMPLICIT NONE
588 
589 ! Declare Arguments
590  REAL (rprec) :: pprofile_get_gp_pi
591  TYPE (pprofile_class), INTENT (in) :: this
592  REAL (rprec), INTENT(in) :: p
593  INTEGER, INTENT(in) :: i
594 
595 ! local variables
596  REAL (rprec) :: start_time
597 
598 ! Start of executable code
599  start_time = profiler_get_start_time()
600 
601  SELECT CASE(this%p_type)
602 
605  & this%as(i))
606 
609  & this%as(i))
610 
611  CASE DEFAULT
612  pprofile_get_gp_pi = 0.0
613 
614  END SELECT
615 
616  CALL profiler_set_stop_time('pprofile_get_gp_pi', start_time)
617 
618  END FUNCTION
619 
620 !-------------------------------------------------------------------------------
630 !-------------------------------------------------------------------------------
631  FUNCTION pprofile_get_gp_pp(this, p1, p2)
632 
633  IMPLICIT NONE
634 
635 ! Declare Arguments
636  REAL (rprec) :: pprofile_get_gp_pp
637  TYPE (pprofile_class), INTENT (in) :: this
638  REAL (rprec), INTENT(in) :: p1
639  REAL (rprec), INTENT(in) :: p2
640 
641 ! local variables
642  REAL (rprec) :: start_time
643 
644 ! Start of executable code
645  start_time = profiler_get_start_time()
646 
647  SELECT CASE(this%p_type)
648 
651 
654 
655  CASE DEFAULT
656  pprofile_get_gp_pp = 0.0
657 
658  END SELECT
659 
660  CALL profiler_set_stop_time('pprofile_get_gp_pp', start_time)
661 
662  END FUNCTION
663 
664 !-------------------------------------------------------------------------------
672 !-------------------------------------------------------------------------------
673  FUNCTION pprofile_get_gp_num_hyper_param(this)
674 
675  IMPLICIT NONE
676 
677 ! Declare Arguments
679  TYPE (pprofile_class), INTENT (in) :: this
680 
681 ! local variables
682  REAL (rprec) :: start_time
683 
684 ! Start of executable code
685  start_time = profiler_get_start_time()
686 
687  SELECT CASE(this%p_type)
688 
691 
692  CASE DEFAULT
694 
695  END SELECT
696 
697  CALL profiler_set_stop_time('pprofile_get_gp_num_hyper_param', &
698  & start_time)
699 
700  END FUNCTION
701 
702 !*******************************************************************************
703 ! UTILITY SUBROUTINES
704 !*******************************************************************************
705 !-------------------------------------------------------------------------------
713 !-------------------------------------------------------------------------------
714  SUBROUTINE pprofile_write(this, id, iou)
715  IMPLICIT NONE
716 
717 ! Declare Arguments
718  TYPE (pprofile_class), INTENT(in) :: this
719  CHARACTER (len=*), INTENT(in) :: id
720  INTEGER, INTENT(in) :: iou
721 
722 ! local variables
723  INTEGER :: i
724  REAL (rprec) :: start_time
725 
726 ! Start of executable code
727  start_time = profiler_get_start_time()
728 
729 ! Actual write. Could do a select-case on p_type.
730  WRITE(iou,1100) id
731  WRITE(iou,1200) trim(pprofile_get_p_type_name(this))
732 
733  SELECT CASE(this%p_type)
734 
735  CASE (pprofile_two_power_type, &
737  WRITE(iou,1210)
738  WRITE(iou,1300) this%b(0:3)
739 
742  WRITE(iou,1220)
743  WRITE(iou,1300) this%b(ilb_b:iub_b)
744 
748  WRITE(iou,1230)
749  WRITE(iou,1231) (i, this%as(i), this%af(i), &
750  & i = 1, this%maxSplineIndex)
751 
752  CASE (pprofile_gp_1d_sexp_type, &
754  WRITE(iou,1300) this%b(0:1)
755  WRITE(iou,1231) (i, this%as(i), this%af(i), &
756  & i = 1, this%maxSplineIndex)
757 
758  END SELECT
759 
760  CALL profiler_set_stop_time('pprofile_write', start_time)
761 
762 1100 FORMAT(/' Parameterized Profile Write: id = ',a)
763 1200 FORMAT(' pp_type = ',a)
764 1210 FORMAT(' b_0 + Th(s)Th(1-s)(b_1 (1 - s ** b_2) ** b_3).', &
765  & ' b(0:3) = ')
766 1220 FORMAT(' Th(s)Th(1-s)[Sum_0_n b_i s** i]. b(0:n) = ')
767 1230 FORMAT(' i as(i) af(i)')
768 1231 FORMAT(1x,i3,2x,es15.8,2x,es15.8)
769 1300 FORMAT(4(2x,es15.8))
770 
771  END SUBROUTINE
772 
773 !-------------------------------------------------------------------------------
779 !-------------------------------------------------------------------------------
780  SUBROUTINE pprofile_save_state(this)
781 
782  IMPLICIT NONE
783 
784 ! Declare Arguments
785  TYPE (pprofile_class), INTENT(inout) :: this
786 
787 ! local variables
788  REAL (rprec) :: start_time
789 
790 ! Start of executable code
791  start_time = profiler_get_start_time()
792 
793  SELECT CASE (this%p_type)
794 
795  CASE (pprofile_gp_1d_sexp_type, &
797  this%cache = this%af
798  this%cache_hyper = this%b(0:1)
799 
800  END SELECT
801 
802  CALL profiler_set_stop_time('pprofile_save_state', start_time)
803 
804  END SUBROUTINE
805 
806 !-------------------------------------------------------------------------------
812 !-------------------------------------------------------------------------------
813  SUBROUTINE pprofile_reset_state(this)
814 
815  IMPLICIT NONE
816 
817 ! Declare Arguments
818  TYPE (pprofile_class), INTENT(inout) :: this
819 
820 ! local variables
821  REAL (rprec) :: start_time
822 
823 ! Start of executable code
824  start_time = profiler_get_start_time()
825 
826  SELECT CASE (this%p_type)
827 
828  CASE (pprofile_gp_1d_sexp_type, &
830  this%af = this%cache
831  this%b(0:1) = this%cache_hyper
832 
833  END SELECT
834 
835  CALL profiler_set_stop_time('pprofile_reset_state', start_time)
836 
837  END SUBROUTINE
838 
839 !*******************************************************************************
840 ! PRIVATE
841 !*******************************************************************************
842 !-------------------------------------------------------------------------------
849 !-------------------------------------------------------------------------------
850  FUNCTION findmaxindex(s_array)
851 
852  IMPLICIT NONE
853 
854 ! Declare Arguments
855  INTEGER :: findmaxindex
856  REAL(rprec), DIMENSION(:), INTENT(in) :: s_array
857 
858 ! local variables
859  REAL (rprec) :: start_time
860 
861 ! Start of executable code
862  start_time = profiler_get_start_time()
863 
864  findmaxindex = maxloc(s_array, dim=1)
865 
866  CALL profiler_set_stop_time('findMaxIndex', start_time)
867 
868  END FUNCTION
869 
870 !-------------------------------------------------------------------------------
883 !-------------------------------------------------------------------------------
884  PURE FUNCTION pprofile_gp_1d_sqexp_k(this, p1, p2)
885 
886  IMPLICIT NONE
887 
888 ! Declare Arguments
889  REAL (rprec) :: pprofile_gp_1d_sqexp_k
890  TYPE (pprofile_class), INTENT(in) :: this
891  REAL (rprec), INTENT(in) :: p1
892  REAL (rprec), INTENT(in) :: p2
893 
894 ! Start of executable code
896  & this%b(0)**2*exp(-(p1 - p2)**2/(2.0*this%b(1)**2))
897 
898  END FUNCTION
899 
900 !-------------------------------------------------------------------------------
915 !-------------------------------------------------------------------------------
916  PURE FUNCTION pprofile_gp_1d_sqexp_ln_k(this, p1, p2)
917 
918  IMPLICIT NONE
919 
920 ! Declare Arguments
921  REAL (rprec) :: pprofile_gp_1d_sqexp_ln_k
922  TYPE (pprofile_class), INTENT(in) :: this
923  REAL (rprec), INTENT(in) :: p1
924  REAL (rprec), INTENT(in) :: p2
925 
926 ! Start of executable code
928  & exp(2.0*this%b(0) - (p1 - p2)**2/(2.0*this%b(1)**2))
929 
930  END FUNCTION
931 
932  END MODULE
pprofile_t::p_type_len
integer, parameter, public p_type_len
Maximum size for parameter profile name lengths.
Definition: pprofile_T.f:101
pprofile_t::pprofile_class
Base class representing a parameterized profile.
Definition: pprofile_T.f:139
pprofile_t::iub_b
integer, parameter, public iub_b
Upper array bound for function profiles.
Definition: pprofile_T.f:106
pprofile_t::pprofile_get_gp_num_hyper_param
integer function pprofile_get_gp_num_hyper_param(this)
Get the number of hyper parameters for guassian process kernel.
Definition: pprofile_T.f:674
profiler
Defines functions for measuring an tabulating performance of function and subroutine calls....
Definition: profiler.f:13
pprofile_t::pprofile_get_p_type_name
character(len=p_type_len) function pprofile_get_p_type_name(this)
Gets the name of the profile type.
Definition: pprofile_T.f:476
pprofile_t::ilb_b
integer, parameter, public ilb_b
Lower array bound for function profiles.
Definition: pprofile_T.f:104
pprofile_t::pprofile_pointer
Pointer to a pprofile object. Used for creating arrays of pprofile pointers. This is needed because f...
Definition: pprofile_T.f:161
pprofile_t::pprofile_get_value
real(rprec) function pprofile_get_value(this, s_arg)
Gets the value of a profile at a radial position.
Definition: pprofile_T.f:350
pprofile_t::pprofile_two_power_gs_type
integer, parameter, private pprofile_two_power_gs_type
Two Power with guassian profile type.
Definition: pprofile_T.f:115
pprofile_t::iub_asf
integer, parameter, public iub_asf
Array size for spline profiles.
Definition: pprofile_T.f:108
mpi_inc
Umbrella module avoid multiple inlcudes of the mpif.h header.
Definition: mpi_inc.f:11
pprofile_t::pprofile_power_series_type
integer, parameter, private pprofile_power_series_type
Power Series profile type.
Definition: pprofile_T.f:117
pprofile_t::pprofile_cubic_spline_type
integer, parameter, private pprofile_cubic_spline_type
Cubic Spline profile type.
Definition: pprofile_T.f:119
pprofile_t::findmaxindex
integer function, private findmaxindex(s_array)
Finds the index of the maximum radial position.
Definition: pprofile_T.f:851
pprofile_t::pprofile_gp_1d_ln_sexp_type
integer, parameter, private pprofile_gp_1d_ln_sexp_type
Guassian process profile 1D square exponetal with the ln of sigma x type.
Definition: pprofile_T.f:129
profiler::profiler_get_start_time
real(rprec) function profiler_get_start_time()
Gets the start time of profiled function.
Definition: profiler.f:194
pprofile_t::pprofile_gp_1d_sqexp_k
pure real(rprec) function pprofile_gp_1d_sqexp_k(this, p1, p2)
Evaluate the one dimensional squared exponential kernel.
Definition: pprofile_T.f:885
pprofile_t::pprofile_save_state
subroutine pprofile_save_state(this)
Save the internal state of the profile.
Definition: pprofile_T.f:781
pprofile_t::pprofile_get_gp
Interface for the guassian process kernel values.
Definition: pprofile_T.f:171
pprofile_t::pprofile_write
subroutine pprofile_write(this, id, iou)
Write out the profile to an output file.
Definition: pprofile_T.f:715
pprofile_t::pprofile_gp_1d_sqexp_ln_k
pure real(rprec) function pprofile_gp_1d_sqexp_ln_k(this, p1, p2)
Evaluate the one dimensional squared exponential kernel.
Definition: pprofile_T.f:917
pprofile_t::pprofile_two_power_r_type
integer, parameter, private pprofile_two_power_r_type
Reverse Two Power profile type.
Definition: pprofile_T.f:125
pprofile_t::pprofile_akima_spline_type
integer, parameter, private pprofile_akima_spline_type
Akima Spline profile type.
Definition: pprofile_T.f:121
pprofile_t::pprofile_construct
type(pprofile_class) function, pointer pprofile_construct(p_type, b, as, af)
Construct a pprofile_class.
Definition: pprofile_T.f:195
line_segment
Module is part of the LIBSTELL. This module contains code to create a profile constructed of line sig...
Definition: line_segment.f:13
pprofile_t::pprofile_none_type
integer, parameter, private pprofile_none_type
No profile type.
Definition: pprofile_T.f:111
pprofile_t::pprofile_reset_state
subroutine pprofile_reset_state(this)
Reset the internal state of the profile.
Definition: pprofile_T.f:814
pprofile_t::pprofile_get_gp_pi
real(rprec) function pprofile_get_gp_pi(this, p, i)
Get the guassian process kernel value for the point and index.
Definition: pprofile_T.f:586
pprofile_t::pprofile_destruct
subroutine pprofile_destruct(this)
Deconstruct a pprofile_class object.
Definition: pprofile_T.f:302
pprofile_t::pprofile_get_gp_pp
real(rprec) function pprofile_get_gp_pp(this, p1, p2)
Get the guassian process kernel value for two points.
Definition: pprofile_T.f:632
functions
This module containes functions used by the profiles.
Definition: functions.f:10
profiler::profiler_set_stop_time
subroutine profiler_set_stop_time(symbol_name, start_time)
Gets the end time of profiled function.
Definition: profiler.f:121
line_segment::line_seg
subroutine, public line_seg(x, y, xx, yy, n)
Interpolate a point on a line.
Definition: line_segment.f:41
pprofile_t
Defines the base class of the type pprofile_class. This module contains all the code necessary to def...
Definition: pprofile_T.f:88
pprofile_t::pprofile_two_power_type
integer, parameter, private pprofile_two_power_type
Two Power profile type.
Definition: pprofile_T.f:113
pprofile_t::pprofile_line_segment_type
integer, parameter, private pprofile_line_segment_type
Line Segment profile type.
Definition: pprofile_T.f:123
pprofile_t::pprofile_gp_1d_sexp_type
integer, parameter, private pprofile_gp_1d_sexp_type
Guassian process profile 1D square exponetal type.
Definition: pprofile_T.f:127
pprofile_t::pprofile_get_gp_ij
real(rprec) function pprofile_get_gp_ij(this, i, j)
Get the guassian process kernel value for the two as indicies.
Definition: pprofile_T.f:538