CSVReader

The CSVReader reads CSV data from a file and converts each column into a VectorPostprocessor vector. This object uses the DelimitedFileReader utility to perform the reading of the file.

Example Input Syntax


[VectorPostprocessors]
  [./reader]
    type = CSVReader
    csv_file = example.csv
  [../]
[]
(../moose/test/tests/vectorpostprocessors/csv_reader/read.i)

Input Parameters

  • csv_fileThe name of the CSV file to read. Currently, with the exception of the header row, only numeric values are supported.

    C++ Type:FileName

    Description:The name of the CSV file to read. Currently, with the exception of the header row, only numeric values are supported.

Required Parameters

  • execute_onINITIALThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

    Default:INITIAL

    C++ Type:ExecFlagEnum

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

  • delimiterThe column delimiter. Despite the name this can read files separated by delimiter other than a comma. If this options is omitted it will read comma or space separated files.

    C++ Type:std::string

    Description:The column delimiter. Despite the name this can read files separated by delimiter other than a comma. If this options is omitted it will read comma or space separated files.

  • headerFalseWhen true it is assumed that the first row contains column headers, these headers are used as the VectorPostprocessor vector names. If false the file is assumed to contain only numbers and the vectors are named automatically based on the column number (e.g., 'column_0000', 'column_0001'). If not supplied the reader attempts to auto detect the headers.

    Default:False

    C++ Type:bool

    Description:When true it is assumed that the first row contains column headers, these headers are used as the VectorPostprocessor vector names. If false the file is assumed to contain only numbers and the vectors are named automatically based on the column number (e.g., 'column_0000', 'column_0001'). If not supplied the reader attempts to auto detect the headers.

  • ignore_empty_linesTrueWhen true new empty lines in the file are ignored.

    Default:True

    C++ Type:bool

    Description:When true new empty lines in the file are ignored.

  • contains_complete_historyFalseSet this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

    Default:False

    C++ Type:bool

    Description:Set this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

Optional Parameters

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Description:Set the enabled status of the MooseObject.

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

  • outputsVector of output names were you would like to restrict the output of variables(s) associated with this object

    C++ Type:std::vector

    Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object

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

    C++ Type:std::vector

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

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • force_preauxFalseForces the GeneralUserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Description:Forces the GeneralUserObject to be executed in PREAUX

Advanced Parameters