Contains the main rotutines for LGRID.
More...
#include <algorithm>
#include <array>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <netcdf.h>
#include <vector>
#include "vertex.hpp"
Go to the source code of this file.
|
const std::string | new_limiter_deg = "new_limiter_deg" |
| Limiter plane keyword specified in degrees. More...
|
|
const std::string | new_limiter_rad = "new_limiter_rad" |
| Limiter plane keyword specified in radians.
|
|
Contains the main rotutines for LGRID.
Definition in file main.cpp.
◆ limiter_type
Keyword token types.
- degrees Limiter defined in degrees.
- radians Limiter defined in radians.
- eof End of file reached.
Definition at line 99 of file main.cpp.
◆ get_next_keyword()
Finds the next keyword.
Reads the input file one file at a time searching for the next keyword until the end of the file is reached.
- Parameters
-
[in,out] | file | Input file stream to seach for next keyword. |
- Returns
- An limiter_type token.
Definition at line 114 of file main.cpp.
◆ main()
int main |
( |
int |
argc, |
|
|
const char * |
argv[] |
|
) |
| |
Main program.
Parses the limter file. Computes distances to the nearest limiter element. Creates the lgrid netcdf file. This program expects 7 arguments in the following order.
- Filename to parse define the limiter.
- Starting radial position to define the radial grid.
- Radial grid spacing.
- Number of radial grid points.
- Starting vertical position to define the vertical grid.
- Vertical grid spacing.
- Number of vertical grid points.
- Parameters
-
[in] | argc | Number of command line arguments. |
[in] | argv | Arrays of argument strings. |
- Returns
- 0 if completed.
Definition at line 220 of file main.cpp.
◆ parse_limiter()
void parse_limiter |
( |
std::ifstream & |
file, |
|
|
std::map< const double, std::vector< vertex * > > & |
limiters, |
|
|
const limiter_type |
type |
|
) |
| |
Parses a limiter specification.
Limiters are defined by the number of phi planes this plasma facing component is asscoiated with. This is followed by a list of each phi. A collection of R, Z values defing the crossection is read until two doubles could not be read or the file ends.
- Parameters
-
[in,out] | file | Input file stream read limiter from. |
[in,out] | limiters | Limiter vertex data. |
[in] | type | Limiter type. |
Definition at line 139 of file main.cpp.
◆ parse_limiter_file()
std::map<const double, std::vector<vertex *> > parse_limiter_file |
( |
const std::string & |
file_name | ) |
|
Parses a limiter specification.
Opens a file, loops through all the keywords and parses the limiter file.
- Parameters
-
[in] | file_name | Limiter type. |
- Returns
- An limiter_type token.
Definition at line 186 of file main.cpp.
◆ new_limiter_deg
const std::string new_limiter_deg = "new_limiter_deg" |
Limiter plane keyword specified in degrees.
- Author
- Mark Cianciosa on 10/12/15.
LGRID is code for generating responce files for any arbitary shaped limiter structure. This creates a grid a distances to the nearest plasma facing component in a specified phi plane.
Definition at line 91 of file main.cpp.