Commit e78cd383 authored by Malte Heithoff's avatar Malte Heithoff
Browse files

LoopTests

parent b6cd614e
......@@ -6,8 +6,10 @@ set(SERIALLOOPINCLUDE target/generated-sources-cpp/serialLoop)
set(SIMPLELOOPINCLUDE target/generated-sources-cpp/simpleLoop)
set(OSCILLATIONINCLUDE target/generated-sources-cpp/oscillation)
set(PARALLELLOOPINCLUDE target/generated-sources-cpp/parallelLoop)
set(OSCILLATIONASODESYMBOLINCLUDE target/generated-sources-cpp/oscillationAsODESymbol)
add_subdirectory(${SERIALLOOPINCLUDE})
add_subdirectory(${SIMPLELOOPINCLUDE})
add_subdirectory(${OSCILLATIONINCLUDE})
add_subdirectory(${PARALLELLOOPINCLUDE})
#add_subdirectory(${PARALLELLOOPINCLUDE})
add_subdirectory(${OSCILLATIONASODESYMBOLINCLUDE})
add_subdirectory(looptest)
\ No newline at end of file
......@@ -17,7 +17,12 @@ target_include_directories(SimpleLoop PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(SimpleLoop de_monticore_lang_monticar_semantics_loops_simpleLoop ${LIBS})
export(TARGETS SimpleLoop FILE SimpleLoop.cmake)
add_executable(ParallelLoop mainParallelLoop.cpp)
target_include_directories(ParallelLoop PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(ParallelLoop de_monticore_lang_monticar_semantics_loops_parallelLoop ${LIBS})
export(TARGETS ParallelLoop FILE ParallelLoop.cmake)
#add_executable(ParallelLoop mainParallelLoop.cpp)
#target_include_directories(ParallelLoop PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
#target_link_libraries(ParallelLoop de_monticore_lang_monticar_semantics_loops_parallelLoop ${LIBS})
#export(TARGETS ParallelLoop FILE ParallelLoop.cmake)
add_executable(OscillationAsODESymbol mainOscillationAsODESymbol.cpp)
target_include_directories(OscillationAsODESymbol PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(OscillationAsODESymbol de_monticore_lang_monticar_semantics_loops_oscillationAsODESymbol ${LIBS})
export(TARGETS OscillationAsODESymbol FILE OscillationAsODESymbol.cmake)
#include "de_monticore_lang_monticar_semantics_loops_oscillationAsODESymbol.h"
#include "ExecutionStepper.h"
int main(int argc, char** argv)
{
de_monticore_lang_monticar_semantics_loops_oscillationAsODESymbol instance;
int i;
for (i=1; i<atof(argv[1]); i++) {
double realResult = 2*cos((sqrt((10))*getCurrentTime()/5));
instance.execute();
std::cout << "t = " << getCurrentTime() << ":\t " << instance.x << " \t error: \t " << realResult - instance.x << "\n";
}
return 0;
}
\ No newline at end of file
......@@ -6,9 +6,9 @@ int main(int argc, char** argv)
instance.init();
int i;
for (i=1; i<argc; i++) {
instance.in1 = atof(argv[i]);
instance.input = atof(argv[i]);
instance.execute();
std::cout << "t = " << getCurrentTime() << ":\t " << instance.out1 << "\n";
std::cout << "t = " << getCurrentTime() << ":\t " << instance.output << "\n";
}
return 0;
}
\ No newline at end of file
......@@ -6,9 +6,9 @@ int main(int argc, char** argv)
instance.init();
int i;
for (i=1; i<argc; i++) {
instance.in1 = atof(argv[i]);
instance.input = atof(argv[i]);
instance.execute();
std::cout << "t = " << getCurrentTime() << ":\t " << instance.out1 << "\n";
std::cout << "t = " << getCurrentTime() << ":\t " << instance.output << "\n";
}
return 0;
}
\ No newline at end of file
......@@ -6,9 +6,9 @@ int main(int argc, char** argv)
instance.init();
int i;
for (i=1; i<argc; i++) {
instance.in1 = atof(argv[i]);
instance.input = atof(argv[i]);
instance.execute();
std::cout << "t = " << getCurrentTime() << ":\t " << instance.out1 << "\n";
std::cout << "t = " << getCurrentTime() << ":\t " << instance.output << "\n";
}
return 0;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment