Skip to content

tok_from_pwd.m

Basic Information

 PURPOSE: determines "tokamak" from your "present working directory" pwd
          sets global variable TOKAMAK
          runs startup_"tok".m routine for particular machine

 SYNTAX:
          tokamak= tok_from_pwd;
                   tok_from_pwd
          tokamak= tok_from_pwd(tokamak);  if you know tokamak to work on
          tokamak= tok_from_pwd([]);       return tokamak but no run of startup
 INPUT:
          tokamak= OPTIONAL name of tokamak is known [default= looks in pwd]

 OUTPUT:
          tokamak= tokamak name based on search of pwd
          runs appropriate startup routine as long as tokamak not empty

 EXAMPLE:
          pwd= '/home/leuer/tokamaks/d3d/d3d_sim'
          tokamak= tok_from_pwd;
  ==>     tokamak= 'd3d'; TOKAMAK= 'd3d'; Routine runs: ...startup_d3d.m

Dependencies