Stellarator-Tools
Loading...
Searching...
No Matches
combination::combination_class Interface Reference

Base class representing a combination signal. More...

Inheritance diagram for combination::combination_class:
signal::signal_class

Public Member Functions

procedure set_signal (this, signal, a, index)
 Set the object and coefficient for an index.
 
procedure set_weight (this, a_model)
 Sets the weight factors from from the weight index.
 
procedure get_modeled_signal_last (this, a_model, sigma, last_value)
 Calculates the modeled signal.
 
procedure get_type (this)
 Gets a discription of the combination type.
 
procedure get_header (this, header)
 Gets a discription of the model and model sigma array indices.
 
procedure write_auxiliary (this, iou, index, a_model)
 Write out auxiliary signal information to an output file.
 
FINAL combination_destruct (this)
 Deconstruct a combination_class object.
 
type(combination_class) function, pointer combination_construct (n_signals, combination_type, wgt_index)
 Construct a combination_class.
 
- Public Member Functions inherited from signal::signal_class
procedure get_modeled_signal_cache (this, a_model, sigma, use_cache, last_value)
 Calculates the modeled signal.
 
procedure get_modeled_signal_last (this, a_model, sigma, last_value)
 Calculates the modeled signal.
 
GENERIC get_modeled_signal get_modeled_signal_cache, get_modeled_signal_last
 
procedure get_observed_signal (this, a_model)
 Calculates the observed signal.
 
procedure get_g2 (this, a_model, use_cache, last_value)
 Calculates the g^2 contribution of a signal.
 
procedure get_e (this, a_model, use_cache, last_value)
 Calculates the e contribution of a signal.
 
procedure get_sigma2 (this)
 Calculates the total sigma^2 of a signal.
 
procedure get_type (this)
 Gets a discription of the signal type.
 
procedure get_header (this, header)
 Gets a discription of the model and model sigma array indices.
 
procedure get_gp_i (this, a_model, i, flags)
 Gets the guassian process kernel for a signal and a position.
 
procedure get_gp_s (this, a_model, signal, flags)
 Gets the guassian process kernel for a signal and a signal.
 
procedure get_gp_x (this, a_model, x_cart, flags)
 Gets the guassian process kernel for a signal and cartesian position.
 
GENERIC get_gp get_gp_i, get_gp_s, get_gp_x
 
procedure scale_and_offset (this, a_model, value)
 Apply scale and offset to the value.
 
procedure sync_child (this, index, recon_comm)
 Syncronize a child signal state to the parent.
 
procedure write_header (this, iou)
 Write out the signal header information to an output file.
 
procedure write (this, iou, index, a_model)
 Write out the signal information to an output file.
 
procedure write_auxiliary (this, iou, index, a_model)
 Write out any auxiliary signal information to an output file.
 
procedure write_step_data (this, a_model, result_ncid, current_step, index, signal_model_value_id, signal_sigma_value_id)
 Write out the signal data for a step to the result netcdf file.
 
FINAL signal_destruct (this)
 Deconstruct a signal_class object.
 

Public Attributes

integer type = combination_none
 Type descirptor of the cobination type.
 
type(signal_pointer), dimension(:), pointer signals
 Array of signal_class pointer presenting the signals to combine.
 
real(rprec), dimension(:), pointer a
 Array of coeffients to for the combined signals.
 
integer wgt_index
 Index of the average weighting factor.
 
