Stellarator-Tools
Loading...
Searching...
No Matches
signal_dot::signal_dot_file Type Reference

Base class representing a diagnostic dot file. This is an opaqe class. More...

Public Member Functions

procedure open (this, file, signal_id)
 Open a diagnostic dot file.
 
procedure close (this)
 Close a diagnostic dot file.
 
procedure parse_chord (signal_dot_file_ref, coordinate_type, chord_name, xcart_i, xcart_f)
 Parse a chord from a diagnostic dot file.
 
procedure parse_real (this, message)
 Parse a single real from a diagnostic dot file.
 
procedure parse_2_real (this, message)
 Parse a two reals from a diagnostic dot file.
 
procedure parse_3_real (this, message)
 Parse a three reals from a diagnostic dot file.
 
procedure parse_int (this, message)
 Parse a single integer from a diagnostic dot file.
 
procedure parse_2_int (this, message)
 Parse two integers from a diagnostic dot file.
 
procedure read_keyword (this, keywords)
 Read a keyword from the diagnostic dot file.
 
procedure read_line (this, pre_message, post_message)
 Read line from diagnostic dot file.
 
procedure check_status (this, status, pre_message, post_message)
 Check and handle errors.
 

Public Attributes

integer i_line
 Current line being parsed.
 
character(len=6) signal_id
 Identify specifying the signal being parsed.
 

Detailed Description

Base class representing a diagnostic dot file. This is an opaqe class.

Member Function/Subroutine Documentation

◆ check_status()

procedure signal_dot::signal_dot_file::check_status ( class (signal_dot_file), intent(inout)  this,
integer, intent(in)  status,
character (len=*), intent(in)  pre_message,
character (len=*), intent(in)  post_message 
)

Check and handle errors.

Checks the staus for an error condition. If there was a error, report it. Error messages are formatted as:

pre_message signal_dot_file::signal_id post message signal_dot_file::i_line

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]statusThe error code to check.
[in]pre_messagePrefix message incase of error.
[in]post_messagePost message incase of error.

◆ close()

procedure signal_dot::signal_dot_file::close ( class (signal_dot_file), intent(in)  this)

Close a diagnostic dot file.

Closes a diagnostic dot file.

Parameters
[in]thisAn instance of a signal_dot_file object.

◆ open()

procedure signal_dot::signal_dot_file::open ( class (signal_dot_file), intent(inout)  this,
character (len=*), intent(in)  file,
character (len=*), intent(in)  signal_id 
)

Open a diagnostic dot file.

Opens a diagnostic dot file for reading.

Parameters
[input]this A signal_dot_file instance.
[in]fileFilename of the diagnostic dot file.
[in]signal_idDescription of the diagnostic dot file.

◆ parse_2_int()

procedure signal_dot::signal_dot_file::parse_2_int ( class (signal_dot_file), intent(inout)  this,
character (len=*), intent(in)  message 
)

Parse two integers from a diagnostic dot file.

Reads two integers from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]messageError message to report back if there was a problem.
Returns
The parsed real value.

◆ parse_2_real()

procedure signal_dot::signal_dot_file::parse_2_real ( class (signal_dot_file), intent(inout)  this,
character (len=*), intent(in)  message 
)

Parse a two reals from a diagnostic dot file.

Reads three reals from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]messageError message to report back if there was a problem.
Returns
The parsed real values.

◆ parse_3_real()

procedure signal_dot::signal_dot_file::parse_3_real ( class (signal_dot_file), intent(inout)  this,
character (len=*), intent(in)  message 
)

Parse a three reals from a diagnostic dot file.

Reads three reals from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]messageError message to report back if there was a problem.
Returns
The parsed real values.

◆ parse_chord()

procedure signal_dot::signal_dot_file::parse_chord ( class (signal_dot_file), intent(inout)  signal_dot_file_ref,
character (len=*), intent(in)  coordinate_type,
character (len=data_short_name_length), intent(out)  chord_name,
real(rprec), dimension(3), intent(out)  xcart_i,
real(rprec), dimension(3), intent(out), optional  xcart_f 
)

Parse a chord from a diagnostic dot file.

Chords start with the first line as the chord name. The it is followed by one or two lines of 3 coordinates. All coodinates for the cord are returned in carteasian coordinates.

Parameters
[in,out]signal_dot_file_refAn instance of a signal_dot_file object.
[in]coordinate_typeSpecifies if the coordinate is cartesian or cylindrical.
[out]chord_nameThe name of the chord.
[out]xcart_iThe initial position of the chord in cartesian coordinates.
[out]xcart_fThe final position of the chord in cartesian coordinates.

◆ parse_int()

procedure signal_dot::signal_dot_file::parse_int ( class (signal_dot_file), intent(inout)  this,
character (len=*), intent(in)  message 
)

Parse a single integer from a diagnostic dot file.

Reads a single integer from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]messageError message to report back if there was a problem.
Returns
The parsed integer value.

◆ parse_real()

procedure signal_dot::signal_dot_file::parse_real ( class (signal_dot_file), intent(inout)  this,
character (len=*), intent(in)  message 
)

Parse a single real from a diagnostic dot file.

Reads a single real from the diagnostic dot file. This is used to be able to get extra information about a diagnostic in the diagnostic dot file.

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]messageError message to report back if there was a problem.
Returns
The parsed real value.

◆ read_keyword()

procedure signal_dot::signal_dot_file::read_keyword ( class (signal_dot_file), intent(inout)  this,
character (len=*), dimension(:), intent(in)  keywords 
)

Read a keyword from the diagnostic dot file.

Read lines until a valid keyword is reached ot the end of the file is reached.

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]keywordsList of keywords to search for.
Returns
The found keyword.

◆ read_line()

procedure signal_dot::signal_dot_file::read_line ( class (signal_dot_file), intent(inout)  this,
character (len=*), intent(in)  pre_message,
character (len=*), intent(in)  post_message 
)

Read line from diagnostic dot file.

Reads single line from the diagnostic dot file.

Parameters
[in,out]thisAn instance of a signal_dot_file object.
[in]pre_messagePrefix message incase of error.
[in]post_messagePost message incase of error.
Returns
The line that was read.

The documentation for this type was generated from the following file: