diff --git a/framework/doc/content/source/dirackernels/ReporterPointSource.md b/framework/doc/content/source/dirackernels/ReporterPointSource.md index 37b1595228fc..d9ff69d403e6 100644 --- a/framework/doc/content/source/dirackernels/ReporterPointSource.md +++ b/framework/doc/content/source/dirackernels/ReporterPointSource.md @@ -6,7 +6,7 @@ A `ReporterPointSource` reads in multiple point sources from a `Reporter`. The Duplicated points, i.e. points with the same xyz coordinates, are dropped by [DiracKernels](/DiracKernels/index.md) and applied as a single point. The input parameter [!param](/DiracKernels/ReporterPointSource/combine_duplicates) combines the values and weights of duplicated points when set to `True`. Reporters containing duplicate points will produce an error when set to `False`. The parameter `drop_duplicate_points` used by other DiracKernels to handle duplicate points is suppressed for the `ReporterPointSource` because it is expected that every duplicate point in a `ReporterPointSource` will have different value and weight and are not just multiples of the sames value. An example of a `ReporterPointSource` using a [ConstantReporter](/ConstantReporter.md) -and a `VectorPostprocessor` of type [CSVReader](/CSVReader.md) is given by: +and a `VectorPostprocessor` of type [CSVReaderVectorPostprocessor](/CSVReaderVectorPostprocessor.md) is given by: !listing test/tests/dirackernels/reporter_point_source/2d_vpp.i block=reporter_point_source @@ -14,7 +14,7 @@ The ConstantReporter provides the following data: !listing test/tests/dirackernels/reporter_point_source/2d_vpp.i block=Reporters/reporterData -The `CSVReader` VectorPostprocessor is given by: +The `CSVReaderVectorPostprocessor` is given by: !listing test/tests/dirackernels/reporter_point_source/2d_vpp.i block=VectorPostprocessors diff --git a/framework/doc/content/source/functions/PiecewiseConstantFromCSV.md b/framework/doc/content/source/functions/PiecewiseConstantFromCSV.md index 650fb6dfd439..18730a393f88 100644 --- a/framework/doc/content/source/functions/PiecewiseConstantFromCSV.md +++ b/framework/doc/content/source/functions/PiecewiseConstantFromCSV.md @@ -11,8 +11,9 @@ information from it. It can assume CSV data - is sorted by element-id, in which case, when the function is evaluated at a point, it will locate the element containing it then return the value for that element in the CSV file +- is sorted by node-id, in which case, when the function is evaluated at a point, it will locate the node at that point then return the value for that node in the CSV file - is sorted by blocks, in which case, when the function is evaluated at a point, it will locate the element containing it then return the value for that element's block in the CSV file -- defines an interpolation grid, in which case the function will locate the closest point in that interpolation grid, then return the value for that point in the CSV file +- defines an interpolation grid, with the voronoi [!param](/Functions/PiecewiseConstantFromCSV/read_type), in which case the function will locate the closest point in that interpolation grid, then return the value for that point in the CSV file For the latter case, the first columns of the CSV data must define the coordinates of each point forming the interpolation grid. The number of columns used to define these coordinates @@ -22,13 +23,17 @@ must match the dimension of the mesh. When use data by block or by element, if there is multiple possibilities for the element to choose from, for example at a node, the element with the lowest ID will be used. +!alert note +The [!param](/Functions/PiecewiseConstantFromCSV/column_number) parameter assumes 0-based indexing of the columns in the CSV file. If you want the values from the leftmost column in the file, you must use a column number of `0`. + ## Example Input Syntax -In this example, we display three options for using CSV data to compute a function over an unstructured mesh: +In this example, we display four options for using CSV data to compute a function over an unstructured mesh: -- the `element` function, using the `reader_element` user object, assumes the CSV file is sorted by element ID, and returns the value of the element containing each point -- the `nearest` function, using the `reader_nearest` user object, finds the closest point defined in the CSV file, and returns the corresponding value -- the `block` function, using the `reader_block` user object, assumes the data in the CSV file is sorted by block, and returns the value corresponding to the block containing each point +- the `element` Function, using the `reader_element` user object, assumes the CSV file is sorted by element ID, and returns the value of the element containing each point +- the `node` Function, using the `reader_node` user object, assumes the CSV file is sorted by node ID, and returns the corresponding value at those nodes. Outside of these nodes, the function is currently set to error. +- the `nearest` Function, using the `reader_nearest` user object, finds the closest point defined in the CSV file, and returns the corresponding value +- the `block` Function, using the `reader_block` user object, assumes the data in the CSV file is sorted by block, and returns the value corresponding to the block containing each point !listing test/tests/functions/piecewise_constant_from_csv/piecewise_constant.i block=Functions UserObjects diff --git a/framework/doc/content/source/userobjects/PropertyReadFile.md b/framework/doc/content/source/userobjects/PropertyReadFile.md index 42182c71e82a..318f20e871e1 100644 --- a/framework/doc/content/source/userobjects/PropertyReadFile.md +++ b/framework/doc/content/source/userobjects/PropertyReadFile.md @@ -29,6 +29,14 @@ to the element centroid. An example of a MOOSE object using the `PropertyReadFile` is the [PiecewiseConstantFromCSV.md] function. +If specifying multiple files to the [!param](/UserObjects/PropertyReadFile/prop_file_name) +parameter, a new file will be read every time the object is initialized, which happens right before +user objects are executed. The [!param](/UserObjects/PropertyReadFile/execute_on) parameter should be used to control the frequency of these executions. The user object will always read the first file at construction time, and, as an exception, will not read a new file on its first execution. +If all data files have been read, the last file specified is used. + +!alert note +When using multiple files, please note the data from the files is not concatenated. Every time a new file is read, the old data is removed from consideration. + ## Example input syntax In this example input file, the `PropertyReadFile` user object is used to load data from a CSV file diff --git a/framework/doc/content/source/utils/MooseUtils.md b/framework/doc/content/source/utils/MooseUtils.md index 627241bd6a23..e70e3dd4f21c 100644 --- a/framework/doc/content/source/utils/MooseUtils.md +++ b/framework/doc/content/source/utils/MooseUtils.md @@ -16,7 +16,7 @@ outside of the header, is numeric and can be converted to a C++ double. Addition assumed that the first row or column defines the number of columns for the entire file, if the number of columns differs from the first row an error will be produced. -Within MOOSE this utility is utilized by the [CSVReader](/CSVReader.md), which is part of +Within MOOSE this utility is utilized by the [CSVReaderVectorPostprocessor](/CSVReaderVectorPostprocessor.md), which is part of the [VectorPostprocessors] system. This object will be used to explain the use of the utility. Using the DelimitedFileReader is very simple and requires three steps. First, include the @@ -30,7 +30,7 @@ is instantiated and read method is called, as shown in the unit test snippet bel This class is required to include the filename upon construction. Optionally, a second argument providing a pointer to a [libMesh] Communicator object may be provided. This argument should be used when the reader is used within a MooseObject. For example, as shown in [csv_reader_ctor], -the CSVReader object passes a Communicator object to the reader. If not provided the reader will +the `CSVReaderVectorPostprocessor` object passes a Communicator object to the reader. If not provided the reader will read the data on all processors. If provided it will only read on single processor and broadcast the data to the others. @@ -63,8 +63,8 @@ The set methods must be called prior to the read method. character(s) will be ignored and all characters on a line that follow the character(s) will also be ignored. - !listing framework/src/vectorpostprocessors/CSVReader.C - start=CSVReader:: + !listing framework/src/vectorpostprocessors/CSVReaderVectorPostprocessor.C + start=CSVReaderVectorPostprocessor:: end=&_communicator include-end=True id=csv_reader_ctor caption=Construction of DelimitedFileReader object within a MooseObject initialization list. diff --git a/framework/doc/content/source/vectorpostprocessors/CSVReader.md b/framework/doc/content/source/vectorpostprocessors/CSVReader.md deleted file mode 100644 index 84b864924433..000000000000 --- a/framework/doc/content/source/vectorpostprocessors/CSVReader.md +++ /dev/null @@ -1,22 +0,0 @@ -# CSVReader - -The CSVReader reads [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) data from a file and -converts each column into a VectorPostprocessor vector. This object uses the -[DelimitedFileReader](MooseUtils.md#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`. - -!listing test/tests/vectorpostprocessors/csv_reader/read.i block=VectorPostprocessors - -!listing test/tests/vectorpostprocessors/csv_reader/example.csv - -!syntax parameters /VectorPostprocessors/CSVReader - -!syntax inputs /VectorPostprocessors/CSVReader - -!syntax children /VectorPostprocessors/CSVReader diff --git a/framework/doc/content/source/vectorpostprocessors/CSVReader.md b/framework/doc/content/source/vectorpostprocessors/CSVReader.md new file mode 120000 index 000000000000..2cd18d516c23 --- /dev/null +++ b/framework/doc/content/source/vectorpostprocessors/CSVReader.md @@ -0,0 +1 @@ +CSVReaderVectorPostprocessor.md \ No newline at end of file diff --git a/framework/doc/content/source/vectorpostprocessors/CSVReaderVectorPostprocessor.md b/framework/doc/content/source/vectorpostprocessors/CSVReaderVectorPostprocessor.md new file mode 100644 index 000000000000..1a821b48cfc6 --- /dev/null +++ b/framework/doc/content/source/vectorpostprocessors/CSVReaderVectorPostprocessor.md @@ -0,0 +1,22 @@ +# CSVReaderVectorPostprocessor + +The CSVReaderVectorPostprocessor reads [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) data from a file and +converts each column into a VectorPostprocessor vector. This object uses the +[DelimitedFileReader](MooseUtils.md#delimitedfilereader) utility to perform the reading of the file. + +The names of the vectors declared by the `CSVReaderVectorPostprocessor` 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 `CSVReaderVectorPostprocessor`. + +!listing test/tests/vectorpostprocessors/csv_reader/read.i block=VectorPostprocessors + +!listing test/tests/vectorpostprocessors/csv_reader/example.csv + +!syntax parameters /VectorPostprocessors/CSVReaderVectorPostprocessor + +!syntax inputs /VectorPostprocessors/CSVReaderVectorPostprocessor + +!syntax children /VectorPostprocessors/CSVReaderVectorPostprocessor diff --git a/framework/include/userobjects/PropertyReadFile.h b/framework/include/userobjects/PropertyReadFile.h index 85263f3d2c8b..416196b367c9 100644 --- a/framework/include/userobjects/PropertyReadFile.h +++ b/framework/include/userobjects/PropertyReadFile.h @@ -32,7 +32,7 @@ class PropertyReadFile : public GeneralUserObject PropertyReadFile(const InputParameters & parameters); virtual ~PropertyReadFile() {} - virtual void initialize() {} + virtual void initialize(); virtual void execute() {} virtual void finalize() {} @@ -119,7 +119,9 @@ class PropertyReadFile : public GeneralUserObject protected: /// Name of file containing property values - const std::string _prop_file_name; + const std::vector _prop_file_names; + /// Index of the file we last read + unsigned int & _current_file_index; /// Use DelimitedFileReader to read and store data from file MooseUtils::DelimitedFileReader _reader; @@ -153,4 +155,7 @@ class PropertyReadFile : public GeneralUserObject const unsigned int _nvoronoi; /// Number of blocks (for reading a CSV file with properties ordered by blocks) const unsigned int _nblock; + + /// To keep track of initialization to avoid reading the files twice + bool & _initialize_called_once; }; diff --git a/framework/include/utils/DelimitedFileReader.h b/framework/include/utils/DelimitedFileReader.h index d92ddbc234f3..1d36dd0e0643 100644 --- a/framework/include/utils/DelimitedFileReader.h +++ b/framework/include/utils/DelimitedFileReader.h @@ -92,6 +92,9 @@ class DelimitedFileReader const std::string & getComment() const { return _row_comment; } ///@} + /// Set the file name, used to change the file to read from + void setFileName(const std::string & new_file) { _filename = new_file; } + /** * Return the column/row names. */ @@ -134,7 +137,7 @@ class DelimitedFileReader protected: /// The supplied filename. - const std::string _filename; + std::string _filename; /// Flag indicating if the file contains a header. HeaderFlag _header_flag; diff --git a/framework/include/vectorpostprocessors/CSVReader.h b/framework/include/vectorpostprocessors/CSVReaderVectorPostprocessor.h similarity index 83% rename from framework/include/vectorpostprocessors/CSVReader.h rename to framework/include/vectorpostprocessors/CSVReaderVectorPostprocessor.h index 29a33fbd8ed8..264f3e788793 100644 --- a/framework/include/vectorpostprocessors/CSVReader.h +++ b/framework/include/vectorpostprocessors/CSVReaderVectorPostprocessor.h @@ -13,11 +13,11 @@ #include "GeneralVectorPostprocessor.h" #include "DelimitedFileReader.h" -class CSVReader : public GeneralVectorPostprocessor +class CSVReaderVectorPostprocessor : public GeneralVectorPostprocessor { public: static InputParameters validParams(); - CSVReader(const InputParameters & parameters); + CSVReaderVectorPostprocessor(const InputParameters & parameters); virtual void initialize() override {} virtual void execute() override {} diff --git a/framework/src/userobjects/PropertyReadFile.C b/framework/src/userobjects/PropertyReadFile.C index 0add1f75153f..0b4cd5db3025 100644 --- a/framework/src/userobjects/PropertyReadFile.C +++ b/framework/src/userobjects/PropertyReadFile.C @@ -24,8 +24,11 @@ PropertyReadFile::validParams() { InputParameters params = GeneralUserObject::validParams(); params.addClassDescription("User Object to read property data from an external file and assign " - "to elements."); - params.addRequiredParam("prop_file_name", "Name of the property file name"); + "it to elements / nodes / subdomains etc."); + params.addRequiredParam>( + "prop_file_name", + "Name(s) of the property file name. If specifying multiple files, the next file will be read " + "at initialization right before every execution"); params.addRequiredParam("nprop", "Number of tabulated property values"); params.addParam( "nvoronoi", 0, "Number of voronoi tesselations/grains/nearest neighbor regions"); @@ -50,14 +53,25 @@ PropertyReadFile::validParams() "Periodic or non-periodic grain distribution: Default is non-periodic"); params.addParam( "use_zero_based_block_indexing", true, "Are the blocks numbered starting at zero?"); + + // Set an execution schedule to what makes sense currently + // We do not allow INITIAL because we read the file at construction + ExecFlagEnum & exec_enum = params.set("execute_on", true); + exec_enum.removeAvailableFlags(EXEC_INITIAL, EXEC_FINAL, EXEC_LINEAR, EXEC_NONLINEAR); + params.setDocString("execute_on", exec_enum.getDocString()); + // we must read the files as early as possible + params.set("force_preaux") = true; + return params; } PropertyReadFile::PropertyReadFile(const InputParameters & parameters) : GeneralUserObject(parameters), - _prop_file_name(getParam("prop_file_name")), - _reader(_prop_file_name), - + _prop_file_names(getParam>("prop_file_name")), + _current_file_index(declareRestartableData("file_index", 0)), + // index of files must be capped if restarting after having read all files + _reader( + _prop_file_names[std::min(_current_file_index, (unsigned int)_prop_file_names.size() - 1)]), _read_type(getParam("read_type").getEnum()), _use_random_tesselation(getParam("use_random_voronoi")), _rand_seed(getParam("rand_seed")), @@ -69,7 +83,8 @@ PropertyReadFile::PropertyReadFile(const InputParameters & parameters) _nprop(getParam("nprop")), _nvoronoi(isParamValid("ngrain") ? getParam("ngrain") : getParam("nvoronoi")), - _nblock(getParam("nblock")) + _nblock(getParam("nblock")), + _initialize_called_once(declareRestartableData("initialize_called", false)) { if (!_use_random_tesselation && parameters.isParamSetByUser("rand_seed")) paramError("rand_seed", @@ -86,11 +101,33 @@ PropertyReadFile::PropertyReadFile(const InputParameters & parameters) readData(); } +void +PropertyReadFile::initialize() +{ + // Since we read at construction, no need to re-read the file on first initialize + if (!_initialize_called_once) + { + _initialize_called_once = true; + return; + } + + // Set then read new file, only if we have not reached the last file + if (_current_file_index < _prop_file_names.size()) + { + _reader.setFileName(_prop_file_names[_current_file_index]); + readData(); + } + else if (_current_file_index == _prop_file_names.size()) + mooseInfo("Last file specified has been read. The file will no longer be updated."); +} + void PropertyReadFile::readData() { if (_read_type == ReadTypeEnum::ELEMENT && _mesh.getMesh().allow_renumbering()) mooseWarning("CSV data is sorted by element, but mesh element renumbering is on, be careful!"); + if (_read_type == ReadTypeEnum::NODE && _mesh.getMesh().allow_renumbering()) + mooseWarning("CSV data is sorted by node, but mesh node renumbering is on, be careful!"); _reader.setFormatFlag(MooseUtils::DelimitedFileReader::FormatFlag::ROWS); _reader.read(); @@ -129,20 +166,30 @@ PropertyReadFile::readData() // make sure the data from file has enough rows and columns if (_reader.getData().size() < nobjects) - mooseError( - "Data in ", _prop_file_name, " does not have enough rows for ", nobjects, " objects."); + mooseError("Data in ", + _prop_file_names[_current_file_index], + " does not have enough rows for ", + nobjects, + " objects."); if (_reader.getData().size() > nobjects) mooseWarning("Data size in ", - _prop_file_name, + _prop_file_names[_current_file_index], " is larger than ", nobjects, " objects, some data will not be used."); for (unsigned int i = 0; i < nobjects; i++) if (_reader.getData(i).size() < _nprop) - mooseError("Row ", i, " in ", _prop_file_name, " has number of data less than ", _nprop); + mooseError("Row ", + i, + " in ", + _prop_file_names[_current_file_index], + " has number of data less than ", + _nprop); if (_read_type == ReadTypeEnum::VORONOI || _read_type == ReadTypeEnum::GRAIN) initVoronoiCenterPoints(); + + _current_file_index++; } void diff --git a/framework/src/vectorpostprocessors/CSVReader.C b/framework/src/vectorpostprocessors/CSVReaderVectorPostprocessor.C similarity index 89% rename from framework/src/vectorpostprocessors/CSVReader.C rename to framework/src/vectorpostprocessors/CSVReaderVectorPostprocessor.C index 8d9d1f19a36c..756721e762f7 100644 --- a/framework/src/vectorpostprocessors/CSVReader.C +++ b/framework/src/vectorpostprocessors/CSVReaderVectorPostprocessor.C @@ -11,13 +11,14 @@ #include // MOOSE includes -#include "CSVReader.h" +#include "CSVReaderVectorPostprocessor.h" #include "MooseUtils.h" -registerMooseObject("MooseApp", CSVReader); +registerMooseObject("MooseApp", CSVReaderVectorPostprocessor); +registerMooseObjectRenamed("MooseApp", CSVReader, "06/30/2024 24:00", CSVReaderVectorPostprocessor); InputParameters -CSVReader::validParams() +CSVReaderVectorPostprocessor::validParams() { InputParameters params = GeneralVectorPostprocessor::validParams(); params.addClassDescription( @@ -51,7 +52,8 @@ CSVReader::validParams() return params; } -CSVReader::CSVReader(const InputParameters & params) : GeneralVectorPostprocessor(params) +CSVReaderVectorPostprocessor::CSVReaderVectorPostprocessor(const InputParameters & params) + : GeneralVectorPostprocessor(params) { /// The MOOSE delimited file reader. MooseUtils::DelimitedFileReader csv_reader(getParam("csv_file"), &_communicator); diff --git a/modules/optimization/doc/content/source/functions/ParameterMeshFunction.md b/modules/optimization/doc/content/source/functions/ParameterMeshFunction.md index 048b366ef534..214d80a9aae2 100644 --- a/modules/optimization/doc/content/source/functions/ParameterMeshFunction.md +++ b/modules/optimization/doc/content/source/functions/ParameterMeshFunction.md @@ -22,7 +22,7 @@ First step is to define a mesh for the parameters, which is most easily done by !listing parameter_mesh/create_mesh.i -Running this input will create a `create_mesh_out.e` exodus file and `create_mesh_out_param_vec_0001.csv` CSV file. The CSV file is read by a [CSVReader.md] to create a vector-postprocessor of the parameter data. A ParameterMeshFunction then reads in the exodus file and retrieves the vector for the interpolation. +Running this input will create a `create_mesh_out.e` exodus file and `create_mesh_out_param_vec_0001.csv` CSV file. The CSV file is read by a [CSVReaderVectorPostprocessor.md] to create a vector-postprocessor of the parameter data. A ParameterMeshFunction then reads in the exodus file and retrieves the vector for the interpolation. !listing parameter_mesh/parameter_mesh.i block=VectorPostprocessors Functions diff --git a/modules/stochastic_tools/doc/content/source/samplers/VectorPostprocessorSampler.md b/modules/stochastic_tools/doc/content/source/samplers/VectorPostprocessorSampler.md index efe23c24de27..7847411e8447 100644 --- a/modules/stochastic_tools/doc/content/source/samplers/VectorPostprocessorSampler.md +++ b/modules/stochastic_tools/doc/content/source/samplers/VectorPostprocessorSampler.md @@ -7,7 +7,7 @@ The sampler generates samples from [vector-postprocessor](VectorPostprocessors/i ## Example Input Syntax -In the example below, a vectorpostprocessor (`[csv]`) are formed using [CSVReader](/CSVReader.md): +In the example below, a vectorpostprocessor (`[csv]`) are formed using [CSVReaderVectorPostprocessor](/CSVReaderVectorPostprocessor.md): !listing modules/stochastic_tools/test/tests/samplers/vectorpostprocessor/vectorpostprocessor.i block=VectorPostprocessors diff --git a/test/tests/functions/piecewise_constant_from_csv/data_element_t2.csv b/test/tests/functions/piecewise_constant_from_csv/data_element_t2.csv new file mode 100644 index 000000000000..c6a3963487db --- /dev/null +++ b/test/tests/functions/piecewise_constant_from_csv/data_element_t2.csv @@ -0,0 +1,16 @@ +0,0,0.2 +0,0,1.6 +0,0,0.8 +0,0,1.8 +0,0,2 +1,0,2.2 +1,0,4.2 +1,0,6.2 +1,0,34.2 +1,0,48 +1,0,20 +1,0,0.2 +1,0,22 +1,0,34 +1,0,3.6 +1,0,-2 diff --git a/test/tests/functions/piecewise_constant_from_csv/gold/piecewise_constant_elem_multiple.e b/test/tests/functions/piecewise_constant_from_csv/gold/piecewise_constant_elem_multiple.e new file mode 100644 index 000000000000..207c0b72b2ab Binary files /dev/null and b/test/tests/functions/piecewise_constant_from_csv/gold/piecewise_constant_elem_multiple.e differ diff --git a/test/tests/functions/piecewise_constant_from_csv/piecewise_constant_elem_multiple.i b/test/tests/functions/piecewise_constant_from_csv/piecewise_constant_elem_multiple.i new file mode 100644 index 000000000000..20f22fb90836 --- /dev/null +++ b/test/tests/functions/piecewise_constant_from_csv/piecewise_constant_elem_multiple.i @@ -0,0 +1,69 @@ +[Mesh] + allow_renumbering = false + [cmg] + type = CartesianMeshGenerator + dim = 2 + dx = '1.5 2.4 0.1' + dy = '1.3 0.9' + ix = '2 1 1' + iy = '1 3' + subdomain_id = '0 1 1 + 2 2 2' + [] +[] + +[AuxVariables] + [u] + family = MONOMIAL + order = CONSTANT + [] +[] + +[UserObjects] + [reader_element] + type = PropertyReadFile + prop_file_name = 'data_element.csv data_element_t2.csv' + read_type = 'element' + nprop = 3 # number of columns in CSV + execute_on = TIMESTEP_END + [] +[] + +[Functions] + [element] + type = PiecewiseConstantFromCSV + read_prop_user_object = 'reader_element' + read_type = 'element' + column_number = '2' + [] +[] + +[ICs] + [element] + type = FunctionIC + variable = 'u' + function = 'element' + [] +[] + +[AuxKernels] + [set_elem] + type = FunctionAux + variable = 'u' + function = 'element' + [] +[] + +[Problem] + solve = false + kernel_coverage_check = false +[] + +[Executioner] + type = Transient + num_steps = 2 +[] + +[Outputs] + exodus = true +[] diff --git a/test/tests/functions/piecewise_constant_from_csv/tests b/test/tests/functions/piecewise_constant_from_csv/tests index 11af7c53274c..42859771deae 100644 --- a/test/tests/functions/piecewise_constant_from_csv/tests +++ b/test/tests/functions/piecewise_constant_from_csv/tests @@ -50,11 +50,18 @@ input = 'piecewise_constant.i' exodiff = 'piecewise_constant_block.e' cli_args = 'ICs/active=block Outputs/file_base=piecewise_constant_block' - detail = 'with data sorted by blocks and with constant values on each block.' + detail = 'with data sorted by blocks and with constant values on each block,' recover = false # Function used at nodes allow_warnings = true [] + [multiple_files] + type = 'Exodiff' + input = 'piecewise_constant_elem_multiple.i' + exodiff = 'piecewise_constant_elem_multiple.e' + cli_args = 'Outputs/file_base=piecewise_constant_elem_multiple' + detail = 'with multiple CSV files read on every execution of the user object.' + [] [] [errors] requirement = 'The system shall report an error if' diff --git a/test/tests/vectorpostprocessors/csv_reader/read.i b/test/tests/vectorpostprocessors/csv_reader/read.i index a71ff6073540..c203a5bde06e 100644 --- a/test/tests/vectorpostprocessors/csv_reader/read.i +++ b/test/tests/vectorpostprocessors/csv_reader/read.i @@ -23,7 +23,7 @@ [VectorPostprocessors] [./reader] - type = CSVReader + type = CSVReaderVectorPostprocessor csv_file = example.csv [../] [] diff --git a/test/tests/vectorpostprocessors/csv_reader/read_preic.i b/test/tests/vectorpostprocessors/csv_reader/read_preic.i index b47856b19640..3cae2ca9666a 100644 --- a/test/tests/vectorpostprocessors/csv_reader/read_preic.i +++ b/test/tests/vectorpostprocessors/csv_reader/read_preic.i @@ -13,7 +13,7 @@ [VectorPostprocessors] [./reader] - type = CSVReader + type = CSVReaderVectorPostprocessor csv_file = 'example.csv' force_preic = true [../] diff --git a/test/tests/vectorpostprocessors/csv_reader/tests b/test/tests/vectorpostprocessors/csv_reader/tests index 9a9704288c51..fb80ae81be10 100644 --- a/test/tests/vectorpostprocessors/csv_reader/tests +++ b/test/tests/vectorpostprocessors/csv_reader/tests @@ -1,5 +1,5 @@ [Tests] - design = 'CSVReader.md' + design = 'CSVReaderVectorPostprocessor.md' [read] type = CSVDiff diff --git a/test/tests/vectorpostprocessors/csv_reader/transfer/tests b/test/tests/vectorpostprocessors/csv_reader/transfer/tests index 52d3e7a60fcd..67768a7fbf94 100644 --- a/test/tests/vectorpostprocessors/csv_reader/transfer/tests +++ b/test/tests/vectorpostprocessors/csv_reader/transfer/tests @@ -1,14 +1,14 @@ [Tests] [./csv_reader_in_transfer] - # A user was looking for an example of how to use CSVReader with MultiAppUserObjectTransfer, - # this provide an example. It is an error because the CSVReader will need to override the + # A user was looking for an example of how to use CSVReaderVectorPostprocessor with MultiAppUserObjectTransfer, + # this provide an example. It is an error because the CSVReaderVectorPostprocessor will need to override the # spatialValue method. type = RunException input = parent.i expect_err = 'data does not satisfy the Spatial UserObject interface!' issues = '#9860' - design = 'CSVReader.md' - requirement = 'The system shall issue an error if the CSVReader is used in a UserObjectTransfer because the former does not have any notion of "spatial" information.' + design = 'CSVReaderVectorPostprocessor.md' + requirement = 'The system shall issue an error if the CSVReaderVectorPostprocessor is used in a UserObjectTransfer because the former does not have any notion of "spatial" information.' [../] [] diff --git a/test/tests/vectorpostprocessors/least_squares_fit/least_squares_fit_csv_data.i b/test/tests/vectorpostprocessors/least_squares_fit/least_squares_fit_csv_data.i index 471fe1e97eca..2413165c0205 100644 --- a/test/tests/vectorpostprocessors/least_squares_fit/least_squares_fit_csv_data.i +++ b/test/tests/vectorpostprocessors/least_squares_fit/least_squares_fit_csv_data.i @@ -16,7 +16,7 @@ [VectorPostprocessors] [./csv_data] - type = CSVReader + type = CSVReaderVectorPostprocessor csv_file = fit_data_0.csv header = true outputs = none diff --git a/test/tests/vectorpostprocessors/least_squares_fit/tests b/test/tests/vectorpostprocessors/least_squares_fit/tests index 3d6c00fbdbd4..a4656f365464 100644 --- a/test/tests/vectorpostprocessors/least_squares_fit/tests +++ b/test/tests/vectorpostprocessors/least_squares_fit/tests @@ -9,8 +9,8 @@ [../] [./least_squares_csv0] issues = '#13498' - requirement = 'The LeastSquaresFit vectorpostprocessor shall compute a least squares fit of a zeroth-rder polynomial with data provided by a CSVReader' - design = 'LeastSquaresFit.md CSVReader.md' + requirement = 'The LeastSquaresFit vectorpostprocessor shall compute a least squares fit of a zeroth-order polynomial with data provided by a CSVReaderVectorPostprocessor' + design = 'LeastSquaresFit.md CSVReaderVectorPostprocessor.md' type = 'CSVDiff' input = 'least_squares_fit_csv_data.i' csvdiff = 'csv0_least_squares_fit_coeffs_0000.csv' @@ -18,8 +18,8 @@ [../] [./least_squares_csv1] issues = '#13498' - requirement = 'The LeastSquaresFit vectorpostprocessor shall compute a least squares fit of a first-rder polynomial with data provided by a CSVReader' - design = 'LeastSquaresFit.md CSVReader.md' + requirement = 'The LeastSquaresFit vectorpostprocessor shall compute a least squares fit of a first-order polynomial with data provided by a CSVReaderVectorPostprocessor' + design = 'LeastSquaresFit.md CSVReaderVectorPostprocessor.md' type = 'CSVDiff' input = 'least_squares_fit_csv_data.i' cli_args = 'VectorPostprocessors/csv_data/csv_file=fit_data_1.csv VectorPostprocessors/least_squares_fit_coeffs/order=1 Outputs/file_base=csv1' @@ -28,8 +28,8 @@ [../] [./least_squares_csv2] issues = '#13498' - requirement = 'The LeastSquaresFit vectorpostprocessor shall compute a least squares fit of a second-rder polynomial with data provided by a CSVReader' - design = 'LeastSquaresFit.md CSVReader.md' + requirement = 'The LeastSquaresFit vectorpostprocessor shall compute a least squares fit of a second-order polynomial with data provided by a CSVReaderVectorPostprocessor' + design = 'LeastSquaresFit.md CSVReaderVectorPostprocessor.md' type = 'CSVDiff' input = 'least_squares_fit_csv_data.i' cli_args = 'VectorPostprocessors/csv_data/csv_file=fit_data_2.csv VectorPostprocessors/least_squares_fit_coeffs/order=2 Outputs/file_base=csv2' @@ -39,7 +39,7 @@ [./least_squares_csv3_order_err] issues = '#13498' requirement = 'The LeastSquaresFit vectorpostprocessor shall generate an error if a fit for a third-order polynomial is requested and only three data points are provided' - design = 'LeastSquaresFit.md CSVReader.md' + design = 'LeastSquaresFit.md CSVReaderVectorPostprocessor.md' type = 'RunException' expect_err = 'PolynomialFit requires an order less than the size of the input vector' input = 'least_squares_fit_csv_data.i'