diff --git a/.clang-tidy b/.clang-tidy index 6deb521be..6919bf1b2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -9,20 +9,15 @@ Checks: > cppcoreguidelines-*, -cppcoreguidelines-avoid-const-or-ref-data-members, -cppcoreguidelines-non-private-member-variables-in-classes, - -cppcoreguidelines-avoid-magic-numbers, hicpp-*, misc-*, -misc-non-private-member-variables-in-classes, - -misc-include-cleaner, modernize-*, -modernize-use-trailing-return-type, mpi-*, performance-*, readability-*, -readability-else-after-return, - -readability-static-accessed-through-instance, - -readability-avoid-const-params-in-decls, - -readability-magic-numbers, -readability-identifier-length, WarningsAsErrors: '*' diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 7d8351abd..54878cf9b 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - master + - devel concurrency: group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index bf79c062f..e5ca9143e 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - master + - devel types: - opened - reopened diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 25e31ad7d..aea6f047a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - master + - devel types: - opened - reopened diff --git a/VERSION b/VERSION index 52eaf772a..1c0d35b25 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5-pre +3.0-pre diff --git a/applications/CHAC_anisotropy/customPDE.h b/applications/CHAC_anisotropy/customPDE.h index c55aed029..d68af692b 100644 --- a/applications/CHAC_anisotropy/customPDE.h +++ b/applications/CHAC_anisotropy/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHAC_anisotropyRegularized/customPDE.h b/applications/CHAC_anisotropyRegularized/customPDE.h index 016c952a3..b39bc9701 100644 --- a/applications/CHAC_anisotropyRegularized/customPDE.h +++ b/applications/CHAC_anisotropyRegularized/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHAC_performance_test/customPDE.h b/applications/CHAC_performance_test/customPDE.h index e83b8b4b5..c87307e06 100644 --- a/applications/CHAC_performance_test/customPDE.h +++ b/applications/CHAC_performance_test/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/customPDE.h index c7bebfc80..77d36eb36 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1a/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/customPDE.h index c7bebfc80..77d36eb36 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1b/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/customPDE.h index 43bc11487..78bd368e1 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark1c/customPDE.h @@ -1,6 +1,6 @@ #include -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -31,7 +31,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/customPDE.h index 35efe0f35..98526cacc 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark2a/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/customPDE.h index 7193d7a02..4d9845395 100755 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark3a/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/customPDE.h index 533bb88c0..5f4e54371 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6a/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/customPDE.h index 9afd1da6f..1e9c70510 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark6b/customPDE.h @@ -1,7 +1,7 @@ #include #include -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -32,7 +32,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/customPDE.h b/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/customPDE.h index f63b270ef..272eef523 100644 --- a/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/customPDE.h +++ b/applications/CHiMaD_benchmarks/CHiMaD_benchmark7a/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/MgNd_precipitate_single_Bppp/customPDE.h b/applications/MgNd_precipitate_single_Bppp/customPDE.h index af13d1794..8d1655cfd 100644 --- a/applications/MgNd_precipitate_single_Bppp/customPDE.h +++ b/applications/MgNd_precipitate_single_Bppp/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -41,7 +41,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/allenCahn/customPDE.h b/applications/allenCahn/customPDE.h index 8a08cc33e..5bf769a15 100644 --- a/applications/allenCahn/customPDE.h +++ b/applications/allenCahn/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/allenCahn_conserved/customPDE.h b/applications/allenCahn_conserved/customPDE.h index 5812e5bc7..aef59ab4e 100644 --- a/applications/allenCahn_conserved/customPDE.h +++ b/applications/allenCahn_conserved/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/alloySolidification/customPDE.h b/applications/alloySolidification/customPDE.h index 23c6c3e81..c57453744 100644 --- a/applications/alloySolidification/customPDE.h +++ b/applications/alloySolidification/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/alloySolidification_uniform/customPDE.h b/applications/alloySolidification_uniform/customPDE.h index fe4bc994a..030117880 100644 --- a/applications/alloySolidification_uniform/customPDE.h +++ b/applications/alloySolidification_uniform/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/anisotropyFacet/customPDE.h b/applications/anisotropyFacet/customPDE.h index 1adcf50be..4778c29ae 100644 --- a/applications/anisotropyFacet/customPDE.h +++ b/applications/anisotropyFacet/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/cahnHilliard/customPDE.h b/applications/cahnHilliard/customPDE.h index c2bf3bf41..96e6e324b 100644 --- a/applications/cahnHilliard/customPDE.h +++ b/applications/cahnHilliard/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/corrosion/customPDE.h b/applications/corrosion/customPDE.h index 83d895b91..c07b7219b 100644 --- a/applications/corrosion/customPDE.h +++ b/applications/corrosion/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/corrosion_microgalvanic/customPDE.h b/applications/corrosion_microgalvanic/customPDE.h index 256728642..a4edcbf5d 100644 --- a/applications/corrosion_microgalvanic/customPDE.h +++ b/applications/corrosion_microgalvanic/customPDE.h @@ -1,6 +1,5 @@ -#include "matrixFreePDE.h" - #include +#include #include using namespace std; @@ -31,7 +30,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] dealii::Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/coupledCahnHilliardAllenCahn/customPDE.h b/applications/coupledCahnHilliardAllenCahn/customPDE.h index e83b8b4b5..c87307e06 100644 --- a/applications/coupledCahnHilliardAllenCahn/customPDE.h +++ b/applications/coupledCahnHilliardAllenCahn/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/dendriticSolidification/customPDE.h b/applications/dendriticSolidification/customPDE.h index 7193d7a02..4d9845395 100644 --- a/applications/dendriticSolidification/customPDE.h +++ b/applications/dendriticSolidification/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/eshelbyInclusion/customPDE.h b/applications/eshelbyInclusion/customPDE.h index 07f3a40ea..df8fc6ae3 100644 --- a/applications/eshelbyInclusion/customPDE.h +++ b/applications/eshelbyInclusion/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/fickianDiffusion/customPDE.h b/applications/fickianDiffusion/customPDE.h index 83b0fe738..abe5fb20c 100644 --- a/applications/fickianDiffusion/customPDE.h +++ b/applications/fickianDiffusion/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/grainGrowth/customPDE.h b/applications/grainGrowth/customPDE.h index 8665df4b0..38a1580a0 100644 --- a/applications/grainGrowth/customPDE.h +++ b/applications/grainGrowth/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/grainGrowth_dream3d/customPDE.h b/applications/grainGrowth_dream3d/customPDE.h index 8665df4b0..38a1580a0 100644 --- a/applications/grainGrowth_dream3d/customPDE.h +++ b/applications/grainGrowth_dream3d/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/main.cc b/applications/main.cc index 5f5514d14..e22680a54 100644 --- a/applications/main.cc +++ b/applications/main.cc @@ -2,10 +2,11 @@ #include "customPDE.h" #include "ICs_and_BCs.cc" -#include "ParseCommandLineOpts.h" #include "equations.cc" -#include "inputFileReader.h" -#include "variableAttributeLoader/variableAttributeLoader.cc" + +#include +#include +#include // Header file for postprocessing that may or may not exist #ifdef POSTPROCESS_FILE_EXISTS diff --git a/applications/mechanics/customPDE.h b/applications/mechanics/customPDE.h index 07f3a40ea..df8fc6ae3 100644 --- a/applications/mechanics/customPDE.h +++ b/applications/mechanics/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/nucleationModel/customPDE.h b/applications/nucleationModel/customPDE.h index bd3a5bcec..542600a51 100644 --- a/applications/nucleationModel/customPDE.h +++ b/applications/nucleationModel/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -28,7 +28,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/nucleationModel_preferential/customPDE.h b/applications/nucleationModel_preferential/customPDE.h index 1fcca29cc..0775b79f7 100644 --- a/applications/nucleationModel_preferential/customPDE.h +++ b/applications/nucleationModel_preferential/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -28,7 +28,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/precipitateEvolution/customPDE.h b/applications/precipitateEvolution/customPDE.h index 6f15d6c46..3c72a72e1 100644 --- a/applications/precipitateEvolution/customPDE.h +++ b/applications/precipitateEvolution/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -27,7 +27,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/precipitateEvolution_pfunction/PLibrary/PLibrary.hh b/applications/precipitateEvolution_pfunction/PLibrary/PLibrary.hh index 429fa896f..488e936cc 100644 --- a/applications/precipitateEvolution_pfunction/PLibrary/PLibrary.hh +++ b/applications/precipitateEvolution_pfunction/PLibrary/PLibrary.hh @@ -6,9 +6,9 @@ #ifndef PLIBRARY_HH #define PLIBRARY_HH -#include "../../../include/IntegrationTools/PFunction.hh" -#include "../../../include/IntegrationTools/PPieceWise.hh" #include +#include +#include namespace PRISMS { diff --git a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_McV.hh b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_McV.hh index 5faba57b2..24892f24c 100644 --- a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_McV.hh +++ b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_McV.hh @@ -6,9 +6,9 @@ #ifndef pfunct_McV_HH #define pfunct_McV_HH -#include "../../../include/IntegrationTools/PFunction.hh" #include #include +#include namespace PRISMS { diff --git a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn1V.hh b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn1V.hh index a1c8c2460..05e6dd063 100644 --- a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn1V.hh +++ b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn1V.hh @@ -6,9 +6,9 @@ #ifndef pfunct_Mn1V_HH #define pfunct_Mn1V_HH -#include "../../../include/IntegrationTools/PFunction.hh" #include #include +#include namespace PRISMS { diff --git a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn2V.hh b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn2V.hh index 1d5d86b8e..7439b6093 100644 --- a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn2V.hh +++ b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn2V.hh @@ -6,9 +6,9 @@ #ifndef pfunct_Mn2V_HH #define pfunct_Mn2V_HH -#include "../../../include/IntegrationTools/PFunction.hh" #include #include +#include namespace PRISMS { diff --git a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn3V.hh b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn3V.hh index 5ffe9207a..ae765e522 100644 --- a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn3V.hh +++ b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_Mn3V.hh @@ -6,9 +6,9 @@ #ifndef pfunct_Mn3V_HH #define pfunct_Mn3V_HH -#include "../../../include/IntegrationTools/PFunction.hh" #include #include +#include namespace PRISMS { diff --git a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_faV.hh b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_faV.hh index e3b6cdf3d..8b9d14008 100644 --- a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_faV.hh +++ b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_faV.hh @@ -6,9 +6,9 @@ #ifndef pfunct_faV_HH #define pfunct_faV_HH -#include "../../../include/IntegrationTools/PFunction.hh" #include #include +#include namespace PRISMS { diff --git a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_fbV.hh b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_fbV.hh index ce90a1c82..dcf1f9ef2 100644 --- a/applications/precipitateEvolution_pfunction/PLibrary/pfunct_fbV.hh +++ b/applications/precipitateEvolution_pfunction/PLibrary/pfunct_fbV.hh @@ -6,9 +6,9 @@ #ifndef pfunct_fbV_HH #define pfunct_fbV_HH -#include "../../../include/IntegrationTools/PFunction.hh" #include #include +#include namespace PRISMS { diff --git a/applications/precipitateEvolution_pfunction/customPDE.h b/applications/precipitateEvolution_pfunction/customPDE.h index 969f98d04..2985af610 100644 --- a/applications/precipitateEvolution_pfunction/customPDE.h +++ b/applications/precipitateEvolution_pfunction/customPDE.h @@ -1,4 +1,4 @@ -#include "matrixFreePDE.h" +#include using namespace dealii; @@ -6,7 +6,8 @@ using namespace dealii; typedef VectorizedArray scalarvalueType; #include "PLibrary/PLibrary.cc" #include "PLibrary/PLibrary.hh" -#include "pFunction/pFunction.h" + +#include // Declare the PFunctions to be used PFunctions::pFunction pfunct_McV("pfunct_McV"), pfunct_Mn1V("pfunct_Mn1V"), @@ -38,7 +39,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/applications/spinodalDecomposition/customPDE.h b/applications/spinodalDecomposition/customPDE.h index 92f03c4a9..f6affd946 100644 --- a/applications/spinodalDecomposition/customPDE.h +++ b/applications/spinodalDecomposition/customPDE.h @@ -1,5 +1,4 @@ -#include "matrixFreePDE.h" - +#include #include using namespace dealii; @@ -42,7 +41,7 @@ class customPDE : public MatrixFreePDE typedef std::uniform_real_distribution distribution; private: -#include "typeDefs.h" +#include const userInputParameters userInputs; diff --git a/postprocess_scripts/README.md b/contrib/postprocessing/README.md similarity index 100% rename from postprocess_scripts/README.md rename to contrib/postprocessing/README.md diff --git a/postprocess_scripts/domain_stats.py b/contrib/postprocessing/domain_stats.py similarity index 100% rename from postprocess_scripts/domain_stats.py rename to contrib/postprocessing/domain_stats.py diff --git a/postprocess_scripts/interface_area.py b/contrib/postprocessing/interface_area.py similarity index 100% rename from postprocess_scripts/interface_area.py rename to contrib/postprocessing/interface_area.py diff --git a/postprocess_scripts/phase_fraction.py b/contrib/postprocessing/phase_fraction.py similarity index 100% rename from postprocess_scripts/phase_fraction.py rename to contrib/postprocessing/phase_fraction.py diff --git a/postprocess_scripts/plot_and_save.py b/contrib/postprocessing/plot_and_save.py similarity index 100% rename from postprocess_scripts/plot_and_save.py rename to contrib/postprocessing/plot_and_save.py diff --git a/postprocess_scripts/splitvtufiles.py b/contrib/postprocessing/splitvtufiles.py similarity index 100% rename from postprocess_scripts/splitvtufiles.py rename to contrib/postprocessing/splitvtufiles.py diff --git a/postprocess_scripts/vtutopython.py b/contrib/postprocessing/vtutopython.py similarity index 100% rename from postprocess_scripts/vtutopython.py rename to contrib/postprocessing/vtutopython.py diff --git a/include/ParseCommandLineOpts.h b/include/core/ParseCommandLineOpts.h similarity index 99% rename from include/ParseCommandLineOpts.h rename to include/core/ParseCommandLineOpts.h index bf985f0a9..bd17defec 100644 --- a/include/ParseCommandLineOpts.h +++ b/include/core/ParseCommandLineOpts.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #include diff --git a/include/nonUniformDirichletBC.h b/include/core/boundary_conditions/nonUniformDirichletBC.h similarity index 97% rename from include/nonUniformDirichletBC.h rename to include/core/boundary_conditions/nonUniformDirichletBC.h index af0259c26..c043abacc 100644 --- a/include/nonUniformDirichletBC.h +++ b/include/core/boundary_conditions/nonUniformDirichletBC.h @@ -1,8 +1,7 @@ #ifndef INCLUDE_NONUNIFORMDIRICHLETBCS_H_ #define INCLUDE_NONUNIFORMDIRICHLETBCS_H_ -#include "matrixFreePDE.h" -#include "userInputParameters.h" +#include template class NonUniformDirichletBC : public dealii::Function diff --git a/include/varBCs.h b/include/core/boundary_conditions/varBCs.h similarity index 95% rename from include/varBCs.h rename to include/core/boundary_conditions/varBCs.h index 8138f7565..d1f0beb1a 100644 --- a/include/varBCs.h +++ b/include/core/boundary_conditions/varBCs.h @@ -8,6 +8,8 @@ #ifndef INCLUDE_VARBCS_H_ #define INCLUDE_VARBCS_H_ +#include + // BC type enum enum BC_type { diff --git a/include/vectorBCFunction.h b/include/core/boundary_conditions/vectorBCFunction.h similarity index 100% rename from include/vectorBCFunction.h rename to include/core/boundary_conditions/vectorBCFunction.h diff --git a/include/core/checkpoint.h b/include/core/checkpoint.h new file mode 100644 index 000000000..e69de29bb diff --git a/include/fields.h b/include/core/fields.h similarity index 97% rename from include/fields.h rename to include/core/fields.h index fac1a722f..7875b3f55 100644 --- a/include/fields.h +++ b/include/core/fields.h @@ -3,7 +3,8 @@ #define FIELDS_H #include -#include "userInputParameters.h" +#include +#include template class Field diff --git a/include/initialConditions.h b/include/core/initial_conditions/initialConditions.h similarity index 96% rename from include/initialConditions.h rename to include/core/initial_conditions/initialConditions.h index 6bfc35d5a..8fab9daae 100644 --- a/include/initialConditions.h +++ b/include/core/initial_conditions/initialConditions.h @@ -8,8 +8,8 @@ #ifndef INCLUDE_INITIALCONDITIONS_H_ #define INCLUDE_INITIALCONDITIONS_H_ -#include "matrixFreePDE.h" -#include "userInputParameters.h" +#include +#include template class InitialCondition : public dealii::Function diff --git a/include/inputFileReader.h b/include/core/inputFileReader.h similarity index 97% rename from include/inputFileReader.h rename to include/core/inputFileReader.h index 6972e3ebd..3506b8d7d 100644 --- a/include/inputFileReader.h +++ b/include/core/inputFileReader.h @@ -5,9 +5,7 @@ #include -#include "variableAttributeLoader.h" - -#include +#include #include #include diff --git a/include/matrixFreePDE.h b/include/core/matrixFreePDE.h similarity index 97% rename from include/matrixFreePDE.h rename to include/core/matrixFreePDE.h index cdce12977..ced7900de 100644 --- a/include/matrixFreePDE.h +++ b/include/core/matrixFreePDE.h @@ -2,12 +2,6 @@ #ifndef MATRIXFREEPDE_H #define MATRIXFREEPDE_H -// general headers -#include -#include -#include -#include - // dealii headers #include #include @@ -36,15 +30,14 @@ #include // PRISMS headers -#include "AdaptiveRefinement.h" -#include "SimplifiedGrainRepresentation.h" -#include "fields.h" -#include "nucleus.h" -#include "userInputParameters.h" -#include "variableContainer.h" -#include "variableValueContainer.h" - -#include "../src/models/mechanics/computeStress.h" +#include +#include +#include +#include +#include +#include +#include +#include using namespace dealii; @@ -474,10 +467,6 @@ class MatrixFreePDE : public Subscriptor unsigned int getFieldIndex(std::string _name); - std::vector freeEnergyValues; - void - outputFreeEnergy(const std::vector &freeEnergyValues) const; - /*Method to compute the integral of a field.*/ void computeIntegral(double &integratedField, diff --git a/include/core/model_variables.h b/include/core/model_variables.h new file mode 100644 index 000000000..24aed7553 --- /dev/null +++ b/include/core/model_variables.h @@ -0,0 +1,22 @@ +// Model Variables Class + +#ifndef INCLUDE_MODELVARIABLE_H_ +#define INCLUDE_MODELVARIABLE_H_ + +#include +#include +#include + +struct variable_info +{ + unsigned int global_var_index = 0; + bool is_scalar = true; + bool var_needed = false; + + dealii::EvaluationFlags::EvaluationFlags evaluation_flags = + dealii::EvaluationFlags::nothing; + dealii::EvaluationFlags::EvaluationFlags residual_flags = + dealii::EvaluationFlags::nothing; +}; + +#endif /* INCLUDE_MODELVARIABLE_H_ */ diff --git a/include/core/postprocessing/placeholder.h b/include/core/postprocessing/placeholder.h new file mode 100644 index 000000000..e69de29bb diff --git a/include/AdaptiveRefinement.h b/include/core/refinement/AdaptiveRefinement.h similarity index 97% rename from include/AdaptiveRefinement.h rename to include/core/refinement/AdaptiveRefinement.h index 609a7716e..a5506d517 100644 --- a/include/AdaptiveRefinement.h +++ b/include/core/refinement/AdaptiveRefinement.h @@ -10,8 +10,8 @@ #include #include -#include "fields.h" -#include "userInputParameters.h" +#include +#include using namespace dealii; diff --git a/include/RefinementCriterion.h b/include/core/refinement/RefinementCriterion.h similarity index 100% rename from include/RefinementCriterion.h rename to include/core/refinement/RefinementCriterion.h diff --git a/include/SolverParameters.h b/include/core/solvers/SolverParameters.h similarity index 99% rename from include/SolverParameters.h rename to include/core/solvers/SolverParameters.h index 52c6a8b73..0d38528ae 100644 --- a/include/SolverParameters.h +++ b/include/core/solvers/SolverParameters.h @@ -1,7 +1,6 @@ #ifndef INCLUDE_NONLINEARSOLVERPARAMETERS_H_ #define INCLUDE_NONLINEARSOLVERPARAMETERS_H_ -#include #include enum SolverToleranceType diff --git a/include/core/solvers/solvers.h b/include/core/solvers/solvers.h new file mode 100644 index 000000000..e69de29bb diff --git a/include/core/triangulation.h b/include/core/triangulation.h new file mode 100644 index 000000000..e69de29bb diff --git a/include/typeDefs.h b/include/core/typeDefs.h similarity index 100% rename from include/typeDefs.h rename to include/core/typeDefs.h diff --git a/include/userInputParameters.h b/include/core/userInputParameters.h similarity index 98% rename from include/userInputParameters.h rename to include/core/userInputParameters.h index ede49518b..c27121cab 100644 --- a/include/userInputParameters.h +++ b/include/core/userInputParameters.h @@ -15,16 +15,13 @@ #include #include -#include "RefinementCriterion.h" -#include "SolverParameters.h" -#include "inputFileReader.h" -#include "model_variables.h" -#include "nucleationParameters.h" -#include "varBCs.h" -#include "varTypeEnums.h" -#include "variableAttributeLoader.h" - -#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/include/varTypeEnums.h b/include/core/varTypeEnums.h similarity index 100% rename from include/varTypeEnums.h rename to include/core/varTypeEnums.h diff --git a/include/variableAttributeLoader.h b/include/core/variableAttributeLoader.h similarity index 99% rename from include/variableAttributeLoader.h rename to include/core/variableAttributeLoader.h index 0ccc93fa7..17ecc8e7a 100644 --- a/include/variableAttributeLoader.h +++ b/include/core/variableAttributeLoader.h @@ -1,9 +1,8 @@ #ifndef VARIABLEATTRIBUTELOADER_H #define VARIABLEATTRIBUTELOADER_H -#include "varTypeEnums.h" -#include "variableAttributes.h" - +#include +#include #include #include diff --git a/include/variableAttributes.h b/include/core/variableAttributes.h similarity index 98% rename from include/variableAttributes.h rename to include/core/variableAttributes.h index ca663bc5f..05ad6a81f 100644 --- a/include/variableAttributes.h +++ b/include/core/variableAttributes.h @@ -3,8 +3,7 @@ #include -#include "varTypeEnums.h" - +#include #include #include #include diff --git a/include/variableContainer.h b/include/core/variableContainer.h similarity index 98% rename from include/variableContainer.h rename to include/core/variableContainer.h index e5a0fb9be..b96083965 100644 --- a/include/variableContainer.h +++ b/include/core/variableContainer.h @@ -11,13 +11,13 @@ #include -#include "userInputParameters.h" +#include template class variableContainer { public: -#include "typeDefs.h" +#include // Constructors // Standard contructor, used for most situations diff --git a/include/variableValueContainer.h b/include/core/variableValueContainer.h similarity index 100% rename from include/variableValueContainer.h rename to include/core/variableValueContainer.h diff --git a/include/IntegrationTools/LICENSE b/include/field_input/IntegrationTools/LICENSE similarity index 100% rename from include/IntegrationTools/LICENSE rename to include/field_input/IntegrationTools/LICENSE diff --git a/include/IntegrationTools/PExtern.hh b/include/field_input/IntegrationTools/PExtern.hh similarity index 100% rename from include/IntegrationTools/PExtern.hh rename to include/field_input/IntegrationTools/PExtern.hh diff --git a/include/IntegrationTools/PField.hh b/include/field_input/IntegrationTools/PField.hh similarity index 100% rename from include/IntegrationTools/PField.hh rename to include/field_input/IntegrationTools/PField.hh diff --git a/include/IntegrationTools/PFunction.hh b/include/field_input/IntegrationTools/PFunction.hh similarity index 100% rename from include/IntegrationTools/PFunction.hh rename to include/field_input/IntegrationTools/PFunction.hh diff --git a/include/IntegrationTools/PPieceWise.hh b/include/field_input/IntegrationTools/PPieceWise.hh similarity index 100% rename from include/IntegrationTools/PPieceWise.hh rename to include/field_input/IntegrationTools/PPieceWise.hh diff --git a/include/IntegrationTools/datastruc/Bin.hh b/include/field_input/IntegrationTools/datastruc/Bin.hh similarity index 100% rename from include/IntegrationTools/datastruc/Bin.hh rename to include/field_input/IntegrationTools/datastruc/Bin.hh diff --git a/include/IntegrationTools/datastruc/PNDArray.hh b/include/field_input/IntegrationTools/datastruc/PNDArray.hh similarity index 100% rename from include/IntegrationTools/datastruc/PNDArray.hh rename to include/field_input/IntegrationTools/datastruc/PNDArray.hh diff --git a/include/IntegrationTools/extern/PExtern.hh b/include/field_input/IntegrationTools/extern/PExtern.hh similarity index 100% rename from include/IntegrationTools/extern/PExtern.hh rename to include/field_input/IntegrationTools/extern/PExtern.hh diff --git a/include/IntegrationTools/extern/PLibraryExtern.hh b/include/field_input/IntegrationTools/extern/PLibraryExtern.hh similarity index 100% rename from include/IntegrationTools/extern/PLibraryExtern.hh rename to include/field_input/IntegrationTools/extern/PLibraryExtern.hh diff --git a/include/IntegrationTools/pfield/Body.hh b/include/field_input/IntegrationTools/pfield/Body.hh similarity index 100% rename from include/IntegrationTools/pfield/Body.hh rename to include/field_input/IntegrationTools/pfield/Body.hh diff --git a/include/IntegrationTools/pfield/Coordinate.hh b/include/field_input/IntegrationTools/pfield/Coordinate.hh similarity index 100% rename from include/IntegrationTools/pfield/Coordinate.hh rename to include/field_input/IntegrationTools/pfield/Coordinate.hh diff --git a/include/IntegrationTools/pfield/Mesh.hh b/include/field_input/IntegrationTools/pfield/Mesh.hh similarity index 100% rename from include/IntegrationTools/pfield/Mesh.hh rename to include/field_input/IntegrationTools/pfield/Mesh.hh diff --git a/include/IntegrationTools/pfield/PField.hh b/include/field_input/IntegrationTools/pfield/PField.hh similarity index 100% rename from include/IntegrationTools/pfield/PField.hh rename to include/field_input/IntegrationTools/pfield/PField.hh diff --git a/include/IntegrationTools/pfield/interpolation/Hexahedron.hh b/include/field_input/IntegrationTools/pfield/interpolation/Hexahedron.hh similarity index 100% rename from include/IntegrationTools/pfield/interpolation/Hexahedron.hh rename to include/field_input/IntegrationTools/pfield/interpolation/Hexahedron.hh diff --git a/include/IntegrationTools/pfield/interpolation/Interpolator.hh b/include/field_input/IntegrationTools/pfield/interpolation/Interpolator.hh similarity index 100% rename from include/IntegrationTools/pfield/interpolation/Interpolator.hh rename to include/field_input/IntegrationTools/pfield/interpolation/Interpolator.hh diff --git a/include/IntegrationTools/pfield/interpolation/Quad.hh b/include/field_input/IntegrationTools/pfield/interpolation/Quad.hh similarity index 100% rename from include/IntegrationTools/pfield/interpolation/Quad.hh rename to include/field_input/IntegrationTools/pfield/interpolation/Quad.hh diff --git a/include/IntegrationTools/pfunction/PBasisSet.hh b/include/field_input/IntegrationTools/pfunction/PBasisSet.hh similarity index 100% rename from include/IntegrationTools/pfunction/PBasisSet.hh rename to include/field_input/IntegrationTools/pfunction/PBasisSet.hh diff --git a/include/IntegrationTools/pfunction/PBasisSetBase.hh b/include/field_input/IntegrationTools/pfunction/PBasisSetBase.hh similarity index 100% rename from include/IntegrationTools/pfunction/PBasisSetBase.hh rename to include/field_input/IntegrationTools/pfunction/PBasisSetBase.hh diff --git a/include/IntegrationTools/pfunction/PFlexFunction.hh b/include/field_input/IntegrationTools/pfunction/PFlexFunction.hh similarity index 100% rename from include/IntegrationTools/pfunction/PFlexFunction.hh rename to include/field_input/IntegrationTools/pfunction/PFlexFunction.hh diff --git a/include/IntegrationTools/pfunction/PFuncBase.hh b/include/field_input/IntegrationTools/pfunction/PFuncBase.hh similarity index 100% rename from include/IntegrationTools/pfunction/PFuncBase.hh rename to include/field_input/IntegrationTools/pfunction/PFuncBase.hh diff --git a/include/IntegrationTools/pfunction/PFunction.hh b/include/field_input/IntegrationTools/pfunction/PFunction.hh similarity index 100% rename from include/IntegrationTools/pfunction/PFunction.hh rename to include/field_input/IntegrationTools/pfunction/PFunction.hh diff --git a/include/IntegrationTools/pfunction/PSeriesFunction.hh b/include/field_input/IntegrationTools/pfunction/PSeriesFunction.hh similarity index 100% rename from include/IntegrationTools/pfunction/PSeriesFunction.hh rename to include/field_input/IntegrationTools/pfunction/PSeriesFunction.hh diff --git a/include/IntegrationTools/pfunction/PSimpleBase.hh b/include/field_input/IntegrationTools/pfunction/PSimpleBase.hh similarity index 100% rename from include/IntegrationTools/pfunction/PSimpleBase.hh rename to include/field_input/IntegrationTools/pfunction/PSimpleBase.hh diff --git a/include/IntegrationTools/pfunction/PSimpleFunction.hh b/include/field_input/IntegrationTools/pfunction/PSimpleFunction.hh similarity index 100% rename from include/IntegrationTools/pfunction/PSimpleFunction.hh rename to include/field_input/IntegrationTools/pfunction/PSimpleFunction.hh diff --git a/include/IntegrationTools/piecewise/PPieceWiseFuncBase.hh b/include/field_input/IntegrationTools/piecewise/PPieceWiseFuncBase.hh similarity index 100% rename from include/IntegrationTools/piecewise/PPieceWiseFuncBase.hh rename to include/field_input/IntegrationTools/piecewise/PPieceWiseFuncBase.hh diff --git a/include/IntegrationTools/piecewise/PPieceWiseSimpleBase.hh b/include/field_input/IntegrationTools/piecewise/PPieceWiseSimpleBase.hh similarity index 100% rename from include/IntegrationTools/piecewise/PPieceWiseSimpleBase.hh rename to include/field_input/IntegrationTools/piecewise/PPieceWiseSimpleBase.hh diff --git a/include/IntegrationTools/piecewise/Piece.hh b/include/field_input/IntegrationTools/piecewise/Piece.hh similarity index 100% rename from include/IntegrationTools/piecewise/Piece.hh rename to include/field_input/IntegrationTools/piecewise/Piece.hh diff --git a/include/IntegrationTools/piecewise/SimplePiece.hh b/include/field_input/IntegrationTools/piecewise/SimplePiece.hh similarity index 100% rename from include/IntegrationTools/piecewise/SimplePiece.hh rename to include/field_input/IntegrationTools/piecewise/SimplePiece.hh diff --git a/src/pFunction/pFunction.h b/include/field_input/pFunction.h similarity index 94% rename from src/pFunction/pFunction.h rename to include/field_input/pFunction.h index 394e31020..cc7b4b5c7 100644 --- a/src/pFunction/pFunction.h +++ b/include/field_input/pFunction.h @@ -9,7 +9,7 @@ #include -#include "../../include/IntegrationTools/extern/PLibraryExtern.hh" +#include #include namespace PFunctions @@ -20,7 +20,7 @@ namespace PFunctions { public: // Constructor, wraps the IntegrationTools checkout function - pFunction(const std::string &function_name); + explicit pFunction(const std::string &function_name); // Returns the value of the function for a given input variable scalarvalueType val(scalarvalueType); diff --git a/include/FloodFiller.h b/include/grains/FloodFiller.h similarity index 100% rename from include/FloodFiller.h rename to include/grains/FloodFiller.h diff --git a/include/OrderParameterRemapper.h b/include/grains/OrderParameterRemapper.h similarity index 96% rename from include/OrderParameterRemapper.h rename to include/grains/OrderParameterRemapper.h index 5179f0544..57da86e64 100644 --- a/include/OrderParameterRemapper.h +++ b/include/grains/OrderParameterRemapper.h @@ -4,8 +4,7 @@ #include #include -#include "SimplifiedGrainRepresentation.h" - +#include #include /** diff --git a/include/SimplifiedGrainRepresentation.h b/include/grains/SimplifiedGrainRepresentation.h similarity index 99% rename from include/SimplifiedGrainRepresentation.h rename to include/grains/SimplifiedGrainRepresentation.h index cea6c76cd..6965ac476 100644 --- a/include/SimplifiedGrainRepresentation.h +++ b/include/grains/SimplifiedGrainRepresentation.h @@ -1,7 +1,7 @@ #ifndef INCLUDE_SIMPLIFIEDGRAINREPRESENTATION_H_ #define INCLUDE_SIMPLIFIEDGRAINREPRESENTATION_H_ -#include "FloodFiller.h" +#include /** * This class converts lists of grains and the vertices inside the grains to a diff --git a/include/model_variables.h b/include/model_variables.h deleted file mode 100644 index 9e5fe3da3..000000000 --- a/include/model_variables.h +++ /dev/null @@ -1,46 +0,0 @@ -// Model Variables Class - -#ifndef INCLUDE_MODELVARIABLE_H_ -#define INCLUDE_MODELVARIABLE_H_ - -#include -#include -#include - -template -class modelVariable -{ -public: - dealii::VectorizedArray scalarValue; - dealii::Tensor<1, dim, dealii::VectorizedArray> scalarGrad; - dealii::Tensor<2, dim, dealii::VectorizedArray> scalarHess; - - dealii::Tensor<1, dim, dealii::VectorizedArray> vectorValue; - dealii::Tensor<2, dim, dealii::VectorizedArray> vectorGrad; - dealii::Tensor<3, dim, dealii::VectorizedArray> vectorHess; -}; - -template -class modelResidual -{ -public: - dealii::VectorizedArray scalarValueResidual; - dealii::Tensor<1, dim, dealii::VectorizedArray> scalarGradResidual; - - dealii::Tensor<1, dim, dealii::VectorizedArray> vectorValueResidual; - dealii::Tensor<2, dim, dealii::VectorizedArray> vectorGradResidual; -}; - -struct variable_info -{ - unsigned int global_var_index = 0; - bool is_scalar = true; - bool var_needed = false; - - dealii::EvaluationFlags::EvaluationFlags evaluation_flags = - dealii::EvaluationFlags::nothing; - dealii::EvaluationFlags::EvaluationFlags residual_flags = - dealii::EvaluationFlags::nothing; -}; - -#endif /* INCLUDE_MODELVARIABLE_H_ */ diff --git a/include/nucleationParameters.h b/include/nucleation/nucleationParameters.h similarity index 83% rename from include/nucleationParameters.h rename to include/nucleation/nucleationParameters.h index 1134af3fa..fd6f418aa 100644 --- a/include/nucleationParameters.h +++ b/include/nucleation/nucleationParameters.h @@ -1,6 +1,11 @@ #ifndef INCLUDE_NUCLEATIONPARAMETERS_H_ #define INCLUDE_NUCLEATIONPARAMETERS_H_ +#include + +#include +#include + template class nucleationParameters { @@ -19,14 +24,13 @@ class nucleationParameters std::vector _ellipsoid_rotation, double _hold_time, double _no_nucleation_border_thickness) + : var_index(_var_index) + , semiaxes(std::move(_semiaxes)) + , ellipsoid_rotation(std::move(_ellipsoid_rotation)) + , freeze_semiaxes(std::move(_freeze_semiaxes)) + , no_nucleation_border_thickness(_no_nucleation_border_thickness) + , hold_time(_hold_time) { - var_index = _var_index; - semiaxes = _semiaxes; - freeze_semiaxes = _freeze_semiaxes; - ellipsoid_rotation = _ellipsoid_rotation; - hold_time = _hold_time; - no_nucleation_border_thickness = _no_nucleation_border_thickness; - set_rotation_matrix(); }; @@ -41,7 +45,9 @@ class nucleationParameters double degrees_to_rad = std::acos(0.0) / 90.0; - dealii::Tensor<2, dim, double> Rx, Ry, Rz; + dealii::Tensor<2, dim, double> Rx; + dealii::Tensor<2, dim, double> Ry; + dealii::Tensor<2, dim, double> Rz; Rx[0][0] = 1.0; Rx[1][1] = std::cos(ellipsoid_rotation.at(0) * degrees_to_rad); diff --git a/include/nucleus.h b/include/nucleation/nucleus.h similarity index 100% rename from include/nucleus.h rename to include/nucleation/nucleus.h diff --git a/include/parallelNucleationList.h b/include/nucleation/parallelNucleationList.h similarity index 88% rename from include/parallelNucleationList.h rename to include/nucleation/parallelNucleationList.h index eb74fc83b..f4720fa5d 100644 --- a/include/parallelNucleationList.h +++ b/include/nucleation/parallelNucleationList.h @@ -8,13 +8,13 @@ #ifndef INCLUDE_PARALLELNUCLEATIONLIST_H_ #define INCLUDE_PARALLELNUCLEATIONLIST_H_ -#include "nucleus.h" +#include template class parallelNucleationList { public: - parallelNucleationList(std::vector> _newnuclei); + explicit parallelNucleationList(std::vector> _newnuclei); std::vector> buildGlobalNucleiList(double min_dist_between_nuclei, unsigned int old_num_nuclei); std::vector> diff --git a/include/postProcessedFields.h b/include/postProcessedFields.h deleted file mode 100644 index 3a4d56d75..000000000 --- a/include/postProcessedFields.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * postProcessedFields.h - * - * Created on: Mar 29, 2017 - * Author: stephendewitt - */ - -#ifndef INCLUDE_POSTPROCESSEDFIELDS_H_ -#define INCLUDE_POSTPROCESSEDFIELDS_H_ - -#include "list_of_CIJ.h" - -template -void -postProcessedFields(const std::vector> &modelVariablesList, - std::vector> &modelResidualsList, - const dealii::Point> q_point_loc, - const list_of_CIJ material_moduli); - -#endif /* INCLUDE_POSTPROCESSEDFIELDS_H_ */ diff --git a/src/models/mechanics/computeStress.h b/include/utilities/computeStress.h similarity index 100% rename from src/models/mechanics/computeStress.h rename to include/utilities/computeStress.h diff --git a/include/vectorLoad.h b/include/vectorLoad.h deleted file mode 100644 index b26d0a158..000000000 --- a/include/vectorLoad.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * vectorLoad.h - * - * Created on: Feb 22, 2017 - * Author: stephendewitt - */ - -#ifndef INCLUDE_VECTORLOAD_H_ -#define INCLUDE_VECTORLOAD_H_ - -void -vectorLoad(bool in[], int array_size, std::vector &out); -void -vectorLoad(double in[], int array_size, std::vector &out); -void -vectorLoad(int in[], int array_size, std::vector &out); -void -vectorLoad(unsigned int in[], int array_size, std::vector &out); -void -vectorLoad(std::string in[], int array_size, std::vector &out); - -#endif /* INCLUDE_VECTORLOAD_H_ */ diff --git a/src/matrixfree/boundaryConditions.cc b/src/core/boundary_conditions/boundaryConditions.cc similarity index 98% rename from src/matrixfree/boundaryConditions.cc rename to src/core/boundary_conditions/boundaryConditions.cc index edc45037e..eca5508ca 100644 --- a/src/matrixfree/boundaryConditions.cc +++ b/src/core/boundary_conditions/boundaryConditions.cc @@ -1,9 +1,9 @@ // methods to apply boundary conditons -#include "../../include/matrixFreePDE.h" -#include "../../include/nonUniformDirichletBC.h" -#include "../../include/varBCs.h" -#include "../../include/vectorBCFunction.h" +#include +#include +#include +#include // ================================================================================= // Methods to apply non-zero Neumann BCs diff --git a/src/matrixfree/markBoundaries.cc b/src/core/boundary_conditions/markBoundaries.cc similarity index 91% rename from src/matrixfree/markBoundaries.cc rename to src/core/boundary_conditions/markBoundaries.cc index cde2d19be..be410e5ba 100644 --- a/src/matrixfree/markBoundaries.cc +++ b/src/core/boundary_conditions/markBoundaries.cc @@ -1,7 +1,7 @@ // methods to mark boundaries -#include "../../include/initialConditions.h" -#include "../../include/matrixFreePDE.h" +#include +#include // methods to mark boundaries // methods to mark boundaries diff --git a/src/utilities/vectorBCFunction.cc b/src/core/boundary_conditions/vectorBCFunction.cc similarity index 95% rename from src/utilities/vectorBCFunction.cc rename to src/core/boundary_conditions/vectorBCFunction.cc index 2e9f65194..e7be3c9f8 100644 --- a/src/utilities/vectorBCFunction.cc +++ b/src/core/boundary_conditions/vectorBCFunction.cc @@ -5,11 +5,11 @@ * Author: stephendewitt */ -#include "../../include/vectorBCFunction.h" - #include #include +#include + template vectorBCFunction::vectorBCFunction(const std::vector &BC_values) : dealii::Function(dim) diff --git a/src/matrixfree/buildFields.cc b/src/core/buildFields.cc similarity index 94% rename from src/matrixfree/buildFields.cc rename to src/core/buildFields.cc index 1029ea93a..1509ce9c9 100644 --- a/src/matrixfree/buildFields.cc +++ b/src/core/buildFields.cc @@ -9,7 +9,7 @@ // FUNCTION TO BUILD THE VECTOR OF FIELDS // ===================================================================== -#include "../../include/matrixFreePDE.h" +#include template void diff --git a/src/matrixfree/checkpoint.cc b/src/core/checkpoint.cc similarity index 99% rename from src/matrixfree/checkpoint.cc rename to src/core/checkpoint.cc index e3477807c..92c481932 100644 --- a/src/matrixfree/checkpoint.cc +++ b/src/core/checkpoint.cc @@ -3,8 +3,9 @@ #include #include -#include "../../include/matrixFreePDE.h" +#include #include +#include #ifdef DEAL_II_WITH_ZLIB # include diff --git a/src/matrixfree/init.cc b/src/core/init.cc similarity index 99% rename from src/matrixfree/init.cc rename to src/core/init.cc index db46672f3..46fbd9a8f 100644 --- a/src/matrixfree/init.cc +++ b/src/core/init.cc @@ -2,8 +2,8 @@ #include -#include "../../include/matrixFreePDE.h" -#include "../../include/varBCs.h" +#include +#include // populate with fields and setup matrix free system template diff --git a/src/matrixfree/initialConditions.cc b/src/core/initial_conditions/initialConditions.cc similarity index 98% rename from src/matrixfree/initialConditions.cc rename to src/core/initial_conditions/initialConditions.cc index ba7f7215c..038faa911 100644 --- a/src/matrixfree/initialConditions.cc +++ b/src/core/initial_conditions/initialConditions.cc @@ -1,11 +1,10 @@ // methods to apply initial conditions -#include "../../include/initialConditions.h" - -#include "../../include/IntegrationTools/PField.hh" -#include "../../include/OrderParameterRemapper.h" -#include "../../include/matrixFreePDE.h" #include +#include +#include +#include +#include template class InitialConditionPField : public Function diff --git a/src/inputFileReader/inputFileReader.cc b/src/core/inputFileReader.cc similarity index 99% rename from src/inputFileReader/inputFileReader.cc rename to src/core/inputFileReader.cc index 126003601..e790db42e 100644 --- a/src/inputFileReader/inputFileReader.cc +++ b/src/core/inputFileReader.cc @@ -1,10 +1,9 @@ -#include "../../include/inputFileReader.h" - #include #include -#include "../../include/RefinementCriterion.h" -#include +#include +#include +#include inputFileReader::inputFileReader(const std::string &input_file_name, variableAttributeLoader &_variable_attributes) diff --git a/src/matrixfree/invM.cc b/src/core/invM.cc similarity index 98% rename from src/matrixfree/invM.cc rename to src/core/invM.cc index 14efc9471..b92065b4c 100644 --- a/src/matrixfree/invM.cc +++ b/src/core/invM.cc @@ -1,9 +1,7 @@ // computeInvM() method for MatrixFreePDE class #include -#include "../../include/matrixFreePDE.h" -#include -#include +#include // compute inverse of the diagonal mass matrix and store in vector invM template diff --git a/src/matrixfree/matrixFreePDE.cc b/src/core/matrixFreePDE.cc similarity index 97% rename from src/matrixfree/matrixFreePDE.cc rename to src/core/matrixFreePDE.cc index 3a23d11a4..d503f9ab8 100644 --- a/src/matrixfree/matrixFreePDE.cc +++ b/src/core/matrixFreePDE.cc @@ -1,6 +1,6 @@ // constructor and destructor for matrixFreePDE class -#include "../../include/matrixFreePDE.h" +#include // constructor template diff --git a/src/matrixfree/outputResults.cc b/src/core/outputResults.cc similarity index 99% rename from src/matrixfree/outputResults.cc rename to src/core/outputResults.cc index 69efee498..e1d1fcd7c 100644 --- a/src/matrixfree/outputResults.cc +++ b/src/core/outputResults.cc @@ -2,8 +2,9 @@ #include -#include "../../include/matrixFreePDE.h" #include +#include +#include // output results template diff --git a/src/matrixfree/computeIntegral.cc b/src/core/postprocessing/computeIntegral.cc similarity index 97% rename from src/matrixfree/computeIntegral.cc rename to src/core/postprocessing/computeIntegral.cc index c4d06e1c1..4b7741684 100644 --- a/src/matrixfree/computeIntegral.cc +++ b/src/core/postprocessing/computeIntegral.cc @@ -1,5 +1,5 @@ -#include "../../include/matrixFreePDE.h" +#include template void diff --git a/src/matrixfree/postprocessor.cc b/src/core/postprocessing/postprocessor.cc similarity index 96% rename from src/matrixfree/postprocessor.cc rename to src/core/postprocessing/postprocessor.cc index 03c540b2b..972d9fac8 100644 --- a/src/matrixfree/postprocessor.cc +++ b/src/core/postprocessing/postprocessor.cc @@ -1,5 +1,4 @@ -// #include "../../include/postprocessor.h" -#include "../../include/matrixFreePDE.h" +#include template void diff --git a/src/matrixfree/AdaptiveRefinement.cc b/src/core/refinement/AdaptiveRefinement.cc similarity index 99% rename from src/matrixfree/AdaptiveRefinement.cc rename to src/core/refinement/AdaptiveRefinement.cc index eb197165e..9bd65a735 100644 --- a/src/matrixfree/AdaptiveRefinement.cc +++ b/src/core/refinement/AdaptiveRefinement.cc @@ -1,4 +1,4 @@ -#include "../../include/AdaptiveRefinement.h" +#include using namespace dealii; diff --git a/src/matrixfree/reinit.cc b/src/core/reinit.cc similarity index 99% rename from src/matrixfree/reinit.cc rename to src/core/reinit.cc index c69528dc4..22b868788 100644 --- a/src/matrixfree/reinit.cc +++ b/src/core/reinit.cc @@ -1,6 +1,6 @@ // reinit() method for MatrixFreePDE class -#include "../../include/matrixFreePDE.h" +#include // populate with fields and setup matrix free system template diff --git a/src/SolverParameters/SolverParameters.cc b/src/core/solvers/SolverParameters.cc similarity index 98% rename from src/SolverParameters/SolverParameters.cc rename to src/core/solvers/SolverParameters.cc index c92dc55a4..83253a561 100644 --- a/src/SolverParameters/SolverParameters.cc +++ b/src/core/solvers/SolverParameters.cc @@ -1,4 +1,5 @@ -#include "../../include/SolverParameters.h" +#include +#include SolverToleranceType SolverParametersBase::getToleranceType(unsigned int index) diff --git a/src/matrixfree/computeLHS.cc b/src/core/solvers/computeLHS.cc similarity index 98% rename from src/matrixfree/computeLHS.cc rename to src/core/solvers/computeLHS.cc index a335cb794..51c0938ac 100644 --- a/src/matrixfree/computeLHS.cc +++ b/src/core/solvers/computeLHS.cc @@ -1,6 +1,6 @@ // vmult() and getLHS() method for MatrixFreePDE class -#include "../../include/matrixFreePDE.h" +#include // vmult operation for LHS template diff --git a/src/matrixfree/computeRHS.cc b/src/core/solvers/computeRHS.cc similarity index 97% rename from src/matrixfree/computeRHS.cc rename to src/core/solvers/computeRHS.cc index 1afe08c4e..eb2cbc9e9 100644 --- a/src/matrixfree/computeRHS.cc +++ b/src/core/solvers/computeRHS.cc @@ -1,7 +1,7 @@ // computeRHS() method for MatrixFreePDE class -#include "../../include/matrixFreePDE.h" -#include "../../include/variableContainer.h" +#include +#include // update RHS of each field template diff --git a/src/matrixfree/setNonlinearEqInitialGuess.cc b/src/core/solvers/setNonlinearEqInitialGuess.cc similarity index 99% rename from src/matrixfree/setNonlinearEqInitialGuess.cc rename to src/core/solvers/setNonlinearEqInitialGuess.cc index 32ec7ff34..6d8d482eb 100644 --- a/src/matrixfree/setNonlinearEqInitialGuess.cc +++ b/src/core/solvers/setNonlinearEqInitialGuess.cc @@ -2,8 +2,8 @@ #include #include -#include "../../include/matrixFreePDE.h" #include +#include // solve each time increment template diff --git a/src/matrixfree/solve.cc b/src/core/solvers/solve.cc similarity index 99% rename from src/matrixfree/solve.cc rename to src/core/solvers/solve.cc index cb3df3ea7..06ed91237 100644 --- a/src/matrixfree/solve.cc +++ b/src/core/solvers/solve.cc @@ -1,6 +1,6 @@ // solve() method for MatrixFreePDE class -#include "../../include/matrixFreePDE.h" +#include // solve BVP template diff --git a/src/matrixfree/solveIncrement.cc b/src/core/solvers/solveIncrement.cc similarity index 99% rename from src/matrixfree/solveIncrement.cc rename to src/core/solvers/solveIncrement.cc index a6b6b6cac..f1a5cc455 100644 --- a/src/matrixfree/solveIncrement.cc +++ b/src/core/solvers/solveIncrement.cc @@ -2,8 +2,8 @@ #include -#include "../../include/matrixFreePDE.h" #include +#include // solve each time increment template diff --git a/src/userInputParameters/userInputParameters.cc b/src/core/userInputParameters.cc similarity index 99% rename from src/userInputParameters/userInputParameters.cc rename to src/core/userInputParameters.cc index 21ae5aed3..15e7c24d3 100644 --- a/src/userInputParameters/userInputParameters.cc +++ b/src/core/userInputParameters.cc @@ -1,12 +1,9 @@ // Methods for the userInputParameters class -#include "../../include/userInputParameters.h" - #include #include #include -#include -#include +#include template void diff --git a/src/variableAttributeLoader/variableAttributeLoader.cc b/src/core/variableAttributeLoader.cc similarity index 99% rename from src/variableAttributeLoader/variableAttributeLoader.cc rename to src/core/variableAttributeLoader.cc index 739ca0572..db6cfe347 100644 --- a/src/variableAttributeLoader/variableAttributeLoader.cc +++ b/src/core/variableAttributeLoader.cc @@ -1,8 +1,8 @@ -#include "../../include/variableAttributeLoader.h" - #include #include +#include + // NOLINTBEGIN(cppcoreguidelines-prefer-member-initializer) variableAttributeLoader::variableAttributeLoader() { diff --git a/src/variableAttributes/variableAttributes.cc b/src/core/variableAttributes.cc similarity index 99% rename from src/variableAttributes/variableAttributes.cc rename to src/core/variableAttributes.cc index 1b62d6503..24a6ce2ac 100644 --- a/src/variableAttributes/variableAttributes.cc +++ b/src/core/variableAttributes.cc @@ -1,4 +1,4 @@ -#include "../../include/variableAttributes.h" +#include void variableAttributes::format_dependencies() diff --git a/src/variableContainer/variableContainer.cc b/src/core/variableContainer.cc similarity index 99% rename from src/variableContainer/variableContainer.cc rename to src/core/variableContainer.cc index a4f976f44..2b91954ef 100644 --- a/src/variableContainer/variableContainer.cc +++ b/src/core/variableContainer.cc @@ -1,4 +1,4 @@ -#include "../../include/variableContainer.h" +#include template variableContainer::variableContainer( diff --git a/src/field_input/field_input.cc b/src/field_input/field_input.cc new file mode 100644 index 000000000..e69de29bb diff --git a/src/FloodFiller/FloodFiller.cc b/src/grains/FloodFiller.cc similarity index 99% rename from src/FloodFiller/FloodFiller.cc rename to src/grains/FloodFiller.cc index 1cb594284..a26108f3c 100644 --- a/src/FloodFiller/FloodFiller.cc +++ b/src/grains/FloodFiller.cc @@ -1,6 +1,4 @@ -#include "../../include/FloodFiller.h" - -#include +#include template void diff --git a/src/OrderParameterRemapper/OrderParameterRemapper.cc b/src/grains/OrderParameterRemapper.cc similarity index 99% rename from src/OrderParameterRemapper/OrderParameterRemapper.cc rename to src/grains/OrderParameterRemapper.cc index ec67ec959..26b7ae3f4 100644 --- a/src/OrderParameterRemapper/OrderParameterRemapper.cc +++ b/src/grains/OrderParameterRemapper.cc @@ -1,4 +1,4 @@ -#include "../../include/OrderParameterRemapper.h" +#include template void diff --git a/src/SimplifiedGrainRepresentation/SimplifiedGrainRepresentation.cc b/src/grains/SimplifiedGrainRepresentation.cc similarity index 99% rename from src/SimplifiedGrainRepresentation/SimplifiedGrainRepresentation.cc rename to src/grains/SimplifiedGrainRepresentation.cc index da817e822..b5e31e655 100644 --- a/src/SimplifiedGrainRepresentation/SimplifiedGrainRepresentation.cc +++ b/src/grains/SimplifiedGrainRepresentation.cc @@ -1,4 +1,4 @@ -#include "../../include/SimplifiedGrainRepresentation.h" +#include // ============================================================================ // Methods for SimplifiedGrainRepresentation diff --git a/src/matrixfree/reassignGrains.cc b/src/grains/reassignGrains.cc similarity index 95% rename from src/matrixfree/reassignGrains.cc rename to src/grains/reassignGrains.cc index c9f55daad..4d2fa4100 100644 --- a/src/matrixfree/reassignGrains.cc +++ b/src/grains/reassignGrains.cc @@ -1,7 +1,7 @@ -#include "../../include/FloodFiller.h" -#include "../../include/OrderParameterRemapper.h" -#include "../../include/SimplifiedGrainRepresentation.h" -#include "../../include/matrixFreePDE.h" +#include +#include +#include +#include // vmult operation for LHS template diff --git a/src/matrixfree/initForTests.cc b/src/matrixfree/initForTests.cc deleted file mode 100644 index 47c71cd85..000000000 --- a/src/matrixfree/initForTests.cc +++ /dev/null @@ -1,116 +0,0 @@ -// initForTests() method for MatrixFreePDE class - -#include - -#include "../../include/matrixFreePDE.h" - -template -void -MatrixFreePDE::initForTests(std::vector> fields) -{ - // creating mesh - std::vector subdivisions; - for (unsigned int i = 0; i < dim; i++) - { - subdivisions.push_back(10); - } - - if (dim == 3) - { - GridGenerator::subdivided_hyper_rectangle(triangulation, - subdivisions, - Point(), - Point(1, 1, 1)); - } - else if (dim == 2) - { - GridGenerator::subdivided_hyper_rectangle(triangulation, - subdivisions, - Point(), - Point(1, 1)); - } - else - { - GridGenerator::subdivided_hyper_rectangle(triangulation, - subdivisions, - Point(), - Point(1)); - } - - // setup system - for (auto &field : fields) - { - // create FESystem - FESystem *fe = nullptr; - if (field.type == SCALAR) - { - fe = new FESystem(FE_Q(QGaussLobatto<1>(degree + 1)), 1); - } - else if (field.type == VECTOR) - { - fe = new FESystem(FE_Q(QGaussLobatto<1>(degree + 1)), dim); - } - FESet.push_back(fe); - - // distribute DOFs - DoFHandler *dof_handler = nullptr; - dof_handler = new DoFHandler(triangulation); - dofHandlersSet.push_back(dof_handler); - dofHandlersSet_nonconst.push_back(dof_handler); - dof_handler->distribute_dofs(*fe); - - // extract locally_relevant_dofs - IndexSet *locally_relevant_dofs = nullptr; - locally_relevant_dofs = new IndexSet; - locally_relevant_dofsSet.push_back(locally_relevant_dofs); - locally_relevant_dofsSet_nonconst.push_back(locally_relevant_dofs); - locally_relevant_dofs->clear(); - DoFTools::extract_locally_relevant_dofs(*dof_handler, *locally_relevant_dofs); - - // create constraints - AffineConstraints *constraintsOther = nullptr; - constraintsOther = new AffineConstraints; - constraintsOtherSet.push_back(constraintsOther); - constraintsOtherSet_nonconst.push_back(constraintsOther); - constraintsOther->clear(); - constraintsOther->reinit(*locally_relevant_dofs); - DoFTools::make_hanging_node_constraints(*dof_handler, *constraintsOther); - // constraintsOther->close(); // I actually don't want to close them since - // I'll be adding to them in test_setRigidBodyModeConstraints - } - - // //setup the matrix free object - typename MatrixFree::AdditionalData additional_data; - additional_data.tasks_parallel_scheme = - MatrixFree::AdditionalData::partition_partition; - additional_data.mapping_update_flags = - (update_values | update_gradients | update_JxW_values | update_quadrature_points); - QGaussLobatto<1> quadrature(degree + 1); - matrixFreeObject.clear(); -#if (DEAL_II_VERSION_MAJOR == 9 && DEAL_II_VERSION_MINOR < 4) - matrixFreeObject.reinit(dofHandlersSet, - constraintsOtherSet, - quadrature, - additional_data); -#else - matrixFreeObject.reinit(MappingFE(FE_Q(QGaussLobatto<1>(degree + 1))), - dofHandlersSet, - constraintsOtherSet, - quadrature, - additional_data); -#endif - // setup problem vectors - for (unsigned int fieldIndex = 0; fieldIndex < fields.size(); fieldIndex++) - { - vectorType *U = nullptr; - vectorType *R = nullptr; - U = new vectorType; - R = new vectorType; - solutionSet.push_back(U); - residualSet.push_back(R); - matrixFreeObject.initialize_dof_vector(*R, 0); - *R = 0; - matrixFreeObject.initialize_dof_vector(*U, 0); - *U = 0; - } -} diff --git a/src/matrixfree/nucleation.cc b/src/nucleation/nucleation.cc similarity index 99% rename from src/matrixfree/nucleation.cc rename to src/nucleation/nucleation.cc index 3c0ea0297..9322565c9 100644 --- a/src/matrixfree/nucleation.cc +++ b/src/nucleation/nucleation.cc @@ -1,9 +1,9 @@ // Methods in MatrixFreePDE to update the list of nuclei -#include "../../include/matrixFreePDE.h" -#include "../../include/parallelNucleationList.h" -#include "../../include/varBCs.h" #include +#include +#include #include +#include #include // ======================================================================================================= diff --git a/src/parallelNucleationList/parallelNucleationList.cc b/src/nucleation/parallelNucleationList.cc similarity index 99% rename from src/parallelNucleationList/parallelNucleationList.cc rename to src/nucleation/parallelNucleationList.cc index 7d8c7fbef..af0497847 100644 --- a/src/parallelNucleationList/parallelNucleationList.cc +++ b/src/nucleation/parallelNucleationList.cc @@ -1,10 +1,8 @@ -#include "../../include/parallelNucleationList.h" - #include #include -#include "../../include/nucleus.h" -#include +#include +#include // ================================================================================= // Constructor diff --git a/src/matrixfree/utilities.cc b/src/utilities/utilities.cc similarity index 91% rename from src/matrixfree/utilities.cc rename to src/utilities/utilities.cc index d6df8823c..7a7932477 100644 --- a/src/matrixfree/utilities.cc +++ b/src/utilities/utilities.cc @@ -1,6 +1,6 @@ // utility functions for the MatrixFreePDE class -#include "../../include/matrixFreePDE.h" +#include // return index of given field name if exists, else throw error template diff --git a/tests/automatic_tests/CHAC_anisotropyRegularized/customPDE.h b/tests/automatic_tests/CHAC_anisotropyRegularized/customPDE.h index 810470fde..b39bc9701 100644 --- a/tests/automatic_tests/CHAC_anisotropyRegularized/customPDE.h +++ b/tests/automatic_tests/CHAC_anisotropyRegularized/customPDE.h @@ -1,4 +1,4 @@ -#include "../../../include/matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "../../../include/typeDefs.h" +#include const userInputParameters userInputs; diff --git a/tests/automatic_tests/allenCahn/customPDE.h b/tests/automatic_tests/allenCahn/customPDE.h index d93507284..5bf769a15 100644 --- a/tests/automatic_tests/allenCahn/customPDE.h +++ b/tests/automatic_tests/allenCahn/customPDE.h @@ -1,4 +1,4 @@ -#include "../../../include/matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "../../../include/typeDefs.h" +#include const userInputParameters userInputs; diff --git a/tests/automatic_tests/cahnHilliard/customPDE.h b/tests/automatic_tests/cahnHilliard/customPDE.h index e09e9a782..96e6e324b 100644 --- a/tests/automatic_tests/cahnHilliard/customPDE.h +++ b/tests/automatic_tests/cahnHilliard/customPDE.h @@ -1,4 +1,4 @@ -#include "../../../include/matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "../../../include/typeDefs.h" +#include const userInputParameters userInputs; diff --git a/tests/automatic_tests/coupledCahnHilliardAllenCahn/customPDE.h b/tests/automatic_tests/coupledCahnHilliardAllenCahn/customPDE.h index dc86a5323..c87307e06 100644 --- a/tests/automatic_tests/coupledCahnHilliardAllenCahn/customPDE.h +++ b/tests/automatic_tests/coupledCahnHilliardAllenCahn/customPDE.h @@ -1,4 +1,4 @@ -#include "../../../include/matrixFreePDE.h" +#include using namespace dealii; @@ -29,7 +29,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "../../../include/typeDefs.h" +#include const userInputParameters userInputs; diff --git a/tests/automatic_tests/main.cc b/tests/automatic_tests/main.cc index 5f5514d14..e22680a54 100644 --- a/tests/automatic_tests/main.cc +++ b/tests/automatic_tests/main.cc @@ -2,10 +2,11 @@ #include "customPDE.h" #include "ICs_and_BCs.cc" -#include "ParseCommandLineOpts.h" #include "equations.cc" -#include "inputFileReader.h" -#include "variableAttributeLoader/variableAttributeLoader.cc" + +#include +#include +#include // Header file for postprocessing that may or may not exist #ifdef POSTPROCESS_FILE_EXISTS diff --git a/tests/automatic_tests/precipitateEvolution/customPDE.h b/tests/automatic_tests/precipitateEvolution/customPDE.h index d09875ce8..3c72a72e1 100644 --- a/tests/automatic_tests/precipitateEvolution/customPDE.h +++ b/tests/automatic_tests/precipitateEvolution/customPDE.h @@ -1,4 +1,4 @@ -#include "../../../include/matrixFreePDE.h" +#include using namespace dealii; @@ -27,7 +27,7 @@ class customPDE : public MatrixFreePDE [[maybe_unused]] Vector &vector_BC) override; private: -#include "../../../include/typeDefs.h" +#include const userInputParameters userInputs; diff --git a/tests/automatic_tests/run_automatic_tests.py b/tests/automatic_tests/run_automatic_tests.py index 355c22bac..691b9500c 100644 --- a/tests/automatic_tests/run_automatic_tests.py +++ b/tests/automatic_tests/run_automatic_tests.py @@ -56,27 +56,6 @@ def grab_cpu_information(): return architecture, cpu_model, cpu_cores, cpu_max_freq, cpu_min_freq, hypervisor -def compile_and_run_unit_tests(): - # Remove old files if they exist - remove_file("main") - remove_file("CMakeCache.txt") - remove_file("unit_test_results.txt") - - # Compile and run - subprocess.call( - ["cmake", "."], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL - ) - subprocess.call(["make"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - subprocess.call( - ["mpirun", "-n", "1", "./main"], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, - ) - - with open("unit_test_results.txt", "r") as result_file: - return result_file.read().splitlines() - - def compile_and_run_simulation(application_path): # Navigate to test application directory os.chdir(application_path) @@ -236,22 +215,6 @@ def run_regression_tests_in_parallel( # Grab current date now = datetime.datetime.now() -# Navigate to the unit test directory -os.chdir("../unit_tests/") - -# Run unit tests -unit_test_results = compile_and_run_unit_tests() -unit_tests_passed = unit_test_results[0] -unit_test_counter = unit_test_results[1] - -write_to_file( - test_result_file, - "--------------------------------------------------------- \n" - "Unit test on " + now.strftime("%Y-%m-%d %H:%M") + "\n" - "--------------------------------------------------------- \n" - f"Unit Tests Passed: {unit_tests_passed}/{unit_test_counter}\n", -) - # List of applications applicationList = [ "allenCahn", @@ -299,13 +262,10 @@ def run_regression_tests_in_parallel( ) # Print overall results -print(f"Unit Tests Passed: {unit_tests_passed}/{unit_test_counter}\n") print(f"Regression Tests Passed: {regression_tests_passed}/{regression_test_counter}\n") # Set exit code -if (regression_tests_passed < regression_test_counter) or ( - unit_tests_passed < unit_test_counter -): +if regression_tests_passed < regression_test_counter: sys.exit(1) else: sys.exit(0) diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt deleted file mode 100644 index 7f7cd242a..000000000 --- a/tests/unit_tests/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -## -# CMake script for the phaseField applications: -## - - -# Set the name of the project and target: -SET(TARGET "main") - -# Declare all source files the target consists of: -SET(TARGET_SRC - ${TARGET}.cc - # You can specify additional files here! - ) - -# Usually, you will not need to modify anything beyond this point... - -CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) - -FIND_PACKAGE(deal.II 9.2.0 QUIET - HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR} - ) -IF(NOT ${deal.II_FOUND}) - MESSAGE(FATAL_ERROR "\n" - "*** Could not locate deal.II. ***\n\n" - "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n" - "or set an environment variable \"DEAL_II_DIR\" that contains this path." - ) -ENDIF() - -# Check for prerequisites -IF(NOT ${DEAL_II_WITH_P4EST}) - MESSAGE(FATAL_ERROR "\n" - "*** deal.II was not installed with p4est. ***\n\n" - “The p4est library is a mandatory prerequisite for PRISMS-PF. Please consult the \n” - “user guide to confirm that deal.II and p4est were installed and configured correctly.” - ) -ENDIF() - -DEAL_II_INITIALIZE_CACHED_VARIABLES() -PROJECT(${TARGET}) - -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-extra") - set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-unused-parameter -Wno-extra") - #set(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable") - #set(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE} -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable") -endif() - - -DEAL_II_INVOKE_AUTOPILOT() diff --git a/tests/unit_tests/get_entry_name_ending_list_tester.prm b/tests/unit_tests/get_entry_name_ending_list_tester.prm deleted file mode 100644 index a25a39d99..000000000 --- a/tests/unit_tests/get_entry_name_ending_list_tester.prm +++ /dev/null @@ -1,8 +0,0 @@ -# Test input file for the method 'get_entry_name_ending_list' - -set Model constant abc = 1.0, double -set Model constant dfg = 1.0, double -set Model constant i j k = 1.0, double -set Model constan not = 1.0, double -set Model constant qrs = 1.0, double -set Model constant t uv = 1.0, double diff --git a/tests/unit_tests/input_file_parser_test_file.txt b/tests/unit_tests/input_file_parser_test_file.txt deleted file mode 100644 index cdaff5441..000000000 --- a/tests/unit_tests/input_file_parser_test_file.txt +++ /dev/null @@ -1,63 +0,0 @@ -s et Fake = don't load this - -set Not real = 3 - -# Equation 0 -subsection Equation 0 - set Variable name = n - set Variable type = SCALAR - set Equation type = PARABOLIC - set Need variable value = true - set Need variable gradient = true - set Need variable hessian = false - set Need value residual term = true - set Need gradient residual term = true -end - -# Decoy 0 -subsection Decoy 0 - set Variable name = n - set Variable type = SCALAR - set Equation type = PARABOLIC - set Need variable value = true - set Need variable gradient = true - set Need variable hessian = false - set Need value residual term = true - set Need gradient residual term = true -end - -# Equation 2 -subsection Equation 2 - set Variable name = c - set Variable type = SCALAR - set Equation type = PARABOLIC - set Need variable value = true - set Need variable gradient = true - set Need variable hessian = false - set Need value residual term = true - set Need gradient residual term = true -end - -# Decoy 1 -subsection Decoy 1 - set Variable name = n - set Variable type = SCALAR - set Equation type = PARABOLIC - set Need variable value = true - set Need variable gradient = true - set Need variable hessian = false - set Need value residual term = true - set Need gradient residual term = true -end - -# Equation 1 -subsection Equation 1 - set Variable name = u - set Variable type = VECTOR - set Equation type = PARABOLIC - set Need variable value = true - set Need variable gradient = true - set Need variable hessian = false - set Need value residual term = true - set Need gradient residual term = true -end diff --git a/tests/unit_tests/main.cc b/tests/unit_tests/main.cc deleted file mode 100644 index 6c9c2d0a9..000000000 --- a/tests/unit_tests/main.cc +++ /dev/null @@ -1,171 +0,0 @@ -// Calls the unit tests for the PRISMS-PF code -// Orignal author: Stephen DeWitt (stvdwtt@umich.edu) - -#include "unitTest.h" -#include "unit_test_inputs.cc" - -#include "../../include/initialConditions.h" -#include "../../include/userInputParameters.h" -#include "../../include/vectorBCFunction.h" -#include "../../src/userInputParameters/userInputParameters.cc" -#include "../../src/utilities/vectorBCFunction.cc" -#include "../../src/variableAttributes/variableAttributes.cc" -#include - -int -main(int argc, char **argv) -{ - dealii::deallog.depth_console(3); - // init MPI - Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, - argv, - numbers::invalid_unsigned_int); - - // Load input - variableAttributeLoader variable_attributes; - inputFileReader input_file_reader("parameters_test.prm", variable_attributes); - userInputParameters<2> userInputs(input_file_reader, - input_file_reader.parameter_handler, - variable_attributes); - load_unit_test_inputs<2>(userInputs); - - std::cout << "Beginning unit tests..." << std::endl; - bool pass = false; - int tests_passed = 0, total_tests = 0; - - // Unit tests for the method "parse_line" in "inputFileReader" - total_tests++; - unitTest<2, double> parse_line_tester; - pass = parse_line_tester.test_parse_line(); - tests_passed += pass; - - // Unit tests for the method "get_subsection_entry_list" in "inputFileReader" - total_tests++; - unitTest<2, double> get_subsection_entry_list_tester; - pass = get_subsection_entry_list_tester.test_get_subsection_entry_list(); - tests_passed += pass; - - // Unit tests for the method "get_entry_name_ending_list" in "inputFileReader" - total_tests++; - unitTest<2, double> get_entry_name_ending_list_tester; - pass = get_entry_name_ending_list_tester.test_get_entry_name_ending_list(); - tests_passed += pass; - - // Unit tests for the method "load_BC_list" in "userInputParameters" - total_tests++; - unitTest<2, double> load_BC_list_tester; - pass = load_BC_list_tester.test_load_BC_list(); - tests_passed += pass; - - // Unit tests for the method "setOutputTimeSteps" for all four types of - // spacing, indirectly through "loadInputParameters" - total_tests++; - unitTest<2, double> setOutputTimeSteps_tester_eq; - pass = setOutputTimeSteps_tester_eq.test_setOutputTimeSteps(); - tests_passed += pass; - - // Unit tests for the method "computeInvM" - total_tests++; - unitTest<2, double> computeInvM_tester_2D; - pass = computeInvM_tester_2D.test_computeInvM(argc, argv, userInputs); - tests_passed += pass; - - // Unit tests for the method "outputResults" (this test doesn't actually do - // anything) total_tests++; unitTest<2,double> outputResults_tester_2D; pass = - // outputResults_tester_2D.test_outputResults(argc, argv, userInputs); - // tests_passed += pass; - - // Unit tests for the method "computeStress" - total_tests++; - unitTest<1, dealii::VectorizedArray[1][1]> computeStress_tester_1D; - pass = computeStress_tester_1D.test_computeStress(); - tests_passed += pass; - - total_tests++; - unitTest<1, dealii::Table<2, double>> computeStress_tester_1DT; - pass = computeStress_tester_1DT.test_computeStress(); - tests_passed += pass; - - total_tests++; - unitTest<2, dealii::VectorizedArray[3][3]> computeStress_tester_2D; - pass = computeStress_tester_2D.test_computeStress(); - tests_passed += pass; - - total_tests++; - unitTest<2, dealii::Table<2, double>> computeStress_tester_2DT; - pass = computeStress_tester_2DT.test_computeStress(); - tests_passed += pass; - - total_tests++; - unitTest<3, dealii::VectorizedArray[6][6]> computeStress_tester_3D; - pass = computeStress_tester_3D.test_computeStress(); - tests_passed += pass; - - total_tests++; - unitTest<3, dealii::Table<2, double>> computeStress_tester_3DT; - pass = computeStress_tester_3DT.test_computeStress(); - tests_passed += pass; - - // Unit tests for the "LinearSolverParameters" class - total_tests++; - unitTest<2, double> LinearSolverParameters_tester; - pass = LinearSolverParameters_tester.test_LinearSolverParameters(); - tests_passed += pass; - - // Unit tests for the "NonlinearSolverParameters" class - total_tests++; - unitTest<2, double> NonlinearSolverParameters_tester; - pass = NonlinearSolverParameters_tester.test_NonlinearSolverParameters(); - tests_passed += pass; - - // Unit tests for the FloodFiller class - total_tests++; - unitTest<2, double> FloodFiller_tester; - pass = FloodFiller_tester.test_FloodFiller(); - tests_passed += pass; - - // Unit tests for the SimplifiedGrainRepresentation class - total_tests++; - unitTest<2, double> SimplifiedGrainRepresentation_tester; - pass = SimplifiedGrainRepresentation_tester.test_SimplifiedGrainRepresentation(); - tests_passed += pass; - - // Unit tests for the "transferGrainIds" method in the - // "SimplifiedGrainManipulator" class - total_tests++; - unitTest<2, double> SimplifiedGrainManipulator_tester1; - pass = - SimplifiedGrainManipulator_tester1.test_SimplifiedGrainManipulator_transferGrainIds(); - tests_passed += pass; - - // Unit tests for the "reassignGrains" method in the - // "SimplifiedGrainManipulator" class - total_tests++; - unitTest<2, double> SimplifiedGrainManipulator_tester2; - pass = - SimplifiedGrainManipulator_tester2.test_SimplifiedGrainManipulator_reassignGrains(); - tests_passed += pass; - - // Unit tests for the OrderParameterRemapper class - total_tests++; - unitTest<2, double> OrderParameterRemapper_tester; - pass = OrderParameterRemapper_tester.test_OrderParameterRemapper(); - tests_passed += pass; - - // Print out results - char buffer[100]; - snprintf(buffer, - sizeof(buffer), - "\n\nNumber of tests passed: %u/%u \n\n", - tests_passed, - total_tests); - std::cout << buffer; - - // Write results to a file - std::ofstream result_file("unit_test_results.txt"); - result_file << tests_passed << std::endl; - result_file << total_tests << std::endl; - result_file.close(); - - return 0; -} diff --git a/tests/unit_tests/parameters.prm b/tests/unit_tests/parameters.prm deleted file mode 100644 index 3ac821492..000000000 --- a/tests/unit_tests/parameters.prm +++ /dev/null @@ -1,83 +0,0 @@ -# Parameter list for the Allen-Cahn example application - -# Refer to the PRISMS-PF manual for use of these parameters in the source code. - -# ================================================================================= -# Set the number of dimensions (2 or 3 for a 2D or 3D calculation) -# ================================================================================= -set Number of dimensions = 2 - -# ================================================================================= -# Set the length of the domain in all three dimensions -# (Domain size Z ignored in 2D) -# ================================================================================= -# Each axes spans from zero to the specified length -set Domain size X = 100 -set Domain size Y = 100 -set Domain size Z = 100 - -# ================================================================================= -# Set the element parameters -# ================================================================================= -# The number of elements in each direction is 2^(refineFactor) * subdivisions -# Subdivisions Z ignored in 2D -# For optimal performance, use refineFactor primarily to determine the element size -set Subdivisions X = 1 -set Subdivisions Y = 1 -set Subdivisions Z = 1 - -set Refine factor = 8 - -# Set the polynomial degree of the element (allowed values: 1, 2, or 3) -set Element degree = 1 - -# ================================================================================= -# Set the time step parameters -# ================================================================================= -# The size of the time step -set Time step = 1.0e-2 - -# The simulation ends when either the number of time steps is reached or the -# simulation time is reached. -set Number of time steps = 5000 - -# ================================================================================= -# Set the boundary conditions -# ================================================================================= -# ADD MORE COMMENTS -set Boundary condition for variable n = NATURAL - -# ================================================================================= -# Set the model constants -# ================================================================================= -# ADD MORE COMMENTS -# Type options currently are double, int, and bool - -# The mobility, MnV in equations.h -set Model constant MnV = 1.0, double - -# The gradient energy coefficient, KnV in equations.h -set Model constant KnV = 2.0, double - -# ================================================================================= -# Set the output parameters -# ================================================================================= -# Type of spacing between outputs ("EQUAL_SPACING", "LOG_SPACING", "N_PER_DECADE", -# or "LIST") -set Output condition = EQUAL_SPACING - -# Number of times the program outputs the fields (total number for "EQUAL_SPACING" -# and "LOG_SPACING", number per decade for "N_PER_DECADE", ignored for "LIST") -set Number of outputs = 5 - -# The number of time steps between updates being printed to the screen -set Skip print steps = 1000 - -# ================================================================================= -# Set the parameters for loading in initial conditions (OPTIONAL) -# ================================================================================= -# ADD MORE COMMENTS -set Load initial conditions = false -set Load parallel file = true -set File names = void -set Variable names in the files = void diff --git a/tests/unit_tests/parameters_test.prm b/tests/unit_tests/parameters_test.prm deleted file mode 100644 index 35db9e842..000000000 --- a/tests/unit_tests/parameters_test.prm +++ /dev/null @@ -1,77 +0,0 @@ -# Parameter list for the Allen-Cahn example application - -# Refer to the PRISMS-PF manual for use of these parameters in the source code. - -# ================================================================================= -# Set the number of dimensions (2 or 3 for a 2D or 3D calculation) -# ================================================================================= -set Number of dimensions = 2 - -# ================================================================================= -# Set the length of the domain in all three dimensions -# (Domain size Z ignored in 2D) -# ================================================================================= -# Each axes spans from zero to the specified length -set Domain size X = 100 -set Domain size Y = 100 -set Domain size Z = 100 - -# ================================================================================= -# Set the element parameters -# ================================================================================= -# The number of elements in each direction is 2^(refineFactor) * subdivisions -# Subdivisions Z ignored in 2D -# For optimal performance, use refineFactor primarily to determine the element size -set Subdivisions X = 1 -set Subdivisions Y = 1 -set Subdivisions Z = 1 - -set Refine factor = 8 - -# Set the polynomial degree of the element (allowed values: 1, 2, or 3) -set Element degree = 1 - -# ================================================================================= -# Set the time step parameters -# ================================================================================= -# The size of the time step -set Time step = 1.0e-2 - -# The simulation ends when either the number of time steps is reached or the -# simulation time is reached. -set Number of time steps = 20000 - -# ================================================================================= -# Set the boundary conditions -# ================================================================================= -# ADD MORE COMMENTS -set Boundary condition for variable n = NATURAL - -# ================================================================================= -# Set the model constants -# ================================================================================= - -# ================================================================================= -# Set the output parameters -# ================================================================================= -# Type of spacing between outputs ("EQUAL_SPACING", "LOG_SPACING", "N_PER_DECADE", -# or "LIST") -set Output condition = EQUAL_SPACING - -# Number of times the program outputs the fields (total number for "EQUAL_SPACING" -# and "LOG_SPACING", number per decade for "N_PER_DECADE", ignored for "LIST") -set Number of outputs = 10 - -set List of time steps to output = 0, 3, 55, 61 - -# The number of time steps between updates being printed to the screen -set Skip print steps = 1000 - -# ================================================================================= -# Set the parameters for loading in initial conditions (OPTIONAL) -# ================================================================================= -# ADD MORE COMMENTS -set Load initial conditions = false -set Load parallel file = true -set File names = void -set Variable names in the files = void diff --git a/tests/unit_tests/postprocess.h b/tests/unit_tests/postprocess.h deleted file mode 100644 index 161c3baa8..000000000 --- a/tests/unit_tests/postprocess.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * postprocess.h - * - * Created on: Mar 29, 2017 - * Author: stephendewitt - */ - -#ifndef APPLICATIONS_UNITTESTS_POSTPROCESS_H_ -#define APPLICATIONS_UNITTESTS_POSTPROCESS_H_ - -// ================================================================================= - -template -void -postProcessedFields(const std::vector> &modelVariablesList, - std::vector> &modelResidualsList, - const dealii::Point> q_point_loc, - const list_of_CIJ material_moduli) -{} - -// ================================================================================= - -// Template instantiations -template void -postProcessedFields<2>( - const std::vector> &modelVariablesList, - std::vector> &modelResidualsList, - const dealii::Point<2, dealii::VectorizedArray> q_point_loc, - const list_of_CIJ<2> material_moduli); - -template void -postProcessedFields<3>( - const std::vector> &modelVariablesList, - std::vector> &modelResidualsList, - const dealii::Point<3, dealii::VectorizedArray> q_point_loc, - const list_of_CIJ<3> material_moduli); - -#endif /* APPLICATIONS_UNITTESTS_POSTPROCESS_H_ */ diff --git a/tests/unit_tests/test_FloodFiller.h b/tests/unit_tests/test_FloodFiller.h deleted file mode 100644 index c0cbb1f3b..000000000 --- a/tests/unit_tests/test_FloodFiller.h +++ /dev/null @@ -1,415 +0,0 @@ -// Unit tests for the class "FloodFiller" -#include "../../include/FloodFiller.h" - -template -class InitialConditionFloodFill : public dealii::Function -{ -public: - InitialConditionFloodFill() - : dealii::Function(1) - { - std::srand(dealii::Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) + 1); - } - - double - value(const dealii::Point &p, const unsigned int component = 0) const override - { - double val; - if (p[1] < 0.6 and p[0] > p[1] + 1.0e-10) - { - val = 1.0; - } - else if (p[0] < 0.1 and p[1] > 0.9) - { - val = 1.0; - } - else - { - val = 0.0; - } - - // std::cout << p[0] << "\t" << p[1] << "\t" << val << std::endl; - return val; - }; -}; - -template -void -setExpectedVertexLists( - std::vector>> &expected_vertex_list0, - std::vector>> &expected_vertex_list1) -{ - // expected_vertex_list0 - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(0.25, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 0.25); - vertex_set[2] = p; - } - { - dealii::Point p(0.25, 0.25); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.25, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(0.5, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.25, 0.25); - vertex_set[2] = p; - } - { - dealii::Point p(0.5, 0.25); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.5, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(0.75, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.5, 0.25); - vertex_set[2] = p; - } - { - dealii::Point p(0.75, 0.25); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.75, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(1.0, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.75, 0.25); - vertex_set[2] = p; - } - { - dealii::Point p(1.0, 0.25); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.25, 0.25); - vertex_set[0] = p; - } - { - dealii::Point p(0.5, 0.25); - vertex_set[1] = p; - } - { - dealii::Point p(0.25, 0.5); - vertex_set[2] = p; - } - { - dealii::Point p(0.5, 0.5); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.5, 0.25); - vertex_set[0] = p; - } - { - dealii::Point p(0.75, 0.25); - vertex_set[1] = p; - } - { - dealii::Point p(0.5, 0.5); - vertex_set[2] = p; - } - { - dealii::Point p(0.75, 0.5); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.75, 0.25); - vertex_set[0] = p; - } - { - dealii::Point p(1.0, 0.25); - vertex_set[1] = p; - } - { - dealii::Point p(0.75, 0.5); - vertex_set[2] = p; - } - { - dealii::Point p(1.0, 0.5); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.5, 0.5); - vertex_set[0] = p; - } - { - dealii::Point p(0.75, 0.5); - vertex_set[1] = p; - } - { - dealii::Point p(0.5, 0.75); - vertex_set[2] = p; - } - { - dealii::Point p(0.75, 0.75); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.75, 0.5); - vertex_set[0] = p; - } - { - dealii::Point p(1.0, 0.5); - vertex_set[1] = p; - } - { - dealii::Point p(0.75, 0.75); - vertex_set[2] = p; - } - { - dealii::Point p(1.0, 0.75); - vertex_set[3] = p; - } - expected_vertex_list0.push_back(vertex_set); - } - - // expected_vertex_list1 - { - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.75); - vertex_set[0] = p; - } - { - dealii::Point p(0.25, 0.75); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(0.25, 1.0); - vertex_set[3] = p; - } - - expected_vertex_list1.push_back(vertex_set); - } -} - -template -bool -compareUnsortedVectors(std::vector>> vec1, - std::vector>> vec2, - double tolerance) -{ - if (vec1.size() != vec2.size()) - { - return false; - } - - for (unsigned int i = 0; i < vec1.size(); i++) - { - bool element_found = false; - for (unsigned int j = 0; j < vec2.size(); j++) - { - bool elements_equal = true; - for (unsigned int v = 0; v < dealii::Utilities::fixed_power(2.0); v++) - { - if (vec1[i][v].distance(vec2[j][v]) > tolerance) - { - elements_equal = false; - break; - } - } - element_found = elements_equal; - if (element_found) - { - break; - } - } - if (!element_found) - { - return false; - } - } - - return true; -} - -template -bool -unitTest::test_FloodFiller() -{ - char buffer[100]; - - std::cout << "\nTesting 'FloodFiller'... " << std::endl; - - bool pass = false; - - // Create the test mesh - parallel::distributed::Triangulation triangulation(MPI_COMM_WORLD); - GridGenerator::hyper_cube(triangulation); - triangulation.refine_global(2); - - const unsigned int degree = 1; - - FESystem fe(FE_Q(QGaussLobatto<1>(degree + 1)), 1); - DoFHandler dof_handler(triangulation); - dof_handler.distribute_dofs(fe); - IndexSet locally_relevant_dofs; - DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs); - - typename MatrixFree::AdditionalData additional_data; -#if (DEAL_II_VERSION_MAJOR < 9 && DEAL_II_VERSION_MINOR < 5) - additional_data.mpi_communicator = MPI_COMM_WORLD; -#endif - additional_data.tasks_parallel_scheme = - MatrixFree::AdditionalData::partition_partition; - additional_data.mapping_update_flags = - (update_values | update_gradients | update_JxW_values | update_quadrature_points); - QGaussLobatto<1> quadrature(degree + 1); - - AffineConstraints constraints; - constraints.clear(); - - dealii::MatrixFree matrixFreeObject; - matrixFreeObject.clear(); -#if (DEAL_II_VERSION_MAJOR == 9 && DEAL_II_VERSION_MINOR < 4) - matrixFreeObject.reinit(dof_handler, constraints, quadrature, additional_data); -#else - matrixFreeObject.reinit(MappingFE(FE_Q(QGaussLobatto<1>(degree + 1))), - dof_handler, - constraints, - quadrature, - additional_data); -#endif - - vectorType *solution_field; - solution_field = new vectorType; - matrixFreeObject.initialize_dof_vector(*solution_field, 0); - *solution_field = 0; - - // Set the field value - VectorTools::interpolate(dof_handler, - InitialConditionFloodFill(), - *solution_field); - - solution_field->update_ghost_values(); - - // solution_field->print(std::cout); - - // Create a FloodFiller object - QGaussLobatto quadrature2(degree + 1); - - FloodFiller test_object(fe, quadrature2); - std::vector> grain_sets; - test_object.calcGrainSets(fe, dof_handler, solution_field, 0.1, 1.1, 0, 0, grain_sets); - - std::vector>> expected_vertex_list0, - expected_vertex_list1; - - setExpectedVertexLists(expected_vertex_list0, expected_vertex_list1); - - bool result = false; - bool result0, result1; - if (grain_sets.size() == 2) - { - std::vector>> vertex_list0 = - grain_sets[0].getVertexList(); - - std::vector>> vertex_list1 = - grain_sets[1].getVertexList(); - - // Get the order in the canonical order - if (vertex_list0.size() == 1) - { - vertex_list0.swap(vertex_list1); - } - - if (vertex_list0.size() == 9) - { - result0 = compareUnsortedVectors(vertex_list0, expected_vertex_list0, 1.0e-3); - std::cout << "Subtest result for grain 0: " << result0 << std::endl; - } - else - { - result0 = false; - } - - if (vertex_list1.size() == 1) - { - result1 = compareUnsortedVectors(vertex_list1, expected_vertex_list1, 1.0e-3); - std::cout << "Subtest result for grain 1: " << result1 << std::endl; - } - else - { - result1 = false; - } - - result = result0 and result1; - } - - pass = result; - - snprintf(buffer, sizeof(buffer), "Test result for 'FloodFiller': %u\n", pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_LinearSolverParameters.h b/tests/unit_tests/test_LinearSolverParameters.h deleted file mode 100644 index 4f9e5de24..000000000 --- a/tests/unit_tests/test_LinearSolverParameters.h +++ /dev/null @@ -1,68 +0,0 @@ -// Unit tests for the class "nonlinearSolverParameters" -#include "../../include/SolverParameters.h" - -template -bool -unitTest::test_LinearSolverParameters() -{ - char buffer[100]; - - std::cout << "\nTesting 'LinearSolverParameters'... " << std::endl; - - // Create a nonlinearSolverParameters object - LinearSolverParameters test_object; - - test_object.loadParameters(2, ABSOLUTE_RESIDUAL, 1.0e-3, 123); - test_object.loadParameters(5, RELATIVE_RESIDUAL_CHANGE, 1.0e-4, 124); - - // Subtests - unsigned int subtest_index = 0; - bool result; - bool pass = true; - - // Subtest 1 - subtest_index++; - result = false; - if (test_object.getMaxIterations(2) == 123 && test_object.getMaxIterations(5) == 124) - { - result = true; - } - std::cout << "Subtest " << subtest_index << " result for 'getMaxIterations': " << result - << std::endl; - - pass = pass && result; - - // Subtest 2 - subtest_index++; - result = false; - if (test_object.getToleranceType(2) == ABSOLUTE_RESIDUAL && - test_object.getToleranceType(5) == RELATIVE_RESIDUAL_CHANGE) - { - result = true; - } - std::cout << "Subtest " << subtest_index << " result for 'getToleranceType': " << result - << std::endl; - - pass = pass && result; - - // Subtest 3 - subtest_index++; - result = false; - if (std::abs(test_object.getToleranceValue(2) - 1.0e-3) < 1.0e-12 && - std::abs(test_object.getToleranceValue(5) - 1.0e-4) < 1.0e-12) - { - result = true; - } - std::cout << "Subtest " << subtest_index - << " result for 'getToleranceValue': " << result << std::endl; - - pass = pass && result; - - snprintf(buffer, - sizeof(buffer), - "Test result for 'LinearSolverParameters': %u\n", - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_NonlinearSolverParameters.h b/tests/unit_tests/test_NonlinearSolverParameters.h deleted file mode 100644 index f8c252350..000000000 --- a/tests/unit_tests/test_NonlinearSolverParameters.h +++ /dev/null @@ -1,96 +0,0 @@ -// Unit tests for the class "nonlinearSolverParameters" -#include "../../include/SolverParameters.h" - -template -bool -unitTest::test_NonlinearSolverParameters() -{ - char buffer[100]; - - std::cout << "\nTesting 'NonlinearSolverParameters'... " << std::endl; - - // Create a nonlinearSolverParameters object - NonlinearSolverParameters test_object; - - test_object.setMaxIterations(123); - test_object.loadParameters(2, ABSOLUTE_RESIDUAL, 1.0e-3, true, 0.5, 1.0, 1.0, false); - test_object - .loadParameters(5, RELATIVE_RESIDUAL_CHANGE, 1.0e-4, false, 0.5, 1.0, 0.5, false); - - // Subtests - unsigned int subtest_index = 0; - bool result; - bool pass = true; - - // Subtest 1 - subtest_index++; - result = false; - if (test_object.getMaxIterations() == 123) - { - result = true; - } - std::cout << "Subtest " << subtest_index << " result for 'getMaxIterations': " << result - << std::endl; - - pass = pass && result; - - // Subtest 2 - subtest_index++; - result = false; - if (test_object.getToleranceType(2) == ABSOLUTE_RESIDUAL && - test_object.getToleranceType(5) == RELATIVE_RESIDUAL_CHANGE) - { - result = true; - } - std::cout << "Subtest " << subtest_index << " result for 'getToleranceType': " << result - << std::endl; - - pass = pass && result; - - // Subtest 3 - subtest_index++; - result = false; - if (std::abs(test_object.getToleranceValue(2) - 1.0e-3) < 1.0e-12 && - std::abs(test_object.getToleranceValue(5) - 1.0e-4) < 1.0e-12) - { - result = true; - } - std::cout << "Subtest " << subtest_index - << " result for 'getToleranceValue': " << result << std::endl; - - pass = pass && result; - - // Subtest 4 - subtest_index++; - result = false; - if (test_object.getBacktrackDampingFlag(2) == true && - test_object.getBacktrackDampingFlag(5) == false) - { - result = true; - } - std::cout << "Subtest " << subtest_index - << " result for 'getBacktraceDampingFlag': " << result << std::endl; - - pass = pass && result; - - // Subtest 5 - subtest_index++; - result = false; - if (std::abs(test_object.getDefaultDampingCoefficient(2) - 1.0) < 1.0e-12 && - std::abs(test_object.getDefaultDampingCoefficient(5) - 0.5) < 1.0e-12) - { - result = true; - } - std::cout << "Subtest " << subtest_index - << " result for 'getDefaultDampingCoefficient': " << result << std::endl; - - pass = pass && result; - - snprintf(buffer, - sizeof(buffer), - "Test result for 'NonlinearSolverParameters': %u\n", - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_OrderParameterRemapper.h b/tests/unit_tests/test_OrderParameterRemapper.h deleted file mode 100644 index cd6e86876..000000000 --- a/tests/unit_tests/test_OrderParameterRemapper.h +++ /dev/null @@ -1,236 +0,0 @@ -#include "../../include/OrderParameterRemapper.h" - -template -class InitialConditionOrderParameterRemapper : public dealii::Function -{ -public: - InitialConditionOrderParameterRemapper(unsigned int _index) - : dealii::Function(1) - , index(_index) - { - std::srand(dealii::Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) + 1); - } - - double - value(const dealii::Point &p, const unsigned int component = 0) const override - { - double val; - - if (index == 0) - { - dealii::Point center0(0.125, 0.125); - dealii::Point center1(1.0, 1.0); - - if (p.distance(center0) < std::sqrt(2.0) * 0.15 or - p.distance(center1) < std::sqrt(2.0) * 0.15) - { - val = 1.0; - } - else - { - val = 0.0; - } - } - else - { - val = 0.0; - } - - // std::cout << index << "\t" << p[0] << "\t" << p[1] << "\t" << val << - // std::endl; - return val; - }; - -private: - unsigned int index; -}; - -template -bool -unitTest::test_OrderParameterRemapper() -{ - char buffer[100]; - - std::cout << "\nTesting 'OrderParameterRemapper'... " << std::endl; - - bool pass = false; - - // -------- Create the test mesh and solution vectors - - // Create the test mesh - parallel::distributed::Triangulation triangulation(MPI_COMM_WORLD); - GridGenerator::hyper_cube(triangulation); - triangulation.refine_global(2); - - const unsigned int degree = 1; - - FESystem fe(FE_Q(QGaussLobatto<1>(degree + 1)), 1); - DoFHandler dof_handler(triangulation); - dof_handler.distribute_dofs(fe); - IndexSet locally_relevant_dofs; - DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs); - - typename MatrixFree::AdditionalData additional_data; -#if (DEAL_II_VERSION_MAJOR < 9 && DEAL_II_VERSION_MINOR < 5) - additional_data.mpi_communicator = MPI_COMM_WORLD; -#endif - additional_data.tasks_parallel_scheme = - MatrixFree::AdditionalData::partition_partition; - additional_data.mapping_update_flags = - (update_values | update_gradients | update_JxW_values | update_quadrature_points); - QGaussLobatto<1> quadrature(degree + 1); - - AffineConstraints constraints; - constraints.clear(); - - dealii::MatrixFree matrixFreeObject; - matrixFreeObject.clear(); -#if (DEAL_II_VERSION_MAJOR == 9 && DEAL_II_VERSION_MINOR < 4) - matrixFreeObject.reinit(dof_handler, constraints, quadrature, additional_data); -#else - matrixFreeObject.reinit(MappingFE(FE_Q(QGaussLobatto<1>(degree + 1))), - dof_handler, - constraints, - quadrature, - additional_data); -#endif - - vectorType *solution_field_0; - solution_field_0 = new vectorType; - matrixFreeObject.initialize_dof_vector(*solution_field_0, 0); - *solution_field_0 = 0; - - // Set the value for field 0 - VectorTools::interpolate(dof_handler, - InitialConditionOrderParameterRemapper(0), - *solution_field_0); - - solution_field_0->update_ghost_values(); - - vectorType *solution_field_1; - solution_field_1 = new vectorType; - matrixFreeObject.initialize_dof_vector(*solution_field_1, 0); - *solution_field_1 = 0; - - // Set the value for field 1 - VectorTools::interpolate(dof_handler, - InitialConditionOrderParameterRemapper(1), - *solution_field_1); - - solution_field_1->update_ghost_values(); - - std::vector solution_fields; - solution_fields.push_back(solution_field_0); - solution_fields.push_back(solution_field_1); - - // ---------- Create the simplified grain representations ----------- - - QGaussLobatto quadrature2(degree + 1); - - FloodFiller test_object(fe, quadrature2); - std::vector> grain_sets_0; - test_object - .calcGrainSets(fe, dof_handler, solution_field_0, 0.1, 1.1, 0, 0, grain_sets_0); - - std::vector> grain_sets_1; - test_object - .calcGrainSets(fe, dof_handler, solution_field_1, 0.1, 1.1, 0, 1, grain_sets_1); - - std::vector> grain_sets = grain_sets_0; - grain_sets.insert(grain_sets.end(), grain_sets_1.begin(), grain_sets_1.end()); - - for (unsigned int g = 0; g < grain_sets.size(); g++) - { - grain_sets.at(g).setGrainIndex(g); - } - - std::vector> simplified_grain_representations; - for (unsigned int g = 0; g < grain_sets.size(); g++) - { - SimplifiedGrainRepresentation simplified_grain_representation( - grain_sets.at(g)); - simplified_grain_representations.push_back(simplified_grain_representation); - } - - std::vector order_parameter_id_list; - order_parameter_id_list.push_back(0); - order_parameter_id_list.push_back(1); - - SimplifiedGrainManipulator simplified_grain_manipulator; - simplified_grain_manipulator.reassignGrains(simplified_grain_representations, - 0.6, - order_parameter_id_list); - - // ---------- The actual test run of OrderParameterRemapper ----------- - OrderParameterRemapper order_parameter_remapper; - order_parameter_remapper.remap(simplified_grain_representations, - solution_fields, - dof_handler, - fe.dofs_per_cell, - 0.001); - - // ---------- Check the result ----------- - pass = true; - - for (unsigned int dof = 0; dof < solution_fields.at(0)->size(); ++dof) - { - if (solution_field_0->in_local_range(dof)) - { - if (dof < 24) - { - if (std::abs((*solution_fields.at(0))[dof] - 0.0) > 1.0e-10) - { - pass = false; - std::cout << "Incorrect value for field 0, dof " << dof << ": " - << (*solution_fields.at(0))[dof] << " Expected value is 0" - << std::endl; - } - } - else - { - if (std::abs((*solution_fields.at(0))[dof] - 1.0) > 1.0e-10) - { - pass = false; - std::cout << "Incorrect value for field 0, dof " << dof << ": " - << (*solution_fields.at(0))[dof] << " Expected value is 1" - << std::endl; - } - } - } - } - - for (unsigned int dof = 0; dof < solution_fields.at(1)->size(); ++dof) - { - if (solution_field_1->in_local_range(dof)) - { - if (dof < 4) - { - if (std::abs((*solution_fields.at(1))[dof] - 1.0) > 1.0e-10) - { - pass = false; - std::cout << "Incorrect value for field 1, dof " << dof << ": " - << (*solution_fields.at(1))[dof] << " Expected value is 1" - << std::endl; - } - } - else - { - if (std::abs((*solution_fields.at(1))[dof] - 0.0) > 1.0e-10) - { - pass = false; - std::cout << "Incorrect value for field 1, dof " << dof << ": " - << (*solution_fields.at(1))[dof] << " Expected value is 0" - << std::endl; - } - } - } - } - - snprintf(buffer, - sizeof(buffer), - "Test result for 'OrderParameterRemapper': %u\n", - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_SimplifiedGrainManipulator.h b/tests/unit_tests/test_SimplifiedGrainManipulator.h deleted file mode 100644 index 8e64c3e57..000000000 --- a/tests/unit_tests/test_SimplifiedGrainManipulator.h +++ /dev/null @@ -1,488 +0,0 @@ -#include "../../include/SimplifiedGrainRepresentation.h" - -template -bool -unitTest::test_SimplifiedGrainManipulator_transferGrainIds() -{ - char buffer[100]; - - std::cout << "\nTesting 'SimplifiedGrainManipulator::transferGrainIds'... " - << std::endl; - - bool pass = true; - - // Subtest 1 (two grains both needing reassignment) - { - // Create grain 0_old with center (0.5, 0.5), radius 0.5*sqrt(2), and order - // parameter 0 - GrainSet test_grain_set_0; - { - test_grain_set_0.setGrainIndex(0); - test_grain_set_0.setOrderParameterIndex(0); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(1.0, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(1.0, 1.0); - vertex_set[3] = p; - } - - test_grain_set_0.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_0( - test_grain_set_0); - - // Create grain 1_old with center (4.5, 0.5), radius 0.5*sqrt(2), and order - // parameter 1 - GrainSet test_grain_set_1; - { - test_grain_set_1.setGrainIndex(1); - test_grain_set_1.setOrderParameterIndex(1); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(4.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(5.0, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(4.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(5.0, 1.0); - vertex_set[3] = p; - } - - test_grain_set_1.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_1( - test_grain_set_1); - - // Create grain 0_new with center (0.6, 0.6), radius 0.6*sqrt(2), and order - // parameter 0 - GrainSet test_grain_set_0_new; - { - test_grain_set_0_new.setGrainIndex(5); - test_grain_set_0_new.setOrderParameterIndex(0); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(1.2, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.2); - vertex_set[2] = p; - } - { - dealii::Point p(1.2, 1.2); - vertex_set[3] = p; - } - - test_grain_set_0_new.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_0_new( - test_grain_set_0_new); - - // Create grain 1_new with center (4.6, 0.6), radius 0.6*sqrt(2), and order - // parameter 1 - GrainSet test_grain_set_1_new; - { - test_grain_set_1.setGrainIndex(3); - test_grain_set_1.setOrderParameterIndex(1); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(4.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(5.2, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(4.0, 1.2); - vertex_set[2] = p; - } - { - dealii::Point p(5.2, 1.2); - vertex_set[3] = p; - } - - test_grain_set_1_new.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_1_new( - test_grain_set_1_new); - - // Now build of the vectors of these grain representations - std::vector> old_grain_representations, - new_grain_representations; - old_grain_representations.push_back(simplified_grain_representation_0); - old_grain_representations.push_back(simplified_grain_representation_1); - new_grain_representations.push_back(simplified_grain_representation_0_new); - new_grain_representations.push_back(simplified_grain_representation_1_new); - - // Now run the actual test - std::cout << "Grain ids before transfer: " - << new_grain_representations.at(0).getGrainId() << " " - << new_grain_representations.at(1).getGrainId() << std::endl; - - SimplifiedGrainManipulator simplified_grain_manipulator; - simplified_grain_manipulator.transferGrainIds(old_grain_representations, - new_grain_representations); - - std::cout << "Grain ids after transfer: " - << new_grain_representations.at(0).getGrainId() << " " - << new_grain_representations.at(1).getGrainId() << std::endl; - - bool result = false; - if (new_grain_representations.at(0).getGrainId() == 0 and - new_grain_representations.at(1).getGrainId() == 1) - { - result = true; - } - pass = pass & result; - } - - snprintf(buffer, - sizeof(buffer), - "Test result for 'SimplifiedGrainManipulator::transferGrainIds': %u\n", - pass); - std::cout << buffer; - - return pass; -} - -template -bool -unitTest::test_SimplifiedGrainManipulator_reassignGrains() -{ - char buffer[100]; - - std::cout << "\nTesting 'SimplifiedGrainManipulator::reassignGrains'... " << std::endl; - - bool pass = true; - - // Subtest 1 (three grains, two order parameters, one grain needs - // reassignment) - { - // Create grain 0 with center (0.5, 0.5), radius 0.5*sqrt(2), and order - // parameter 0 - GrainSet test_grain_set_0; - { - test_grain_set_0.setGrainIndex(0); - test_grain_set_0.setOrderParameterIndex(0); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(1.0, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(1.0, 1.0); - vertex_set[3] = p; - } - - test_grain_set_0.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_0( - test_grain_set_0); - - // Create grain 1 with center (4.5, 0.5), radius 0.5*sqrt(2), and order - // parameter 1 - GrainSet test_grain_set_1; - { - test_grain_set_1.setGrainIndex(1); - test_grain_set_1.setOrderParameterIndex(1); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(4.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(5.0, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(4.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(5.0, 1.0); - vertex_set[3] = p; - } - - test_grain_set_1.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_1( - test_grain_set_1); - - // Create grain 2 with center (0.6, 0.6), radius 0.6*sqrt(2), and order - // parameter 0 - GrainSet test_grain_set_2; - { - test_grain_set_2.setGrainIndex(2); - test_grain_set_2.setOrderParameterIndex(0); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(1.2, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.2); - vertex_set[2] = p; - } - { - dealii::Point p(1.2, 1.2); - vertex_set[3] = p; - } - - test_grain_set_2.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_2( - test_grain_set_2); - - // Now build of the vectors of these grain representations - std::vector> grain_representations; - grain_representations.push_back(simplified_grain_representation_0); - grain_representations.push_back(simplified_grain_representation_1); - grain_representations.push_back(simplified_grain_representation_2); - - std::vector order_parameter_id_list; - order_parameter_id_list.push_back(0); - order_parameter_id_list.push_back(1); - - // Now run the actual test - /* - for (unsigned int g=0; g < grain_representations.size(); g++){ - std::cout << "Grain ops before reassignment: " << - grain_representations.at(g).getOrderParameterId() << std::endl; - } - */ - SimplifiedGrainManipulator simplified_grain_manipulator; - simplified_grain_manipulator.reassignGrains(grain_representations, - 0.5, - order_parameter_id_list); - /* - for (unsigned int g=0; g < grain_representations.size(); g++){ - std::cout << "Grain ops after reassignment: " << - grain_representations.at(g).getOrderParameterId() << std::endl; - } - */ - bool result = false; - if (grain_representations.at(0).getOrderParameterId() == 1 and - grain_representations.at(1).getOrderParameterId() == 1 and - grain_representations.at(2).getOrderParameterId() == 0) - { - result = true; - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 1 result for 'SimplifiedGrainManipulator::reassignGrains': %u\n", - result); - std::cout << buffer; - - pass = pass & result; - } - - // Subtest 2 (three grains, two order parameters, no grains need reassignment) - { - // Create grain 0 with center (0.5, 0.5), radius 0.5*sqrt(2), and order - // parameter 0 - GrainSet test_grain_set_0; - { - test_grain_set_0.setGrainIndex(0); - test_grain_set_0.setOrderParameterIndex(0); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(1.0, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(1.0, 1.0); - vertex_set[3] = p; - } - - test_grain_set_0.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_0( - test_grain_set_0); - - // Create grain 1 with center (4.5, 0.5), radius 0.5*sqrt(2), and order - // parameter 1 - GrainSet test_grain_set_1; - { - test_grain_set_1.setGrainIndex(1); - test_grain_set_1.setOrderParameterIndex(1); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(4.0, 0.0); - vertex_set[0] = p; - } - { - dealii::Point p(5.0, 0.0); - vertex_set[1] = p; - } - { - dealii::Point p(4.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(5.0, 1.0); - vertex_set[3] = p; - } - - test_grain_set_1.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_1( - test_grain_set_1); - - // Create grain 2 with center (2.5, 2.5), radius 0.5*sqrt(2), and order - // parameter 0 - GrainSet test_grain_set_2; - { - test_grain_set_2.setGrainIndex(2); - test_grain_set_2.setOrderParameterIndex(0); - - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(2.0, 2.0); - vertex_set[0] = p; - } - { - dealii::Point p(3.0, 2.0); - vertex_set[1] = p; - } - { - dealii::Point p(2.0, 3.0); - vertex_set[2] = p; - } - { - dealii::Point p(3.0, 3.0); - vertex_set[3] = p; - } - - test_grain_set_2.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation_2( - test_grain_set_2); - - // Now build of the vectors of these grain representations - std::vector> grain_representations; - grain_representations.push_back(simplified_grain_representation_0); - grain_representations.push_back(simplified_grain_representation_1); - grain_representations.push_back(simplified_grain_representation_2); - - std::vector order_parameter_id_list; - order_parameter_id_list.push_back(0); - order_parameter_id_list.push_back(1); - - // Now run the actual test - /* - for (unsigned int g=0; g < grain_representations.size(); g++){ - std::cout << "Grain ops before reassignment: " << - grain_representations.at(g).getOrderParameterId() << std::endl; - } - */ - - SimplifiedGrainManipulator simplified_grain_manipulator; - simplified_grain_manipulator.reassignGrains(grain_representations, - 0.5, - order_parameter_id_list); - - /* - for (unsigned int g=0; g < grain_representations.size(); g++){ - std::cout << "Grain ops after reassignment: " << - grain_representations.at(g).getOrderParameterId() << std::endl; - } - */ - - bool result = false; - if (grain_representations.at(0).getOrderParameterId() == 0 and - grain_representations.at(1).getOrderParameterId() == 1 and - grain_representations.at(2).getOrderParameterId() == 0) - { - result = true; - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 2 result for 'SimplifiedGrainManipulator::reassignGrains': %u\n", - result); - std::cout << buffer; - - pass = pass & result; - } - - snprintf(buffer, - sizeof(buffer), - "Test result for 'SimplifiedGrainManipulator::reassignGrains': %u\n", - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_SimplifiedGrainRepresentation.h b/tests/unit_tests/test_SimplifiedGrainRepresentation.h deleted file mode 100644 index 4b8c04151..000000000 --- a/tests/unit_tests/test_SimplifiedGrainRepresentation.h +++ /dev/null @@ -1,170 +0,0 @@ -#include "../../include/SimplifiedGrainRepresentation.h" - -template -bool -unitTest::test_SimplifiedGrainRepresentation() -{ - char buffer[100]; - - std::cout << "\nTesting 'SimplifiedGrainRepresentation'... " << std::endl; - - bool pass = true; - - // Subtest 1 (single element) - { - GrainSet test_grain_set; - - test_grain_set.setGrainIndex(2); - - std::vector> vertex_set(dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.75); - vertex_set[0] = p; - } - { - dealii::Point p(0.25, 0.75); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(0.25, 1.0); - vertex_set[3] = p; - } - - test_grain_set.addVertexList(vertex_set); - - SimplifiedGrainRepresentation simplified_grain_representation(test_grain_set); - - std::cout << "Centroid: " << simplified_grain_representation.getCenter() << std::endl; - std::cout << "Radius: " << simplified_grain_representation.getRadius() << std::endl; - - bool result = false; - if ((std::abs(simplified_grain_representation.getCenter()(0) - 0.125) < 1.0e-10) and - (std::abs(simplified_grain_representation.getCenter()(1) - 0.875) < 1.0e-10) and - (std::abs(simplified_grain_representation.getRadius() - 0.125 * std::sqrt(2.0)) < - 1.0e-10)) - { - result = true; - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 1 result for 'SimplifiedGrainRepresentation': %u\n", - result); - std::cout << buffer; - pass = pass and result; - } - - // Subtest 2 (L-shaped grain) - { - GrainSet test_grain_set; - - test_grain_set.setGrainIndex(2); - - { - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.75); - vertex_set[0] = p; - } - { - dealii::Point p(0.25, 0.75); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(0.25, 1.0); - vertex_set[3] = p; - } - - test_grain_set.addVertexList(vertex_set); - } - { - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.0, 0.5); - vertex_set[0] = p; - } - { - dealii::Point p(0.25, 0.5); - vertex_set[1] = p; - } - { - dealii::Point p(0.0, 0.75); - vertex_set[2] = p; - } - { - dealii::Point p(0.25, 0.75); - vertex_set[3] = p; - } - - test_grain_set.addVertexList(vertex_set); - } - { - std::vector> vertex_set( - dealii::Utilities::fixed_power(2.0)); - { - dealii::Point p(0.25, 0.75); - vertex_set[0] = p; - } - { - dealii::Point p(0.5, 0.75); - vertex_set[1] = p; - } - { - dealii::Point p(0.25, 1.0); - vertex_set[2] = p; - } - { - dealii::Point p(0.5, 1.0); - vertex_set[3] = p; - } - - test_grain_set.addVertexList(vertex_set); - } - - SimplifiedGrainRepresentation simplified_grain_representation(test_grain_set); - - std::cout << "Centroid: " << simplified_grain_representation.getCenter() << std::endl; - std::cout << "Radius: " << simplified_grain_representation.getRadius() << std::endl; - - bool result = false; - - double centroid_x = (0.125 * 3.0 + 0.25) / 3.0; - double centroid_y = (0.875 * 3.0 - 0.25) / 3.0; - double radius = std::sqrt(dealii::Utilities::fixed_power<2>(centroid_x - 0.5) + - dealii::Utilities::fixed_power<2>(centroid_y - 1.0)); - - if ((std::abs(simplified_grain_representation.getCenter()(0) - centroid_x) < - 1.0e-10) and - (std::abs(simplified_grain_representation.getCenter()(1) - centroid_y) < - 1.0e-10) and - (std::abs(simplified_grain_representation.getRadius() - radius) < 1.0e-10)) - { - result = true; - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 2 result for 'SimplifiedGrainRepresentation': %u\n", - result); - std::cout << buffer; - pass = pass and result; - } - - snprintf(buffer, - sizeof(buffer), - "Test result for 'SimplifiedGrainRepresentation': %u\n", - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_computeStress.h b/tests/unit_tests/test_computeStress.h deleted file mode 100644 index 265968468..000000000 --- a/tests/unit_tests/test_computeStress.h +++ /dev/null @@ -1,186 +0,0 @@ -// Unit test(s) for the method "computeStress" -template -void -unitTest::assignCIJSize(dealii::Table<2, double> &CIJ) -{ - dealii::TableIndices<2> new_size; - new_size[0] = 2 * dim - 1 + dim / 3; - new_size[1] = 2 * dim - 1 + dim / 3; - CIJ.reinit(new_size); -} - -template -void -unitTest::assignCIJSize( - dealii::VectorizedArray CIJ[2 * dim - 1 + dim / 3][2 * dim - 1 + dim / 3]) -{ - // The size of the vectorized array is already set -} - -template -bool -unitTest::test_computeStress() -{ - bool pass = false; - std::cout << "Testing 'computeStress' in " << dim << " dimension(s)..." << std::endl; - - // Initialize CIJ - T CIJ; - - this->assignCIJSize(CIJ); - - if (dim == 1) - { - CIJ[0][0] = 2.5; - } - else if (dim == 2) - { - CIJ[0][0] = 6.8; - CIJ[1][0] = 2.5; - CIJ[2][0] = 4.0; - CIJ[0][1] = 1.2; - CIJ[1][1] = 10.1; - CIJ[2][1] = 3.7; - CIJ[0][2] = 9.3; - CIJ[1][2] = 2.7; - CIJ[2][2] = 8.8; - } - else if (dim == 3) - { - CIJ[0][0] = 1.1; - CIJ[1][1] = 7.7; - CIJ[2][2] = 6.6; - CIJ[3][3] = 3.3; - CIJ[4][4] = 11.6; - CIJ[5][5] = 19.5; - CIJ[0][1] = CIJ[1][0] = 9.5; - CIJ[0][2] = CIJ[2][0] = 2.1; - CIJ[0][3] = CIJ[3][0] = 1.5; - CIJ[0][4] = CIJ[4][0] = 9.2; - CIJ[0][5] = CIJ[5][0] = 18.6; - CIJ[1][2] = CIJ[2][1] = 5.6; - CIJ[1][3] = CIJ[3][1] = 4.7; - CIJ[1][4] = CIJ[4][1] = 6.4; - CIJ[1][5] = CIJ[5][1] = 5.9; - CIJ[2][3] = CIJ[3][2] = 15.5; - CIJ[2][4] = CIJ[4][2] = 63.1; - CIJ[2][5] = CIJ[5][2] = 50.0; - CIJ[3][4] = CIJ[4][3] = 92.5; - CIJ[3][5] = CIJ[5][3] = 1.3; - CIJ[4][5] = CIJ[5][4] = 23.2; - } - - // Initialize ux and R, both vectorized arrays - dealii::VectorizedArray R[dim][dim], ux[dim][dim]; - - if (dim == 1) - { - ux[0][0] = 1.0; - } - else if (dim == 2) - { - ux[0][0] = 1.0; - ux[1][0] = 2.0; - ux[0][1] = 3.0; - ux[1][1] = 4.0; - } - else if (dim == 3) - { - ux[0][0] = 1.0; - ux[1][0] = 2.0; - ux[2][0] = 3.0; - ux[0][1] = 4.0; - ux[1][1] = 5.0; - ux[2][1] = 6.0; - ux[0][2] = 7.0; - ux[1][2] = 8.0; - ux[2][2] = 9.0; - } - else - { - std::cerr << "Error: Number of dimensions must be between 1 and 3" << std::endl; - } - - computeStress(CIJ, ux, R); - - if (dim == 1) - { - if (abs(R[0][0][0] - 2.5) < 1.0e-10) - { - pass = true; - } - } - else if (dim == 2) - { - int pass_counter = 0; - if (abs(R[0][0][0] - 58.1) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[1][1][0] - 56.4) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[0][1][0] - 62.8) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[1][0][0] - 62.8) < 1.0e-10) - { - pass_counter++; - } - if (pass_counter == 4) - { - pass = true; - } - } - else if (dim == 3) - { - int pass_counter = 0; - if (abs(R[0][0][0] - 292.1) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[1][1][0] - 263.6) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[2][2][0] - 1237.5) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[1][2][0] - 1143.5) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[2][1][0] - 1143.5) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[0][2][0] - 2159.3) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[2][0][0] - 2159.3) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[0][1][0] - 865.3) < 1.0e-10) - { - pass_counter++; - } - if (abs(R[1][0][0] - 865.3) < 1.0e-10) - { - pass_counter++; - } - if (pass_counter == 9) - { - pass = true; - } - } - - std::cout << "Test result for 'computeStress' in " << dim << " dimension(s): " << pass - << std::endl; - - return pass; -} diff --git a/tests/unit_tests/test_get_entry_name_ending_list.h b/tests/unit_tests/test_get_entry_name_ending_list.h deleted file mode 100644 index 52e552182..000000000 --- a/tests/unit_tests/test_get_entry_name_ending_list.h +++ /dev/null @@ -1,49 +0,0 @@ -// Unit test(s) for the method "get_entry_name_ending_list" - -template -bool -unitTest::test_get_entry_name_ending_list() -{ - bool pass = false; - - char buffer[100]; - - std::cout << "\nTesting 'get_entry_name_ending_list'... " << std::endl; - - // create test problem class object - variableAttributeLoader variable_attributes; - inputFileReader input_file_reader("parameters_test.prm", variable_attributes); - std::vector entry_name_ending_list; - entry_name_ending_list = - input_file_reader.get_entry_name_ending_list("get_entry_name_ending_list_tester.prm", - "set", - "Model constant"); - - /* - // Output the strings to see what, if anything, is going wrong - for (unsigned int i=0; i < entry_name_ending_list.size(); i++){ - std::cout << entry_name_ending_list[i] << std::endl; - } - */ - - if (entry_name_ending_list.size() != 5) - { - pass = false; - } - else - { - pass = (boost::iequals(entry_name_ending_list[0], "abc") && - boost::iequals(entry_name_ending_list[1], "dfg") && - boost::iequals(entry_name_ending_list[2], "i j k") && - boost::iequals(entry_name_ending_list[3], "qrs") && - boost::iequals(entry_name_ending_list[4], "t uv")); - } - - snprintf(buffer, - sizeof(buffer), - "Test result for 'get_entry_name_ending_list': %u\n", - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_get_subsection_entry_list.h b/tests/unit_tests/test_get_subsection_entry_list.h deleted file mode 100644 index 67ea1aaa7..000000000 --- a/tests/unit_tests/test_get_subsection_entry_list.h +++ /dev/null @@ -1,41 +0,0 @@ -// Unit test(s) for the method "parse_line" - -template -bool -unitTest::test_get_subsection_entry_list() -{ - bool pass = false; - - char buffer[100]; - - std::cout << "\nTesting 'get_subsection_entry_list'... " << std::endl; - - // create test problem class object - variableAttributeLoader variable_attributes; - inputFileReader input_file_reader("parameters_test.prm", variable_attributes); - std::vector list_of_entries; - list_of_entries = - input_file_reader.get_subsection_entry_list("input_file_parser_test_file.txt", - "Equation", - "Variable type", - "SCALAR"); - - if (list_of_entries.size() != 3) - { - pass = false; - } - else - { - pass = (boost::iequals(list_of_entries[0], "SCALAR") && - boost::iequals(list_of_entries[1], "VECTOR") && - boost::iequals(list_of_entries[2], "SCALAR")); - } - - snprintf(buffer, - sizeof(buffer), - "Test result for 'get_subsection_entry_list': %u\n", - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_invM.h b/tests/unit_tests/test_invM.h deleted file mode 100644 index 99664e31f..000000000 --- a/tests/unit_tests/test_invM.h +++ /dev/null @@ -1,143 +0,0 @@ -// Unit test(s) for the method "computeInvM" -template -class testInvM : public MatrixFreePDE -{ -public: - testInvM(userInputParameters _userInputs) - : MatrixFreePDE(_userInputs) - { - // Initialize the scalar test field object (needed for computeInvM()) - Field scalar_test_field(SCALAR, EXPLICIT_TIME_DEPENDENT, "c"); - this->fields.push_back(scalar_test_field); - - // Initialize the vector test field object (needed for computeInvM()) - Field vector_test_field(VECTOR, EXPLICIT_TIME_DEPENDENT, "c"); - this->fields.push_back(vector_test_field); - - // init the MatrixFreePDE class for testing - this->initForTests(this->fields); - - // call computeInvM() - this->computeInvM(); - invMNormscalar = this->invMscalar.l2_norm(); - invMNormvector = this->invMvector.l2_norm(); - }; - - ~testInvM() - { - this->matrixFreeObject.clear(); - }; - - double invMNormscalar; - - double invMNormvector; - - void - setBCs() {}; - - // Function to set the initial conditions (in ICs_and_BCs.h) - void - setInitialCondition(const dealii::Point &p, - const unsigned int index, - double &scalar_IC, - dealii::Vector &vector_IC) override {}; - - // Function to set the non-uniform Dirichlet boundary conditions (in - // ICs_and_BCs.h) - void - setNonUniformDirichletBCs(const dealii::Point &p, - const unsigned int index, - const unsigned int direction, - const double time, - double &scalar_BC, - dealii::Vector &vector_BC) override {}; - -private: - // RHS implementation for explicit solve - void - getRHS(const MatrixFree &data, - std::vector &dst, - const std::vector &src, - const std::pair &cell_range) const {}; - - // Function to set the RHS of the governing equations for explicit time - // dependent equations (in equations.h) - void - explicitEquationRHS( - variableContainer> &variable_list, - dealii::Point> q_point_loc, - [[maybe_unused]] dealii::VectorizedArray element_volume) const override {}; - - // Function to set the RHS of the governing equations for all other equations - // (in equations.h) - void - nonExplicitEquationRHS( - variableContainer> &variable_list, - dealii::Point> q_point_loc, - [[maybe_unused]] dealii::VectorizedArray element_volume) const override {}; - - // Function to set the LHS of the governing equations (in equations.h) - void - equationLHS( - variableContainer> &variable_list, - dealii::Point> q_point_loc, - [[maybe_unused]] dealii::VectorizedArray element_volume) const override {}; -}; - -template -bool -unitTest::test_computeInvM(int argc, - char **argv, - userInputParameters userInputs) -{ - bool pass = false; - bool pass_subtest1 = false; - bool pass_subtest2 = false; - - char buffer[100]; - std::cout << "\nTesting 'computeInvM' in " << dim << " dimension(s)...'" << std::endl; - - // create test problem class object - // userInputParameters userInputs; - // userInputs.loadUserInput(); - - testInvM test(userInputs); - - // Subtest 1 - check invMscalar norm - if (std::abs(test.invMNormscalar - 1700.0) < 1.0e-10) - { - pass_subtest1 = true; - } - snprintf(buffer, - sizeof(buffer), - "Subtest 1 scalar result for 'computeInvM' in %u dimension(s): %u\n", - dim, - pass_subtest1); - std::cout << buffer; - - // Subtest 2 - check invMscalar norm - if (std::abs(test.invMNormvector - 2404.16305603426098) < 1.0e-10) - { - pass_subtest2 = true; - } - snprintf(buffer, - sizeof(buffer), - "Subtest 2 vector result for 'computeInvM' in %u dimension(s): %u\n", - dim, - pass_subtest2); - std::cout << buffer; - - // Check if all subtests passed - if (pass_subtest2 && pass_subtest1) - { - pass = true; - } - snprintf(buffer, - sizeof(buffer), - "Test result for 'computeInvM' in %u dimension(s): %u\n", - dim, - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_load_BC_list.h b/tests/unit_tests/test_load_BC_list.h deleted file mode 100644 index 7e259bdf4..000000000 --- a/tests/unit_tests/test_load_BC_list.h +++ /dev/null @@ -1,95 +0,0 @@ -// Unit test(s) for the method "parse_line" - -template -bool -unitTest::test_load_BC_list() -{ - bool pass = false; - - char buffer[100]; - - std::cout << "\nTesting 'load_BC_list'... " << std::endl; - - // create test problem class object - variableAttributeLoader variable_attributes; - inputFileReader input_file_reader("parameters_test.prm", variable_attributes); - userInputParameters<2> userInputs(input_file_reader, - input_file_reader.parameter_handler, - variable_attributes); - - // 2D test: - std::vector list_of_BCs; - list_of_BCs.push_back("DIRICHLET: 2.5"); - list_of_BCs.push_back("PERIODIC,PERIODIC,NATURAL,NATURAL"); - list_of_BCs.push_back("DIRICHLET: 2.5,DIRICHLET: 1.5,NATURAL,NATURAL"); - - userInputs.BC_list.clear(); - userInputs.load_BC_list(list_of_BCs); - - bool pass1; - pass1 = userInputs.BC_list.size() == 3; - pass1 = pass1 && (userInputs.BC_list[0].var_BC_type.size() == 4); - for (unsigned int i = 0; i < userInputs.BC_list[0].var_BC_type.size(); i++) - { - pass1 = pass1 && (userInputs.BC_list[0].var_BC_type[i] == DIRICHLET); - pass1 = pass1 && (userInputs.BC_list[0].var_BC_val[i] == 2.5); - } - snprintf(buffer, sizeof(buffer), "Subtest 1 result for 'load_BC_list': %u\n", pass1); - std::cout << buffer; - - bool pass2; - pass2 = (userInputs.BC_list[1].var_BC_type[0] == PERIODIC); - pass2 = pass2 && (userInputs.BC_list[1].var_BC_type[1] == PERIODIC); - pass2 = pass2 && (userInputs.BC_list[1].var_BC_type[2] == NATURAL); - pass2 = pass2 && (userInputs.BC_list[1].var_BC_type[3] == NATURAL); - snprintf(buffer, sizeof(buffer), "Subtest 2 result for 'load_BC_list': %u\n", pass2); - std::cout << buffer; - - bool pass3; - pass3 = (userInputs.BC_list[2].var_BC_type[0] == DIRICHLET); - pass3 = pass3 && (userInputs.BC_list[2].var_BC_val[0] == 2.5); - pass3 = pass3 && (userInputs.BC_list[2].var_BC_type[1] == DIRICHLET); - pass3 = pass3 && (userInputs.BC_list[2].var_BC_val[1] == 1.5); - pass3 = pass3 && (userInputs.BC_list[2].var_BC_type[2] == NATURAL); - pass3 = pass3 && (userInputs.BC_list[2].var_BC_type[3] == NATURAL); - snprintf(buffer, sizeof(buffer), "Subtest 3 result for 'load_BC_list': %u\n", pass3); - std::cout << buffer; - - // 3D test: - list_of_BCs.clear(); - userInputParameters<3> userInputs_3D(input_file_reader, - input_file_reader.parameter_handler, - variable_attributes); - list_of_BCs.push_back("DIRICHLET: 2.5"); - list_of_BCs.push_back("PERIODIC,PERIODIC,NATURAL,NATURAL,PERIODIC,PERIODIC"); - - userInputs_3D.BC_list.clear(); - userInputs_3D.load_BC_list(list_of_BCs); - bool pass4; - pass4 = userInputs_3D.BC_list.size() == 2; - pass4 = pass4 && (userInputs_3D.BC_list[0].var_BC_type.size() == 6); - for (unsigned int i = 0; i < userInputs_3D.BC_list[0].var_BC_type.size(); i++) - { - pass4 = pass4 && (userInputs_3D.BC_list[0].var_BC_type[i] == DIRICHLET); - pass4 = pass4 && (userInputs_3D.BC_list[0].var_BC_val[i] == 2.5); - } - snprintf(buffer, sizeof(buffer), "Subtest 4 result for 'load_BC_list': %u\n", pass4); - std::cout << buffer; - - bool pass5; - pass5 = (userInputs_3D.BC_list[1].var_BC_type[0] == PERIODIC); - pass5 = pass5 && (userInputs_3D.BC_list[1].var_BC_type[1] == PERIODIC); - pass5 = pass5 && (userInputs_3D.BC_list[1].var_BC_type[2] == NATURAL); - pass5 = pass5 && (userInputs_3D.BC_list[1].var_BC_type[3] == NATURAL); - pass5 = pass5 && (userInputs_3D.BC_list[1].var_BC_type[4] == PERIODIC); - pass5 = pass5 && (userInputs_3D.BC_list[1].var_BC_type[5] == PERIODIC); - snprintf(buffer, sizeof(buffer), "Subtest 5 result for 'load_BC_list': %u\n", pass5); - std::cout << buffer; - - pass = pass1 && pass2 && pass3 && pass4 && pass5; - - snprintf(buffer, sizeof(buffer), "Test result for 'load_BC_list': %u\n", pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_outputResults.h b/tests/unit_tests/test_outputResults.h deleted file mode 100644 index f47b3708c..000000000 --- a/tests/unit_tests/test_outputResults.h +++ /dev/null @@ -1,60 +0,0 @@ -// Unit test(s) for the method "outputResults" -template -class testOutputResults : public MatrixFreePDE -{ -public: - testOutputResults(userInputParameters _userInputs) - : MatrixFreePDE(_userInputs) {}; - -private: - void - setBCs() {}; - -private: - // RHS implementation for explicit solve - void - getRHS(const MatrixFree &data, - std::vector &dst, - const std::vector &src, - const std::pair &cell_range) const {}; - - void - residualRHS( - variableContainer> &variable_list, - dealii::Point> q_point_loc) const {}; - - void - residualLHS( - variableContainer> &variable_list, - dealii::Point> q_point_loc) const {}; - - void - energyDensity( - const variableContainer> &variable_list, - const dealii::VectorizedArray &JxW_value, - dealii::Point> q_point_loc) {}; -}; - -template -bool -unitTest::test_outputResults(int argc, - char **argv, - userInputParameters userInputs) -{ - bool pass = false; - std::cout << "\nTesting 'outputResults' in " << dim << " dimension(s)...'" << std::endl; - - // create test problem class object - testOutputResults test(userInputs); - pass = true; - - char buffer[100]; - snprintf(buffer, - sizeof(buffer), - "Test result for 'outputResults' in %u dimension(s): %u\n", - dim, - pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_parse_line.h b/tests/unit_tests/test_parse_line.h deleted file mode 100644 index b6c16877d..000000000 --- a/tests/unit_tests/test_parse_line.h +++ /dev/null @@ -1,120 +0,0 @@ -// Unit test(s) for the method "parse_line" - -template -bool -unitTest::test_parse_line() -{ - bool pass = false; - bool pass_subtest1 = false; - bool pass_subtest2 = false; - bool pass_subtest3 = false; - bool pass_subtest4 = false; - bool pass_subtest5 = false; - - bool found_entry; - char buffer[100]; - - std::cout << "\nTesting 'parse_line'... " << std::endl; - - // create test problem class object - // userInputParameters userInputs; - // userInputs.loadUserInput(); - - dealii::ParameterHandler parameter_handler; - variableAttributeLoader variable_attributes; - inputFileReader input_file_reader("parameters_test.prm", variable_attributes); - - // Subtest 1 - std::string line = "set Test entry = 3"; - std::string keyword = "set"; - std::string entry_name = "Test entry"; - std::string out_string; - found_entry = input_file_reader.parse_line(line, keyword, entry_name, out_string, true); - - std::cout << out_string << " " << found_entry << std::endl; - - if (found_entry == true && boost::iequals(out_string, "3")) - { - pass_subtest1 = true; - } - snprintf(buffer, - sizeof(buffer), - "Subtest 1 result for 'parse_line': %u\n", - pass_subtest1); - std::cout << buffer; - - // Subtest 2 - line = "set Test entry = 3"; - keyword = "bork"; - entry_name = "Test entry"; - found_entry = input_file_reader.parse_line(line, keyword, entry_name, out_string, true); - - if (found_entry == false) - { - pass_subtest2 = true; - } - snprintf(buffer, - sizeof(buffer), - "Subtest 2 result for 'parse_line': %u\n", - pass_subtest2); - std::cout << buffer; - - // Subtest 3 - line = "set Test entry = 3"; - keyword = "set"; - entry_name = "Test entry wrong"; - found_entry = input_file_reader.parse_line(line, keyword, entry_name, out_string, true); - - if (found_entry == false) - { - pass_subtest3 = true; - } - snprintf(buffer, - sizeof(buffer), - "Subtest 3 result for 'parse_line': %u\n", - pass_subtest3); - std::cout << buffer; - - // Subtest 4 - line = "set Test entry = 3"; - keyword = "bork"; - entry_name = "Test entry wrong"; - found_entry = input_file_reader.parse_line(line, keyword, entry_name, out_string, true); - - if (found_entry == false) - { - pass_subtest4 = true; - } - snprintf(buffer, - sizeof(buffer), - "Subtest 4 result for 'parse_line': %u\n", - pass_subtest4); - std::cout << buffer; - - // Subtest 5 - line = "\tset Test entry = 3"; - keyword = "set"; - entry_name = "Test entry"; - found_entry = input_file_reader.parse_line(line, keyword, entry_name, out_string, true); - - if (found_entry == true && boost::iequals(out_string, "3")) - { - pass_subtest5 = true; - } - snprintf(buffer, - sizeof(buffer), - "Subtest 5 result for 'parse_line': %u\n", - pass_subtest5); - std::cout << buffer; - - // Check if all subtests passed - if (pass_subtest4 && pass_subtest3 && pass_subtest2 && pass_subtest1) - { - pass = true; - } - - snprintf(buffer, sizeof(buffer), "Test result for 'parse_line': %u\n", pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/test_setOutputTimeSteps.h b/tests/unit_tests/test_setOutputTimeSteps.h deleted file mode 100644 index 5252defe0..000000000 --- a/tests/unit_tests/test_setOutputTimeSteps.h +++ /dev/null @@ -1,132 +0,0 @@ -// Unit test(s) for the method "setOutputTimeSteps" - -template -bool -unitTest::test_setOutputTimeSteps() -{ - bool pass = false; - char buffer[100]; - std::cout << "\nTesting 'setOutputTimeSteps' via the public " - "'loadInputParameters' method...'" - << std::endl; - - dealii::ParameterHandler parameter_handler; - variableAttributeLoader variable_attributes; - inputFileReader input_file_reader("parameters_test.prm", variable_attributes); - input_file_reader.declare_parameters(parameter_handler, 0); -#if (DEAL_II_VERSION_MAJOR < 9 && DEAL_II_VERSION_MINOR < 5) - parameter_handler.read_input("parameters_test.prm"); -#else - parameter_handler.parse_input("parameters_test.prm"); -#endif - - // userInputParameters userInputs; - - // Subtest 1 (EQUAL_SPACING) - parameter_handler.set("Output condition", "EQUAL_SPACING"); - - // userInputs.loadInputParameters(input_file_reader,parameter_handler,var_types.size(),0,0,0); - userInputParameters userInputs1(input_file_reader, - parameter_handler, - variable_attributes); - - std::vector expected_result = - {0, 2000, 4000, 6000, 8000, 10000, 12000, 14000, 16000, 18000, 20000}; - - bool pass1 = true; - for (unsigned int i = 0; i < userInputs1.outputTimeStepList.size(); i++) - { - if (userInputs1.outputTimeStepList[i] != expected_result[i]) - { - pass1 = false; - } - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 1 for 'setOutputTimeSteps' (EQUAL_SPACING) result: %u\n", - pass1); - std::cout << buffer; - - // Subtest 2 (LOG_SPACING) - parameter_handler.set("Output condition", "LOG_SPACING"); - userInputParameters userInputs2(input_file_reader, - parameter_handler, - variable_attributes); - - expected_result = {0, 3, 7, 20, 53, 141, 381, 1025, 2759, 7429, 20000}; - - bool pass2 = true; - for (unsigned int i = 0; i < userInputs2.outputTimeStepList.size(); i++) - { - if (userInputs2.outputTimeStepList[i] != expected_result[i]) - { - pass2 = false; - } - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 2 for 'setOutputTimeSteps' (LOG_SPACING) result: %u\n", - pass2); - std::cout << buffer; - - // Subtest 3 (N_PER_DECADE) - parameter_handler.set("Output condition", "N_PER_DECADE"); - userInputParameters userInputs3(input_file_reader, - parameter_handler, - variable_attributes); - - expected_result = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, - 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, - 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000}; - - bool pass3 = true; - for (unsigned int i = 0; i < userInputs3.outputTimeStepList.size(); i++) - { - if (userInputs3.outputTimeStepList[i] != expected_result[i]) - { - pass3 = false; - } - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 3 for 'setOutputTimeSteps' (N_PER_DECADE) result: %u\n", - pass3); - std::cout << buffer; - - // Subtest 4 (LIST) - parameter_handler.set("Output condition", "LIST"); - userInputParameters userInputs4(input_file_reader, - parameter_handler, - variable_attributes); - - expected_result = {0, 3, 55, 61}; - - bool pass4 = true; - for (unsigned int i = 0; i < userInputs4.outputTimeStepList.size(); i++) - { - if (userInputs4.outputTimeStepList[i] != expected_result[i]) - { - pass4 = false; - } - } - - snprintf(buffer, - sizeof(buffer), - "Subtest 4 for 'setOutputTimeSteps' (LIST) result: %u\n", - pass4); - std::cout << buffer; - - if (pass4 && pass3 && pass2 && pass1) - { - pass = true; - } - - snprintf(buffer, sizeof(buffer), "Test result for 'setOutputTimeSteps': %u\n", pass); - std::cout << buffer; - - return pass; -} diff --git a/tests/unit_tests/unitTest.h b/tests/unit_tests/unitTest.h deleted file mode 100644 index 6fba21c48..000000000 --- a/tests/unit_tests/unitTest.h +++ /dev/null @@ -1,131 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// define data type -template -void -computeStress(const dealii::Table<2, double> &CIJ, - const dealii::VectorizedArray ux[][dim], - const dealii::VectorizedArray R[][dim]); - -#include "../../include/matrixFreePDE.h" -#include "../../include/parallelNucleationList.h" -#include "../../src/FloodFiller/FloodFiller.cc" -#include "../../src/OrderParameterRemapper/OrderParameterRemapper.cc" -#include "../../src/SimplifiedGrainRepresentation/SimplifiedGrainRepresentation.cc" -#include "../../src/inputFileReader/inputFileReader.cc" -#include "../../src/matrixfree/AdaptiveRefinement.cc" -#include "../../src/matrixfree/boundaryConditions.cc" -#include "../../src/matrixfree/checkpoint.cc" -#include "../../src/matrixfree/computeIntegral.cc" -#include "../../src/matrixfree/computeLHS.cc" -#include "../../src/matrixfree/computeRHS.cc" -#include "../../src/matrixfree/init.cc" -#include "../../src/matrixfree/initForTests.cc" -#include "../../src/matrixfree/initialConditions.cc" -#include "../../src/matrixfree/invM.cc" -#include "../../src/matrixfree/markBoundaries.cc" -#include "../../src/matrixfree/matrixFreePDE.cc" -#include "../../src/matrixfree/nucleation.cc" -#include "../../src/matrixfree/outputResults.cc" -#include "../../src/matrixfree/postprocessor.cc" -#include "../../src/matrixfree/reassignGrains.cc" -#include "../../src/matrixfree/reinit.cc" -#include "../../src/matrixfree/setNonlinearEqInitialGuess.cc" -#include "../../src/matrixfree/solve.cc" -#include "../../src/matrixfree/solveIncrement.cc" -#include "../../src/matrixfree/utilities.cc" -#include "../../src/models/mechanics/computeStress.h" -#include "../../src/parallelNucleationList/parallelNucleationList.cc" -#include "../../src/variableAttributeLoader/variableAttributeLoader.cc" -#include "../../src/variableContainer/variableContainer.cc" - -template -class unitTest -{ -public: - bool - test_computeInvM(int argc, char **argv, userInputParameters); - bool - test_outputResults(int argc, char **argv, userInputParameters userInputs); - bool - test_computeStress(); - void - assignCIJSize( - dealii::VectorizedArray CIJ[2 * dim - 1 + dim / 3][2 * dim - 1 + dim / 3]); - void - assignCIJSize(dealii::Table<2, double> &CIJ); - bool - test_setRigidBodyModeConstraints(std::vector, userInputParameters userInputs); - bool - test_parse_line(); - bool - test_get_subsection_entry_list(); - bool - test_get_entry_name_ending_list(); - bool - test_load_BC_list(); - bool - test_setOutputTimeSteps(); - bool - test_NonlinearSolverParameters(); - bool - test_LinearSolverParameters(); - bool - test_EquationDependencyParser_variables_and_residuals_needed(); - bool - test_EquationDependencyParser_nonlinear(); - bool - test_EquationDependencyParser_postprocessing(); - bool - test_FloodFiller(); - bool - test_SimplifiedGrainRepresentation(); - bool - test_SimplifiedGrainManipulator_transferGrainIds(); - bool - test_SimplifiedGrainManipulator_reassignGrains(); - bool - test_OrderParameterRemapper(); -}; - -#include "test_FloodFiller.h" -#include "test_LinearSolverParameters.h" -#include "test_NonlinearSolverParameters.h" -#include "test_OrderParameterRemapper.h" -#include "test_SimplifiedGrainManipulator.h" -#include "test_SimplifiedGrainRepresentation.h" -#include "test_computeStress.h" -#include "test_get_entry_name_ending_list.h" -#include "test_get_subsection_entry_list.h" -#include "test_invM.h" -#include "test_load_BC_list.h" -#include "test_outputResults.h" -#include "test_parse_line.h" -#include "test_setOutputTimeSteps.h" -#include "variableAttributeLoader_test.cc" - -#include "../../include/SolverParameters.h" -#include "../../src/SolverParameters/SolverParameters.cc" diff --git a/tests/unit_tests/unit_test_inputs.cc b/tests/unit_tests/unit_test_inputs.cc deleted file mode 100644 index d73500abe..000000000 --- a/tests/unit_tests/unit_test_inputs.cc +++ /dev/null @@ -1,32 +0,0 @@ -#include "../../include/userInputParameters.h" - -template -void -load_unit_test_inputs(userInputParameters &userInputs) -{ - userInputs.domain_size.push_back(1.0); - userInputs.domain_size.push_back(1.0); - userInputs.domain_size.push_back(1.0); - userInputs.degree = 1; - userInputs.subdivisions.push_back(10); - userInputs.subdivisions.push_back(10); - userInputs.subdivisions.push_back(10); - userInputs.refine_factor = 3; - userInputs.h_adaptivity = false; - userInputs.max_refinement_level = 3; - userInputs.min_refinement_level = 3; - userInputs.skip_remeshing_steps = 1; - userInputs.dtValue = 1; - userInputs.totalIncrements = 20000; - userInputs.finalTime = 20.0; - userInputs.skip_print_steps = 1; - userInputs.output_file_type = "vtu"; - userInputs.nucleation_occurs = false; - userInputs.number_of_variables = 1; - userInputs.load_ICs.push_back(false); - userInputs.load_parallel_file.push_back(false); - userInputs.load_file_name.push_back("void"); - userInputs.load_field_name.push_back("void"); - userInputs.pp_number_of_variables = 1; - userInputs.postProcessingRequired = false; -} diff --git a/tests/unit_tests/unit_test_results.txt b/tests/unit_tests/unit_test_results.txt deleted file mode 100644 index 0121a8fa5..000000000 --- a/tests/unit_tests/unit_test_results.txt +++ /dev/null @@ -1,2 +0,0 @@ -19 -19 diff --git a/tests/unit_tests/variableAttributeLoader_test.cc b/tests/unit_tests/variableAttributeLoader_test.cc deleted file mode 100644 index 3662eca47..000000000 --- a/tests/unit_tests/variableAttributeLoader_test.cc +++ /dev/null @@ -1,15 +0,0 @@ -void -variableAttributeLoader::loadVariableAttributes() -{ - // Variable 0 - set_variable_name(0, "n"); - set_variable_type(0, SCALAR); - set_variable_equation_type(0, EXPLICIT_TIME_DEPENDENT); - - set_dependencies_value_term_RHS(0, "n"); - set_dependencies_gradient_term_RHS(0, "grad(n)"); -} - -void -variableAttributeLoader::loadPostProcessorVariableAttributes() -{}