V3FIT
siesta.f90
1 
2 !*******************************************************************************
5 !
6 ! Note separating the Doxygen comment block here so detailed decription is
7 ! found in the Module not the file.
8 !
23 !*******************************************************************************
24 !*******************************************************************************
25 ! MAIN PROGRAM
26 !*******************************************************************************
27 !-------------------------------------------------------------------------------
31 !-------------------------------------------------------------------------------
32  PROGRAM siesta
33  USE siesta_run
34  USE mpi_inc
35  USE siesta_namelist, ONLY: lrestart
36 
37  IMPLICIT NONE
38 
39 ! Local variables
40  TYPE (siesta_run_class), POINTER :: context => null()
41 
42 ! Local parameters
43 #if defined(MPI_OPT)
44  INTEGER, PARAMETER :: run_comm = mpi_comm_world
45 #else
46  INTEGER, PARAMETER :: run_comm = 0
47 #endif
48 
49 ! Start of executable code.
50 ! Create a context and read the SIESTA namelist input file.
51  context => siesta_run_construct(run_comm, .true.)
52 
53 ! Check the restart flag in from the namelist input. If true, restart from an
54 ! existing restart file. Otherwise initalize from a VMEC file.
55  IF (lrestart) THEN
56  CALL siesta_run_set_restart(context)
57  ELSE
58  CALL siesta_run_set_vmec(context)
59  END IF
60 
61  CALL siesta_run_converge(context)
62  CALL siesta_run_destruct(context, .true., .true.)
63 
64  END PROGRAM siesta
65 
66  ! siesta_run_set_vmec
67  ! -> init_metric_elements(in metrics)
68  ! -> grid_extender(in grid_extension)
69  ! siesta_run_converge
70  ! -> run_pchelms
siesta_namelist::lrestart
logical lrestart
Restart SIESTA from pervious run.
Definition: siesta_namelist.f90:128
mpi_inc
Umbrella module avoid multiple inlcudes of the mpif.h header.
Definition: mpi_inc.f:11
grid_extension
This file contains utilities for extending the vmec grid.
Definition: grid_extension.f90:10
metrics
Module for reading in VMEC input and computing metric elements on the SIESTA (sqrt-flux) radial grid....
Definition: metrics.f90:13
siesta_namelist
This file contains all the variables and maximum sizes of the inputs for a SIESTA namelist input file...
Definition: siesta_namelist.f90:103