NearestReporterCoordinatesFunction

This Function finds the nearest point in the specified vectors of coordinates and returns the values specified in the vector of values at the index of the nearest point. All the vectors must be specified using either vector postprocessors or reporter vectors. This function interpolates linearly in time with transient data.

Overview

This function computes values based on coordinate and time data. This data comes in the form of vector reporter or vectorpostprocessor values. The required parameter "value_name" is the name of the vector containing the values used to set the variable to. "x_coord_name"/"y_coord_name"/"z_coord_name" are vectors with the x-/y-/z-coordinate data. The auxkernel will set the variable's nodal/elemental values based on the nearest point in this data. "time_name" is the name of the time data; the kernel will linearly interpolate between two closest times for a certain coordinate, without extrapolating. "x_coord_name", "y_coord_name", "z_coord_name", and "time_name" will assume to be 0 when not specified. When specified, "x_coord_name", "y_coord_name", "z_coord_name", and "time_name" must all be the same length as "value_name".

Example Input File Syntax

Here are several examples of different combinations where x, y, z, and time data is specified:

[Functions]
  active = 'xyzt'
  [xx]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values1D/coordx'
    value_name = 'values1D/value'
  []
  [xy]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values2D/coordx'
    y_coord_name = 'values2D/coordy'
    value_name = 'values2D/value'
  []
  [xyz]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values3D/coordx'
    y_coord_name = 'values3D/coordy'
    z_coord_name = 'values3D/coordz'
    value_name = 'values3D/value'
  []
  [xyzt]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values4D/coordx'
    y_coord_name = 'values4D/coordy'
    z_coord_name = 'values4D/coordz'
    time_name = 'values4D/time'
    value_name = 'values4D/value'
  []

  [errorv]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values4D/coordx'
    value_name = 'values1D/val'
  []
  [errorx]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values1D/coordx'
    y_coord_name = 'values4D/coordx'
    value_name = 'values4D/value'
  []
  [errory]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values4D/coordx'
    y_coord_name = 'values1D/coordx'
    value_name = 'values4D/value'
  []
  [errorz]
    type = NearestReporterCoordinatesFunction
    variable = val
    x_coord_name = 'values4D/coordx'
    z_coord_name = 'values1D/coordx'
    value_name = 'values4D/value'
  []
  [errort]
    type = NearestReporterCoordinatesFunction
    x_coord_name = 'values4D/coordx'
    time_name = 'values1D/coordx'
    value_name = 'values4D/value'
  []
[]

[Reporters]
  [values1D]
    type = ConstantReporter
    real_vector_names = 'coordx value'
    real_vector_values = '0.25 0.75;
                          0.00 1.00'
  []
  [values2D]
    type = ConstantReporter
    real_vector_names = 'coordx coordy value'
    real_vector_values = '0.25 0.75 0.25 0.75;
                          0.25 0.25 0.75 0.75;
                          0.00 1.00 2.00 3.00'
  []
  [values3D]
    type = ConstantReporter
    real_vector_names = 'coordx coordy coordz value'
    real_vector_values = '0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75;
                          0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75;
                          0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75;
                          0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00'
  []
  [values4D]
    type = ConstantReporter
    real_vector_names = 'coordx coordy coordz time value'
    real_vector_values = '0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75
                          0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75
                          0.25 0.75 0.25 0.75 0.25 0.75 0.25 0.75;

                          0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75
                          0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75
                          0.25 0.25 0.75 0.75 0.25 0.25 0.75 0.75;

                          0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75
                          0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75
                          0.25 0.25 0.25 0.25 0.75 0.75 0.75 0.75;

                          0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
                          0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50
                          1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00;

                          0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00
                          8.00 9.00 10.0 11.0 12.0 13.0 14.0 15.0
                          16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0'
  []
[]
(modules/optimization/test/tests/functions/nearest_reporter_coord/nearest_reporter_point.i)

Run this test to see how the function interpolates the data between specified times.

Input Parameters

  • value_nameName of vector-postprocessor or reporter vector containing value data.

    C++ Type:ReporterName

    Controllable:No

    Description:Name of vector-postprocessor or reporter vector containing value data.

Required Parameters

  • execute_onLINEARThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.

    Default:LINEAR

    C++ Type:ExecFlagEnum

    Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.

  • time_nameName of vector-postprocessor or reporter vector containing time, default is assumed to be all 0s.

    C++ Type:ReporterName

    Controllable:No

    Description:Name of vector-postprocessor or reporter vector containing time, default is assumed to be all 0s.

  • x_coord_nameName of vector-postprocessor or reporter vector containing x-coordinate of points, default is assumed to be all 0s.

    C++ Type:ReporterName

    Controllable:No

    Description:Name of vector-postprocessor or reporter vector containing x-coordinate of points, default is assumed to be all 0s.

  • y_coord_nameName of vector-postprocessor or reporter vector containing y-coordinate of points, default is assumed to be all 0s.

    C++ Type:ReporterName

    Controllable:No

    Description:Name of vector-postprocessor or reporter vector containing y-coordinate of points, default is assumed to be all 0s.

  • z_coord_nameName of vector-postprocessor or reporter vector containing z-coordinate of points, default is assumed to be all 0s.

    C++ Type:ReporterName

    Controllable:No

    Description:Name of vector-postprocessor or reporter vector containing z-coordinate of points, default is assumed to be all 0s.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

Advanced Parameters

Input Files