From 22edfda783619736e145bedf62106a7ee3da0806 Mon Sep 17 00:00:00 2001 From: karolCascavita Date: Tue, 28 Feb 2023 17:43:29 +0100 Subject: [PATCH] Tresca added but there are files missing. --- apps/CMakeLists.txt | 8 ++++++- apps/tresca/CMakeLists.txt | 13 +++++++++++ .../tresca_elementary_computation.hpp | 10 ++++---- .../tresca => apps/tresca/src}/tresca.cpp | 19 +++++++-------- .../tresca/src}/tresca_test.cpp | 23 ++++++++----------- 5 files changed, 42 insertions(+), 31 deletions(-) create mode 100644 apps/tresca/CMakeLists.txt rename {refactor_old_diskpp_code/apps/tresca => apps/tresca/src}/NewtonSolver/tresca_elementary_computation.hpp (99%) rename {refactor_old_diskpp_code/apps/tresca => apps/tresca/src}/tresca.cpp (96%) rename {refactor_old_diskpp_code/apps/tresca => apps/tresca/src}/tresca_test.cpp (98%) diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 33e0557c..01f57571 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -36,4 +36,10 @@ endif() option(BUILD_APP_HELMHOLTZ "Build Helmholtz applications" ON) if (BUILD_APP_HELMHOLTZ) add_subdirectory(helmholtz) -endif() \ No newline at end of file +endif() + +option(BUILD_APP_TRESCA "Build Tresca applications" ON) +if (BUILD_APP_TRESCA) + add_subdirectory(tresca) +endif() + diff --git a/apps/tresca/CMakeLists.txt b/apps/tresca/CMakeLists.txt new file mode 100644 index 00000000..5e8465c1 --- /dev/null +++ b/apps/tresca/CMakeLists.txt @@ -0,0 +1,13 @@ +set(LINK_LIBS diskpp) + +add_executable(tresca src/tresca.cpp) +target_link_libraries(tresca ${LINK_LIBS}) +install(TARGETS tresca RUNTIME DESTINATION bin) + +add_executable(tresca_test src/tresca_test.cpp) +target_link_libraries(tresca_test ${LINK_LIBS}) +install(TARGETS tresca_test RUNTIME DESTINATION bin) + +install(DIRECTORY share/ DESTINATION share) + + diff --git a/refactor_old_diskpp_code/apps/tresca/NewtonSolver/tresca_elementary_computation.hpp b/apps/tresca/src/NewtonSolver/tresca_elementary_computation.hpp similarity index 99% rename from refactor_old_diskpp_code/apps/tresca/NewtonSolver/tresca_elementary_computation.hpp rename to apps/tresca/src/NewtonSolver/tresca_elementary_computation.hpp index e9d5a379..b1ba03e2 100644 --- a/refactor_old_diskpp_code/apps/tresca/NewtonSolver/tresca_elementary_computation.hpp +++ b/apps/tresca/src/NewtonSolver/tresca_elementary_computation.hpp @@ -27,11 +27,9 @@ #include -#include "bases/bases.hpp" -#include "common/eigen.hpp" -#include "mechanics/behaviors/maths_tensor.hpp" -#include "methods/hho" -#include "quadratures/quadratures.hpp" +#include "diskpp/common/eigen.hpp" +#include "diskpp/mechanics/behaviors/maths_tensor.hpp" +#include "diskpp/methods/hho" #include "timecounter.h" @@ -1620,4 +1618,4 @@ class tresca } }; -} // end namespace MK \ No newline at end of file +} // end namespace MK diff --git a/refactor_old_diskpp_code/apps/tresca/tresca.cpp b/apps/tresca/src/tresca.cpp similarity index 96% rename from refactor_old_diskpp_code/apps/tresca/tresca.cpp rename to apps/tresca/src/tresca.cpp index 1234a91f..0b2220d7 100644 --- a/refactor_old_diskpp_code/apps/tresca/tresca.cpp +++ b/apps/tresca/src/tresca.cpp @@ -29,21 +29,18 @@ #include #include #include - #include - -#include "Informations.hpp" -#include "Parameters.hpp" -#include "boundary_conditions/boundary_conditions.hpp" -#include "loaders/loader.hpp" -#include "mechanics/behaviors/laws/materialData.hpp" - -#include "timecounter.h" - #define _USE_MATH_DEFINES #include -#include "tresca_solver.hpp" +#include "src/Informations.hpp" +#include "src/Parameters.hpp" +#include "diskpp/boundary_conditions/boundary_conditions.hpp" +#include "diskpp/loaders/loader.hpp" +#include "diskpp/mechanics/behaviors/laws/materialData.hpp" + +#include "diskpp/common/timecounter.hpp" +//#include "src/tresca_solver.hpp" template class Mesh, typename T, typename Storage> void diff --git a/refactor_old_diskpp_code/apps/tresca/tresca_test.cpp b/apps/tresca/src/tresca_test.cpp similarity index 98% rename from refactor_old_diskpp_code/apps/tresca/tresca_test.cpp rename to apps/tresca/src/tresca_test.cpp index 3df4750f..c3c5e78b 100644 --- a/refactor_old_diskpp_code/apps/tresca/tresca_test.cpp +++ b/apps/tresca/src/tresca_test.cpp @@ -30,18 +30,15 @@ #include #include -#include "colormanip.h" - -#include "loaders/loader.hpp" - -#include "timecounter.h" - -#include "Informations.hpp" -#include "Parameters.hpp" -#include "boundary_conditions/boundary_conditions.hpp" -#include "loaders/loader.hpp" -#include "mechanics/behaviors/laws/materialData.hpp" -#include "tresca_solver.hpp" +#include "diskpp/common/colormanip.h" +#include "diskpp/loaders/loader.hpp" +#include "diskpp/common/timecounter.hpp" +#include "diskpp/boundary_conditions/boundary_conditions.hpp" +#include "diskpp/loaders/loader.hpp" +#include "diskpp/mechanics/behaviors/laws/materialData.hpp" +#include "src/tresca_solver.hpp" +#include "src/Informations.hpp" +#include "src/Parameters.hpp" struct error_type { @@ -1036,4 +1033,4 @@ main(int argc, char** argv) std::cout << " " << std::endl; } } -} \ No newline at end of file +}