- 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
Controllable:No
Description:The name of the CSV file to read. Currently, with the exception of the header row, only numeric values are supported.
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.
The names of the vectors declared by the CSVReader
are the names of the columns in the CSV file.
Example Input Syntax
In this example, the example.csv
file containing data for year/month/day is being read by the CSVReader
.
[VectorPostprocessors]
[./reader]
type = CSVReader
csv_file = example.csv
[../]
[]
(../moose/test/tests/vectorpostprocessors/csv_reader/read.i)year,month,day
1980,6,24
1980,10,9
2011,5,1
2013,5,15
(../moose/test/tests/vectorpostprocessors/csv_reader/example.csv)Input Parameters
- 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
Controllable:No
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
Controllable:No
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
Controllable:No
Description:When true new empty lines in the file are ignored.
- parallel_typeREPLICATEDSet how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is performed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.
Default:REPLICATED
C++ Type:MooseEnum
Controllable:No
Description:Set how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is performed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
Optional Parameters
- 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
Controllable:No
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).
- 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:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- 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
Controllable:No
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.