commit a534e46833e92496149ad01d2afcbf95316e54e3 Author: Anne de Jong Date: Tue Nov 11 09:31:13 2014 +0100 Linking to tmtubes diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a4a5497 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,52 @@ +# CMakeList.txt for linear code +cmake_minimum_required (VERSION 2.8.9) + +project(Timedomain1DEuler) + +add_definitions(-DTRACERNAME=timedomaineuler -DARMA_USE_BLAS -DARMA_USE_LAPACK) + +############################## Not so often changed + +# -pipe Use pipes rather than temporary files for communication +# between the various stages of compilation. This fails to +# work on some systems where the assembler is unable to +# read from a pipe; but the GNU assembler has no troubl. + + +# ${tubedrag} +set (CMAKE_GCC " -Wno-unused-function -ffunction-sections -fdata-sections -Wno-unused-local-typedefs -Wno-empty-body") + + + +set (CMAKE_GENERAL "${CMAKE_GENERAL} -std=c++11 -pipe -fPIC -Wall \ + -Wextra -Wno-unused-parameter \ + -Wno-unused-variable -Wno-unused-but-set-variable \ + -Wno-return-local-addr -Wno-cpp -Wno-address") + + +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_GENERAL} ${CMAKE_GCC}") + +link_directories(${link_directories} /usr/local/lib) +include_directories( + ../tmtubes/src + ../tmtubes/src/sys + ../tmtubes/src/seg + ../tmtubes/src/common + ../tmtubes/src/common/gas + ../tmtubes/src/common/bessel + ../tmtubes/src/common/fsolve + ../tmtubes/src/common/solid + ../tmtubes/src/common/rottfuncs + ) +AUX_SOURCE_DIRECTORY(src src) +link_directories(tmtubes/src/nonlinear tmtubes/src/common) +# set(src ${src} src/seg/geom.cpp src/sys/globalconf.cpp) +add_executable(timedomaineuler timedomain.cpp ${src}) + +target_link_libraries(timedomaineuler nonlin math_common blas lapack boost_iostreams boost_serialization) + + + + + + diff --git a/src/solution.h b/src/solution.h new file mode 100644 index 0000000..5f5684c --- /dev/null +++ b/src/solution.h @@ -0,0 +1,25 @@ +#pragma once +#ifndef _SOLUTION_H_ +#define _SOLUTION_H_ + + + + +#include "vtypes.h" + +namespace td{ + SPOILNAMESPACE + + class Solution{ + + vd rho; + vd u; + vd e; + vd p; + public: + Solution(){} + ~Solution(){} + }; + +} // namespace td +#endif /* _SOLUTION_H_ */ diff --git a/src/tube.cpp b/src/tube.cpp new file mode 100644 index 0000000..58fa2a9 --- /dev/null +++ b/src/tube.cpp @@ -0,0 +1,14 @@ +#include "tube.h" + +namespace td{ + + + Tube::Tube(const segment::Geom& g): + geom(g), + gc(tasystem::Globalconf::airSTP(0,100,1)) + { + + + } + +}; diff --git a/src/tube.h b/src/tube.h new file mode 100644 index 0000000..898c117 --- /dev/null +++ b/src/tube.h @@ -0,0 +1,26 @@ +#pragma once +#ifndef _TUBE_H_ +#define _TUBE_H_ + +#include "geom.h" +#include "globalconf.h" +#include "solution.h" + +namespace td{ + + + class Tube{ + + segment::Geom geom; + tasystem::Globalconf gc; + vector sols; + public: + Tube(const segment::Geom& g); + Solution& getSol(int i=-1); + +}; + + + +} // namespace td +#endif /* _TUBE_H_ */ diff --git a/timedomain.cpp b/timedomain.cpp new file mode 100644 index 0000000..5782164 --- /dev/null +++ b/timedomain.cpp @@ -0,0 +1,17 @@ +#include "geom.h" +#include "grid.h" +#include "tube.h" + +using segment::Geom; +using segment::Grid; +int main(int argc,char *argv[]){ + SPOILNAMESPACE + us gp=100; + d L=1; + Grid grid(gp,L); + d radius=1.0; + Geom g=Geom::CylinderBlApprox(grid,radius); + + td::Tube t(g); + return 0; +}