Stellarator-Tools
Loading...
Searching...
No Matches
pprofile_t::pprofile_class Interface Reference

Base class representing a parameterized profile. More...

Public Member Functions

procedure get_value (this, s_arg)
 Gets the value of a profile at a radial position.
 
procedure get_p_type_name (this)
 Gets the name of the profile type.
 
procedure get_gp_ij (this, i, j)
 Get the guassian process kernel value for the two as indicies.
 
procedure get_gp_pi (this, p, i)
 Get the guassian process kernel value for the point and index.
 
procedure get_gp_pp (this, p1, p2)
 Get the guassian process kernel value for two points.
 
GENERIC get_gp get_gp_ij, get_gp_pi, get_gp_pp
 
procedure get_gp_num_hyper_param (this)
 Get the number of hyper parameters for guassian process kernel.
 
procedure write (this, id, iou)
 Write out the profile to an output file.
 
procedure save_state (this)
 Save the internal state of the profile.
 
procedure reset_state (this)
 Reset the internal state of the profile.
 
FINAL pprofile_destruct (this)
 Deconstruct a pprofile_class object.
 
type(pprofile_class) function, pointer pprofile_construct (p_type, b, as, af)
 Construct a pprofile_class.
 

Public Attributes

integer p_type = pprofile_none_type
 Parameterized profile type.
 
real(rprec), dimension(ilb_b:iub_b) b = 0.0
 Array of coefficients for the functional profiles.
 
real(rprec), dimension(:), pointer as => null()
 Array of radial position values for the segmented profiles.
 
real(rprec), dimension(:), pointer af => null()
 Array of profile values for the segmented profiles.
 
integer maxsplineindex = 1
 Index of the last segemented value.
 
real(rprec), dimension(:), pointer cache => null()
 Cached value of the af array.
 
real(rprec), dimension(:), pointer cache_hyper => null()
 Cached value of the af array.
 

Detailed Description

Base class representing a parameterized profile.

Interface for sxrem ti constructor.

Member Function/Subroutine Documentation

◆ get_gp_ij()

procedure pprofile_t::pprofile_class::get_gp_ij ( class (pprofile_class), intent(in)  this,
integer, intent(in)  i,
integer, intent(in)  j 
)

Get the guassian process kernel value for the two as indicies.

Indicies are the index of the as array. Only valid for guassian process profiles.

Parameters
[in]thisA pprofile_class instance.
[in]iith profile position.
[in]jjth profile position.
Returns
The name of the profile type.

◆ get_gp_num_hyper_param()

procedure pprofile_t::pprofile_class::get_gp_num_hyper_param ( class (pprofile_class), intent(in)  this)

Get the number of hyper parameters for guassian process kernel.

Hyper parameters must be set to maximise the log of the evidence. If this profile is not a guassian process return zero.

Parameters
[in]thisA pprofile_class instance.
Returns
Number of hyper parameters.

◆ get_gp_pi()

procedure pprofile_t::pprofile_class::get_gp_pi ( class (pprofile_class), intent(in)  this,
real (rprec), intent(in)  p,
integer, intent(in)  i 
)

Get the guassian process kernel value for the point and index.

Index are the index of the as array. Point is a measurement point on the profile. Only valid for guassian process profiles.

Parameters
[in]thisA pprofile_class instance.
[in]pPoint to evaluate the kernel at.
[in]iProfile position index.
Returns
The value of the gp kernel function for p and i.

◆ get_gp_pp()

procedure pprofile_t::pprofile_class::get_gp_pp ( class (pprofile_class), intent(in)  this,
real (rprec), intent(in)  p1,
real (rprec), intent(in)  p2 
)

Get the guassian process kernel value for two points.

Points are a measurement point on the profile. Only valid for guassian process profiles.

Parameters
[in]thisA pprofile_class instance.
[in]p1First point to evaluate the kernel at.
[in]p2SEOND point to evaluate the kernel at.
Returns
The value of the gp kernel function for p and i.

◆ get_p_type_name()

procedure pprofile_t::pprofile_class::get_p_type_name ( class (pprofile_class), intent(in)  this)

Gets the name of the profile type.

Convertes a profile type to a string discription.

Parameters
[in]thisA pprofile_class instance.
Returns
The name of the profile type.

◆ get_value()

procedure pprofile_t::pprofile_class::get_value ( class (pprofile_class), intent(in)  this,
real (rprec), intent(in)  s_arg 
)

Gets the value of a profile at a radial position.

Evaluates the profile at the specifed radial position. If the radial position is out side the plasma, it returns the baseline value. If there is no profile type specified return the default value.

Parameters
[in]thisA pprofile_class instance.
[in]s_argRadial position to evaluate the profile at.
Returns
The value of the profile.
Todo:
This function makes vmec specific assumptions of 1 being the maximum radial value.

◆ pprofile_construct()

type (pprofile_class) function, pointer pprofile_t::pprofile_class::pprofile_construct ( character (len=*), intent(in)  p_type,
real(rprec), dimension(:), intent(in)  b,
real(rprec), dimension(:), intent(in)  as,
real(rprec), dimension(:), intent(in)  af 
)

Construct a pprofile_class.

Allocates memory and initializes a pprofile_class.

Parameters
[in]p_typeProfile type discription.
[in]bArray of functional profile coefficients
[in]asArray of segmented radial positions.
[in]afArray of segmented profile values.
Returns
A pointer to a constructed pprofile_class object.

◆ pprofile_destruct()

FINAL pprofile_t::pprofile_class::pprofile_destruct ( type (pprofile_class), intent(inout)  this)
final

Deconstruct a pprofile_class object.

Deallocates memory and uninitializes a pprofile_class object.

Parameters
[in,out]thisA pprofile_class instance.

◆ reset_state()

procedure pprofile_t::pprofile_class::reset_state ( class (pprofile_class), intent(inout)  this)

Reset the internal state of the profile.

Resets the profile af array if using the guassian process.

Parameters
[in,out]thisA pprofile_class instance.

◆ save_state()

procedure pprofile_t::pprofile_class::save_state ( class (pprofile_class), intent(inout)  this)

Save the internal state of the profile.

Saves the profile af array if using the guassian process.

Parameters
[in,out]thisA pprofile_class instance.

◆ write()

procedure pprofile_t::pprofile_class::write ( class (pprofile_class), intent(in)  this,
character (len=*), intent(in)  id,
integer, intent(in)  iou 
)

Write out the profile to an output file.

This formats and writes out information about a parameterized profile.

Parameters
[in]thisA pprofile_class instance.
[in]idIdentification of the profle.
[in]iouInput/output unit of the output file.

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