Skip to content

Commit

Permalink
Revert "Replay mode for ASTE"
Browse files Browse the repository at this point in the history
  • Loading branch information
kursatyurt authored Mar 28, 2022
1 parent 469e008 commit 0b0b832
Show file tree
Hide file tree
Showing 23 changed files with 391 additions and 22,977 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ message (STATUS "VTK_VERSION: ${VTK_VERSION}")
find_package(METIS)
if (METIS_FOUND)
add_library(metisAPI SHARED src/metisAPI.cpp)
include_directories(${METIS_INCLUDE_DIRS})
target_link_libraries(metisAPI ${METIS_LIBRARIES})
target_include_directories(metisAPI PRIVATE ${METIS_INCLUDE_DIR})
endif()

find_package(MPI REQUIRED)

add_executable(preciceMap src/preciceMap.cpp src/common.cpp src/easylogging++.cc src/mesh.cpp src/configreader.cpp src/modes.cpp src/utilities.cpp)
add_executable(preciceMap src/preciceMap.cpp src/common.cpp src/easylogging++.cc src/mesh.cpp)
target_include_directories(preciceMap PRIVATE src)
target_link_libraries(preciceMap
precice::precice
Expand Down Expand Up @@ -68,6 +67,7 @@ target_link_libraries(testing
${VTK_LIBRARIES}
)


if (VTK_VERSION VERSION_LESS "8.90.0")
# old system
include(${VTK_USE_FILE})
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 0 additions & 9 deletions contrib/Replay_Mode_Implicit_Case/fluid/fluidconfig.yml

This file was deleted.

72 changes: 0 additions & 72 deletions contrib/Replay_Mode_Implicit_Case/precice-config.xml

This file was deleted.

Binary file not shown.
Binary file not shown.
9 changes: 0 additions & 9 deletions contrib/Replay_Mode_Implicit_Case/solid/solidconfig.yml

This file was deleted.

File renamed without changes.
21 changes: 8 additions & 13 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ OptionMap getOptions(int argc, char *argv[])
namespace po = boost::program_options;

po::options_description desc("ASTE: Artificial solver emulation tool");
desc.add_options()("help,h", "Print this help message")("aste-config", po::value<std::string>(), "ASTE Configration file for replay mode")(
desc.add_options()("help,h", "Print this help message")(
"precice-config,c",
po::value<std::string>()->default_value("precice-config.xml"),
"preCICE configuratio file")(
"participant,p",
po::value<std::string>(),
po::value<std::string>()->required(),
"Participant Name")(
"data", po::value<std::string>(),
"data", po::value<std::string>()->required(),
"Name of Data Array to be Mapped")(
"mesh", po::value<std::string>(),
"mesh", po::value<string>()->required(),
"Mesh prefix (i.e. mesh name without the format extension such as '.vtk' or '.vtu'). "
"Example: solution.vtk has the prefix 'solution'. "
"preciceMap will look for timeseries as well as distributed meshes (e.g. from preCICE exports) "
"automatically and load them if required.")(
"output", po::value<std::string>(),
"output", po::value<string>()->default_value("output"),
"Output file name.")(
"vector", po::bool_switch(),
"Distinguish between vector valued data and scalar data")("verbose,v", po::bool_switch(), "Enable verbose output"); // not explicitely used, handled by easylogging
"Distinguish between vector valued data and scalar data")(
"verbose,v", po::bool_switch(),
"Enable verbose output"); // not explicitely used, handled by easylogging

po::variables_map vm;

Expand All @@ -46,13 +48,6 @@ OptionMap getOptions(int argc, char *argv[])
if (vm["participant"].as<string>() != "A" &&
vm["participant"].as<string>() != "B")
throw runtime_error("Invalid participant, must be either 'A' or 'B'");

if ((vm.count("participant") || vm.count("data") || vm.count("mesh") || vm.count("output") || vm.count("vector")) && vm.count("aste-config"))
throw runtime_error("Replay mode can only be combined with logging options");

if ((vm.count("aste-config") == 0) && not(vm.count("participant") && vm.count("data") && vm.count("mesh")))
throw runtime_error("One of the following arguments is missing \"--participant\" \"--data\" \"--mesh\"");

} catch (const std::exception &e) {
LOG(ERROR) << "ERROR: " << e.what() << "\n";
LOG(ERROR) << desc << std::endl;
Expand Down
50 changes: 0 additions & 50 deletions src/configreader.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions src/configreader.hpp

This file was deleted.

Loading

0 comments on commit 0b0b832

Please sign in to comment.