- Public Attributes inherited from signal::signal_class
character(len=data_short_name_lengths_name
 Short name of the signal.
 
character(len=data_name_lengthl_name
 Long name of the signal.
 
character(len=data_short_name_lengthunits
 Physical units the signal measures.
 
real(rprec) observed
 Eperimentally measured signal value.
 
real(rprec) observed_sigma
 Eperimentally measured signal uncertainty.
 
real(rprec) weight
 Weighting parameter of the signal.
 
real(rprec), dimension(4) modeled
 Cached value of the modeled signal.
 
real(rprec), dimension(4) modeled_sigma
 Cached value of the modeled sigma.
 
integer scale_index
 Scale factor index.
 
integer offset_index
 Offset factor index.
 

Detailed Description

Base class representing a combination signal.

Interface for combination constructor.

Super Class:
signal

Member Function/Subroutine Documentation

◆ combination_construct()

type (combination_class) function, pointer combination::combination_class::combination_construct ( integer, intent(in)  n_signals,
character (len=combination_type_length), intent(in)  combination_type,
integer, intent(in)  wgt_index 
)

Construct a combination_class.

Allocates memory and initializes a combination_class object. This just allocates the combination_class::signals and combination_class::a array. The indices of these arrays are set by combination_set_signal

Parameters
[in]n_signalsNumber of signals in this combination.
[in]combination_typeThe method to combine the signals. Possible values are combination_sum, combination_max, @ ref combination_min and combination_wavg
[in]wgt_indexIndex number of the average weighting.
Returns
A pointer to a constructed combination_class object.

◆ combination_destruct()

FINAL combination::combination_class::combination_destruct ( type (combination_class), intent(inout)  this)
final

Deconstruct a combination_class object.

Deallocates memory and uninitializes a combination_class object.

Parameters
[in,out]thisA combination_class instance.
Note
The destructors of the signals in the signal array are not called her because the combination signals do not own the memory for those signals.

◆ get_header()

procedure combination::combination_class::get_header ( class (combination_class), intent(in)  this,
character (len=data_name_length), dimension(7), intent(inout)  header 
)

Gets a discription of the model and model sigma array indices.

Returns a description of the array indices for use when writting output files.

Parameters
[in,out]

param [in] this A combination_class instance.

Parameters
[in,out]headerBuffer arrays to write header strings to.
Returns
A string describing the model and model sigma array indices.

◆ get_modeled_signal_last()

procedure combination::combination_class::get_modeled_signal_last ( class (combination_class), intent(inout)  this,
class (model_class), pointer  a_model,
real (rprec), dimension(4), intent(out)  sigma,
real (rprec), dimension(4), intent(in)  last_value 
)

Calculates the modeled signal.

This method combines the signals pointed in the combination_class::signals array.

Parameters
[in,out]thisA combination_class instance.
[in]a_modelA model instance.
[out]sigmaThe modeled sigma.
[in]last_valueLast good value in case the signal did not change.
Returns
The model value.

◆ get_type()

procedure combination::combination_class::get_type ( class (combination_class), intent(in)  this)

Gets a discription of the combination type.

Returns a description of the combination type for use when writting output files.

Parameters
[in]thisA combination_class instance.
Returns
A string describing the combination type.

◆ set_signal()

procedure combination::combination_class::set_signal ( class (combination_class), intent(inout)  this,
class (signal_class), pointer  signal,
real (rprec), intent(in)  a,
integer, intent(in)  index 
)

Set the object and coefficient for an index.

Parameters
[in,out]thisA combination_class instance.
[in]signalA signal_class instance.
[in]aA coefficient for the signal
[in]indexThe index to place the combined signal.
Note
Only signals that were created before this combination can be added. Otherwise there it will creat an infinitely recursive loop in combination_get_modeled_signal

◆ set_weight()

procedure combination::combination_class::set_weight ( class (combination_class), intent(inout)  this,
class (model_class), intent(in)  a_model 
)

Sets the weight factors from from the weight index.

Only assumed valid when the combination type is weighted average. This also assumes that the average of only two signals.

Parameters
[in,out]thisA combination_class instance.
[in]a_modelA model instance.

◆ write_auxiliary()

procedure combination::combination_class::write_auxiliary ( class (combination_class), intent(in)  this,
integer, intent(in)  iou,
integer, intent(in)  index,
class (model_class), intent(in)  a_model 
)

Write out auxiliary signal information to an output file.

Writes out the s_name and coefficient of the combined signals.

Parameters
[in]thisA signal_class instance.
[in]iouA input/output representing the file to write to.
[in]indexA index of a signal.
[in]a_modelThe equilibrium model.

Member Data Documentation

◆ type

integer combination::combination_class::type = combination_none

Type descirptor of the cobination type.

Possible values are:

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