diff --git a/src/Plugins/SimplnxCore/CMakeLists.txt b/src/Plugins/SimplnxCore/CMakeLists.txt index 70079fcc95..9aac2adc4c 100644 --- a/src/Plugins/SimplnxCore/CMakeLists.txt +++ b/src/Plugins/SimplnxCore/CMakeLists.txt @@ -137,7 +137,7 @@ set(FilterList WriteDREAM3DFilter WriteFeatureDataCSVFilter WriteLosAlamosFFTFilter - WriteNodesAndElementsFileFilter + WriteNodesAndElementsFilesFilter WriteStlFileFilter WriteVtkRectilinearGridFilter WriteVtkStructuredPointsFilter @@ -227,7 +227,7 @@ set(AlgorithmList WriteAvizoRectilinearCoordinate WriteAvizoUniformCoordinate WriteLosAlamosFFT - WriteNodesAndElementsFile + WriteNodesAndElementsFiles WriteStlFile WriteVtkRectilinearGrid WriteVtkStructuredPoints diff --git a/src/Plugins/SimplnxCore/docs/WriteNodesAndElementsFilesFilter.md b/src/Plugins/SimplnxCore/docs/WriteNodesAndElementsFilesFilter.md new file mode 100644 index 0000000000..f6c53892b5 --- /dev/null +++ b/src/Plugins/SimplnxCore/docs/WriteNodesAndElementsFilesFilter.md @@ -0,0 +1,24 @@ +# Write Nodes and Elements File(s) + +## Group (Subgroup) + +IO (Output) + +## Description + +This **Filter** exports geometric data into structured text files. It allows users to save the following: + +1. Node Data (Vertices): Export the coordinates of points that define the geometry. +2. Element Data (Connectivity): Export the node indices that make up the edges, faces, or volumes of the geometry. + +The filter gives the user the option to export a node file, element file, or both. It also allows the user to decide whether or not to number the nodes and elements and whether or not to include headers for the node and element files. + +% Auto generated parameter table will be inserted here + +## License & Copyright + +Please see the description file distributed with this **Plugin** + +## DREAM3D-NX Help + +If you need help, need to file a bug report or want to request a new feature, please head over to the [DREAM3DNX-Issues](https://github.com/BlueQuartzSoftware/DREAM3DNX-Issues/discussions) GitHub site where the community of DREAM3D-NX users can help answer your questions. diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.cpp similarity index 89% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.cpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.cpp index 979f87655c..bd0988c34d 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.cpp @@ -1,4 +1,4 @@ -#include "WriteNodesAndElementsFile.hpp" +#include "WriteNodesAndElementsFiles.hpp" #include "simplnx/DataStructure/DataArray.hpp" #include "simplnx/DataStructure/Geometry/EdgeGeom.hpp" @@ -40,7 +40,7 @@ Result<> WriteFile(const fs::path& outputFilePath, const DataArray& array, bo std::ofstream file(outputFilePath.string()); if(!file.is_open()) { - return MakeErrorResult(to_underlying(WriteNodesAndElementsFile::ErrorCodes::FailedToOpenOutputFile), fmt::format("Failed to open output file \"{}\".", outputFilePath.string())); + return MakeErrorResult(to_underlying(WriteNodesAndElementsFiles::ErrorCodes::FailedToOpenOutputFile), fmt::format("Failed to open output file \"{}\".", outputFilePath.string())); } file << fmt::format("# This file was created by simplnx v{}", Version::Complete()) << std::endl; @@ -81,8 +81,8 @@ Result<> WriteFile(const fs::path& outputFilePath, const DataArray& array, bo } // namespace // ----------------------------------------------------------------------------- -WriteNodesAndElementsFile::WriteNodesAndElementsFile(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, - WriteNodesAndElementsFileInputValues* inputValues) +WriteNodesAndElementsFiles::WriteNodesAndElementsFiles(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, + WriteNodesAndElementsFilesInputValues* inputValues) : m_DataStructure(dataStructure) , m_InputValues(inputValues) , m_ShouldCancel(shouldCancel) @@ -91,22 +91,22 @@ WriteNodesAndElementsFile::WriteNodesAndElementsFile(DataStructure& dataStructur } // ----------------------------------------------------------------------------- -WriteNodesAndElementsFile::~WriteNodesAndElementsFile() noexcept = default; +WriteNodesAndElementsFiles::~WriteNodesAndElementsFiles() noexcept = default; // ----------------------------------------------------------------------------- -const std::atomic_bool& WriteNodesAndElementsFile::getCancel() +const std::atomic_bool& WriteNodesAndElementsFiles::getCancel() { return m_ShouldCancel; } // ----------------------------------------------------------------------------- -void WriteNodesAndElementsFile::sendMessage(const std::string& message) +void WriteNodesAndElementsFiles::sendMessage(const std::string& message) { m_MessageHandler(IFilter::Message::Type::Info, message); } // ----------------------------------------------------------------------------- -Result<> WriteNodesAndElementsFile::operator()() +Result<> WriteNodesAndElementsFiles::operator()() { auto& iNodeGeometry = m_DataStructure.getDataRefAs(m_InputValues->SelectedGeometryPath); auto geomType = iNodeGeometry.getGeomType(); diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.hpp similarity index 61% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.hpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.hpp index 5f8b02ec55..a59c27049e 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.hpp @@ -15,7 +15,7 @@ namespace fs = std::filesystem; namespace nx::core { -struct SIMPLNXCORE_EXPORT WriteNodesAndElementsFileInputValues +struct SIMPLNXCORE_EXPORT WriteNodesAndElementsFilesInputValues { DataPath SelectedGeometryPath; bool WriteNodeFile; @@ -31,16 +31,16 @@ struct SIMPLNXCORE_EXPORT WriteNodesAndElementsFileInputValues /** * @class */ -class SIMPLNXCORE_EXPORT WriteNodesAndElementsFile +class SIMPLNXCORE_EXPORT WriteNodesAndElementsFiles { public: - WriteNodesAndElementsFile(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, WriteNodesAndElementsFileInputValues* inputValues); - ~WriteNodesAndElementsFile() noexcept; + WriteNodesAndElementsFiles(DataStructure& dataStructure, const IFilter::MessageHandler& mesgHandler, const std::atomic_bool& shouldCancel, WriteNodesAndElementsFilesInputValues* inputValues); + ~WriteNodesAndElementsFiles() noexcept; - WriteNodesAndElementsFile(const WriteNodesAndElementsFile&) = delete; - WriteNodesAndElementsFile(WriteNodesAndElementsFile&&) noexcept = delete; - WriteNodesAndElementsFile& operator=(const WriteNodesAndElementsFile&) = delete; - WriteNodesAndElementsFile& operator=(WriteNodesAndElementsFile&&) noexcept = delete; + WriteNodesAndElementsFiles(const WriteNodesAndElementsFiles&) = delete; + WriteNodesAndElementsFiles(WriteNodesAndElementsFiles&&) noexcept = delete; + WriteNodesAndElementsFiles& operator=(const WriteNodesAndElementsFiles&) = delete; + WriteNodesAndElementsFiles& operator=(WriteNodesAndElementsFiles&&) noexcept = delete; enum class ErrorCodes : int64 { @@ -58,7 +58,7 @@ class SIMPLNXCORE_EXPORT WriteNodesAndElementsFile private: DataStructure& m_DataStructure; - const WriteNodesAndElementsFileInputValues* m_InputValues = nullptr; + const WriteNodesAndElementsFilesInputValues* m_InputValues = nullptr; const std::atomic_bool& m_ShouldCancel; const IFilter::MessageHandler& m_MessageHandler; }; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFileFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFilesFilter.cpp similarity index 80% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFileFilter.cpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFilesFilter.cpp index ddf2438fbe..251609a985 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFileFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFilesFilter.cpp @@ -1,4 +1,4 @@ -#include "WriteNodesAndElementsFileFilter.hpp" +#include "WriteNodesAndElementsFilesFilter.hpp" #include "simplnx/Common/TypeTraits.hpp" #include "simplnx/DataStructure/DataGroup.hpp" @@ -9,7 +9,7 @@ #include "simplnx/Pipeline/PipelineFilter.hpp" #include "simplnx/Utilities/SIMPLConversion.hpp" -#include "SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.hpp" +#include "SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.hpp" #include namespace fs = std::filesystem; @@ -17,37 +17,37 @@ namespace fs = std::filesystem; namespace nx::core { //------------------------------------------------------------------------------ -std::string WriteNodesAndElementsFileFilter::name() const +std::string WriteNodesAndElementsFilesFilter::name() const { - return FilterTraits::name; + return FilterTraits::name; } //------------------------------------------------------------------------------ -std::string WriteNodesAndElementsFileFilter::className() const +std::string WriteNodesAndElementsFilesFilter::className() const { - return FilterTraits::className; + return FilterTraits::className; } //------------------------------------------------------------------------------ -Uuid WriteNodesAndElementsFileFilter::uuid() const +Uuid WriteNodesAndElementsFilesFilter::uuid() const { - return FilterTraits::uuid; + return FilterTraits::uuid; } //------------------------------------------------------------------------------ -std::string WriteNodesAndElementsFileFilter::humanName() const +std::string WriteNodesAndElementsFilesFilter::humanName() const { return "Write Nodes And Elements File(s)"; } //------------------------------------------------------------------------------ -std::vector WriteNodesAndElementsFileFilter::defaultTags() const +std::vector WriteNodesAndElementsFilesFilter::defaultTags() const { return {className(), "IO", "Output", "Write", "Export", "Nodes", "Elements", "Cells", "Vertices", "Geometry"}; } //------------------------------------------------------------------------------ -Parameters WriteNodesAndElementsFileFilter::parameters() const +Parameters WriteNodesAndElementsFilesFilter::parameters() const { Parameters params; @@ -80,20 +80,20 @@ Parameters WriteNodesAndElementsFileFilter::parameters() const } //------------------------------------------------------------------------------ -IFilter::VersionType WriteNodesAndElementsFileFilter::parametersVersion() const +IFilter::VersionType WriteNodesAndElementsFilesFilter::parametersVersion() const { return 1; } //------------------------------------------------------------------------------ -IFilter::UniquePointer WriteNodesAndElementsFileFilter::clone() const +IFilter::UniquePointer WriteNodesAndElementsFilesFilter::clone() const { - return std::make_unique(); + return std::make_unique(); } //------------------------------------------------------------------------------ -IFilter::PreflightResult WriteNodesAndElementsFileFilter::preflightImpl(const DataStructure& dataStructure, const Arguments& args, const MessageHandler& messageHandler, - const std::atomic_bool& shouldCancel) const +IFilter::PreflightResult WriteNodesAndElementsFilesFilter::preflightImpl(const DataStructure& dataStructure, const Arguments& args, const MessageHandler& messageHandler, + const std::atomic_bool& shouldCancel) const { DataPath selectedGeometryPath = args.value(k_SelectedGeometry); bool writeNodeFile = args.value(k_WriteNodeFile); @@ -105,7 +105,7 @@ IFilter::PreflightResult WriteNodesAndElementsFileFilter::preflightImpl(const Da if(!writeNodeFile && !writeElementFile) { - return {MakeErrorResult(to_underlying(WriteNodesAndElementsFile::ErrorCodes::NoFileWriterChosen), + return {MakeErrorResult(to_underlying(WriteNodesAndElementsFiles::ErrorCodes::NoFileWriterChosen), "Neither 'Write Node File' nor 'Write Element/Cell File' have been chosen. Please choose at least one of these options.")}; } @@ -113,7 +113,7 @@ IFilter::PreflightResult WriteNodesAndElementsFileFilter::preflightImpl(const Da if(selectedGeometry.getGeomType() == IGeometry::Type::Vertex && writeElementFile) { return {MakeErrorResult( - to_underlying(WriteNodesAndElementsFile::ErrorCodes::VertexGeomHasNoElements), + to_underlying(WriteNodesAndElementsFiles::ErrorCodes::VertexGeomHasNoElements), "The selected geometry is a vertex geometry, so an element file cannot be written. Please turn off 'Write Element/Cell File' or select a different geometry with a type other than Vertex.")}; } @@ -121,10 +121,10 @@ IFilter::PreflightResult WriteNodesAndElementsFileFilter::preflightImpl(const Da } //------------------------------------------------------------------------------ -Result<> WriteNodesAndElementsFileFilter::executeImpl(DataStructure& dataStructure, const Arguments& args, const PipelineFilter* pipelineNode, const MessageHandler& messageHandler, - const std::atomic_bool& shouldCancel) const +Result<> WriteNodesAndElementsFilesFilter::executeImpl(DataStructure& dataStructure, const Arguments& args, const PipelineFilter* pipelineNode, const MessageHandler& messageHandler, + const std::atomic_bool& shouldCancel) const { - WriteNodesAndElementsFileInputValues inputValues; + WriteNodesAndElementsFilesInputValues inputValues; inputValues.SelectedGeometryPath = args.value(k_SelectedGeometry); inputValues.WriteNodeFile = args.value(k_WriteNodeFile); @@ -136,6 +136,6 @@ Result<> WriteNodesAndElementsFileFilter::executeImpl(DataStructure& dataStructu inputValues.IncludeElementFileHeader = args.value(k_IncludeElementFileHeader); inputValues.ElementFilePath = args.value(k_ElementFilePath); - return WriteNodesAndElementsFile(dataStructure, messageHandler, shouldCancel, &inputValues)(); + return WriteNodesAndElementsFiles(dataStructure, messageHandler, shouldCancel, &inputValues)(); } } // namespace nx::core diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFileFilter.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFilesFilter.hpp similarity index 79% rename from src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFileFilter.hpp rename to src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFilesFilter.hpp index 9a2fe9d806..7ec09b1871 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFileFilter.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/WriteNodesAndElementsFilesFilter.hpp @@ -10,21 +10,21 @@ namespace nx::core { /** - * @class WriteNodesAndElementsFileFilter - * @brief The WriteNodesAndElementsFileFilter is an IFilter class designed to export the + * @class WriteNodesAndElementsFilesFilter + * @brief The WriteNodesAndElementsFilesFilter is an IFilter class designed to export the * DataStructure to a target HDF5 file. */ -class SIMPLNXCORE_EXPORT WriteNodesAndElementsFileFilter : public IFilter +class SIMPLNXCORE_EXPORT WriteNodesAndElementsFilesFilter : public IFilter { public: - WriteNodesAndElementsFileFilter() = default; - ~WriteNodesAndElementsFileFilter() noexcept override = default; + WriteNodesAndElementsFilesFilter() = default; + ~WriteNodesAndElementsFilesFilter() noexcept override = default; - WriteNodesAndElementsFileFilter(const WriteNodesAndElementsFileFilter&) = delete; - WriteNodesAndElementsFileFilter(WriteNodesAndElementsFileFilter&&) noexcept = delete; + WriteNodesAndElementsFilesFilter(const WriteNodesAndElementsFilesFilter&) = delete; + WriteNodesAndElementsFilesFilter(WriteNodesAndElementsFilesFilter&&) noexcept = delete; - WriteNodesAndElementsFileFilter& operator=(const WriteNodesAndElementsFileFilter&) = delete; - WriteNodesAndElementsFileFilter& operator=(WriteNodesAndElementsFileFilter&&) noexcept = delete; + WriteNodesAndElementsFilesFilter& operator=(const WriteNodesAndElementsFilesFilter&) = delete; + WriteNodesAndElementsFilesFilter& operator=(WriteNodesAndElementsFilesFilter&&) noexcept = delete; // Parameter Keys static inline constexpr StringLiteral k_SelectedGeometry = "selected_geometry_path"; @@ -57,7 +57,7 @@ class SIMPLNXCORE_EXPORT WriteNodesAndElementsFileFilter : public IFilter std::string className() const override; /** - * @brief Returns the WriteNodesAndElementsFileFilter class's UUID. + * @brief Returns the WriteNodesAndElementsFilesFilter class's UUID. * @return Uuid */ Uuid uuid() const override; @@ -119,4 +119,4 @@ class SIMPLNXCORE_EXPORT WriteNodesAndElementsFileFilter : public IFilter }; } // namespace nx::core -SIMPLNX_DEF_FILTER_TRAITS(nx::core, WriteNodesAndElementsFileFilter, "8c563174-0183-45fe-8ef8-756104f215d5"); +SIMPLNX_DEF_FILTER_TRAITS(nx::core, WriteNodesAndElementsFilesFilter, "8c563174-0183-45fe-8ef8-756104f215d5"); diff --git a/src/Plugins/SimplnxCore/test/CMakeLists.txt b/src/Plugins/SimplnxCore/test/CMakeLists.txt index 7e59448934..1cdd3295fa 100644 --- a/src/Plugins/SimplnxCore/test/CMakeLists.txt +++ b/src/Plugins/SimplnxCore/test/CMakeLists.txt @@ -137,7 +137,7 @@ set(${PLUGIN_NAME}UnitTest_SRCS WriteBinaryDataTest.cpp WriteFeatureDataCSVTest.cpp WriteLosAlamosFFTTest.cpp - WriteNodesAndElementsFileTest.cpp + WriteNodesAndElementsFilesTest.cpp WriteStlFileTest.cpp WriteVtkRectilinearGridTest.cpp ) diff --git a/src/Plugins/SimplnxCore/test/WriteNodesAndElementsFileTest.cpp b/src/Plugins/SimplnxCore/test/WriteNodesAndElementsFilesTest.cpp similarity index 66% rename from src/Plugins/SimplnxCore/test/WriteNodesAndElementsFileTest.cpp rename to src/Plugins/SimplnxCore/test/WriteNodesAndElementsFilesTest.cpp index 69e2fd62e1..0a27d3e3f5 100644 --- a/src/Plugins/SimplnxCore/test/WriteNodesAndElementsFileTest.cpp +++ b/src/Plugins/SimplnxCore/test/WriteNodesAndElementsFilesTest.cpp @@ -1,7 +1,7 @@ #include -#include "SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFile.hpp" -#include "SimplnxCore/Filters/WriteNodesAndElementsFileFilter.hpp" +#include "SimplnxCore/Filters/Algorithms/WriteNodesAndElementsFiles.hpp" +#include "SimplnxCore/Filters/WriteNodesAndElementsFilesFilter.hpp" #include "SimplnxCore/SimplnxCore_test_dirs.hpp" #include "simplnx/DataStructure/Geometry/EdgeGeom.hpp" @@ -93,10 +93,10 @@ void ValidateFile(const fs::path& filePath, const std::vector& expe } } // namespace -TEST_CASE("SimplnxCore::WriteNodesAndElementsFileFilter: Valid Execution", "[SimplnxCore][WriteNodesAndElementsFileFilter]") +TEST_CASE("SimplnxCore::WriteNodesAndElementsFilesFilter: Valid Execution", "[SimplnxCore][WriteNodesAndElementsFilesFilter]") { // Instantiate the filter, a DataStructure object and an Arguments Object - WriteNodesAndElementsFileFilter filter; + WriteNodesAndElementsFilesFilter filter; DataStructure dataStructure; Arguments args; @@ -148,15 +148,15 @@ TEST_CASE("SimplnxCore::WriteNodesAndElementsFileFilter: Valid Execution", "[Sim } // Create default Parameters for the filter. - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_SelectedGeometry, std::make_any(k_GeometryPath)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_WriteNodeFile, std::make_any(writeNodeFile)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NumberNodes, std::make_any(numberNodes)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_IncludeNodeFileHeader, std::make_any(includeNodeFileHeader)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NodeFilePath, std::make_any(k_OutputNodeFilePath)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_WriteElementFile, std::make_any(writeElementFile)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NumberElements, std::make_any(numberElements)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_IncludeElementFileHeader, std::make_any(includeElementFileHeader)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_ElementFilePath, std::make_any(k_OutputElementFilePath)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_SelectedGeometry, std::make_any(k_GeometryPath)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_WriteNodeFile, std::make_any(writeNodeFile)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NumberNodes, std::make_any(numberNodes)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_IncludeNodeFileHeader, std::make_any(includeNodeFileHeader)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NodeFilePath, std::make_any(k_OutputNodeFilePath)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_WriteElementFile, std::make_any(writeElementFile)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NumberElements, std::make_any(numberElements)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_IncludeElementFileHeader, std::make_any(includeElementFileHeader)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_ElementFilePath, std::make_any(k_OutputElementFilePath)); // Preflight the filter and check result auto preflightResult = filter.preflight(dataStructure, args); @@ -201,10 +201,10 @@ TEST_CASE("SimplnxCore::WriteNodesAndElementsFileFilter: Valid Execution", "[Sim Cleanup(); } -TEST_CASE("SimplnxCore::WriteNodesAndElementsFileFilter: Invalid Execution", "[SimplnxCore][WriteNodesAndElementsFileFilter]") +TEST_CASE("SimplnxCore::WriteNodesAndElementsFilesFilter: Invalid Execution", "[SimplnxCore][WriteNodesAndElementsFilesFilter]") { // Instantiate the filter, a DataStructure object and an Arguments Object - WriteNodesAndElementsFileFilter filter; + WriteNodesAndElementsFilesFilter filter; DataStructure dataStructure; Arguments args; @@ -213,31 +213,31 @@ TEST_CASE("SimplnxCore::WriteNodesAndElementsFileFilter: Invalid Execution", "[S SECTION("No File Writer Chosen") { CreateEdgeGeometry(dataStructure); - code = to_underlying(WriteNodesAndElementsFile::ErrorCodes::NoFileWriterChosen); - - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_WriteNodeFile, std::make_any(false)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NumberNodes, std::make_any(true)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_IncludeNodeFileHeader, std::make_any(true)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_WriteElementFile, std::make_any(false)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NumberElements, std::make_any(true)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_IncludeElementFileHeader, std::make_any(true)); + code = to_underlying(WriteNodesAndElementsFiles::ErrorCodes::NoFileWriterChosen); + + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_WriteNodeFile, std::make_any(false)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NumberNodes, std::make_any(true)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_IncludeNodeFileHeader, std::make_any(true)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_WriteElementFile, std::make_any(false)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NumberElements, std::make_any(true)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_IncludeElementFileHeader, std::make_any(true)); } SECTION("Writing A Node File Using A Vertex Geometry") { CreateVertexGeometry(dataStructure); - code = to_underlying(WriteNodesAndElementsFile::ErrorCodes::VertexGeomHasNoElements); - - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_WriteNodeFile, std::make_any(false)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NumberNodes, std::make_any(true)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_IncludeNodeFileHeader, std::make_any(true)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_WriteElementFile, std::make_any(true)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NumberElements, std::make_any(true)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_IncludeElementFileHeader, std::make_any(true)); + code = to_underlying(WriteNodesAndElementsFiles::ErrorCodes::VertexGeomHasNoElements); + + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_WriteNodeFile, std::make_any(false)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NumberNodes, std::make_any(true)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_IncludeNodeFileHeader, std::make_any(true)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_WriteElementFile, std::make_any(true)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NumberElements, std::make_any(true)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_IncludeElementFileHeader, std::make_any(true)); } - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_SelectedGeometry, std::make_any(k_GeometryPath)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_NodeFilePath, std::make_any(k_OutputNodeFilePath)); - args.insertOrAssign(WriteNodesAndElementsFileFilter::k_ElementFilePath, std::make_any(k_OutputElementFilePath)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_SelectedGeometry, std::make_any(k_GeometryPath)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_NodeFilePath, std::make_any(k_OutputNodeFilePath)); + args.insertOrAssign(WriteNodesAndElementsFilesFilter::k_ElementFilePath, std::make_any(k_OutputElementFilePath)); // Preflight the filter and check result auto preflightResult = filter.preflight(dataStructure, args);