Loading examples/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ add_subdirectory( navier-stokes ) add_subdirectory( hamilton-jacobi-parallel ) add_subdirectory( fast-sweeping ) add_subdirectory( hamilton-jacobi-parallel-map ) add_subdirectory( fast-sweeping-map ) examples/fast-sweeping-map/CMakeLists.txt 0 → 100755 +22 −0 Original line number Diff line number Diff line set( tnl_fast_sweeping_map_SOURCES # MainBuildConfig.h # tnlFastSweepingMap2D_impl.h # tnlFastSweepingMap.h # fastSweepingMapConfig.h main.cpp) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE(fast-sweeping-map${debugExt} main.cu) ELSE( BUILD_CUDA ) ADD_EXECUTABLE(fast-sweeping-map${debugExt} main.cpp) ENDIF( BUILD_CUDA ) target_link_libraries (fast-sweeping-map${debugExt} tnl${debugExt}-${tnlVersion} ) INSTALL( TARGETS fast-sweeping-map${debugExt} RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) #INSTALL( FILES ${tnl_fast_sweeping_map_SOURCES} # DESTINATION share/tnl-${tnlVersion}/examples/fast-sweeping-map ) examples/fast-sweeping-map/MainBuildConfig.h 0 → 100644 +64 −0 Original line number Diff line number Diff line /*************************************************************************** MainBuildConfig.h - description ------------------- begin : Jul 7, 2014 copyright : (C) 2014 by Tomas Oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef MAINBUILDCONFIG_H_ #define MAINBUILDCONFIG_H_ #include <solvers/tnlBuildConfigTags.h> class MainBuildConfig { public: static void print() { cerr << "MainBuildConfig" << endl; } }; /**** * Turn off support for float and long double. */ template<> struct tnlConfigTagReal< MainBuildConfig, float > { enum { enabled = false }; }; template<> struct tnlConfigTagReal< MainBuildConfig, long double > { enum { enabled = false }; }; /**** * Turn off support for short int and long int indexing. */ template<> struct tnlConfigTagIndex< MainBuildConfig, short int >{ enum { enabled = false }; }; template<> struct tnlConfigTagIndex< MainBuildConfig, long int >{ enum { enabled = false }; }; /**** * Use of tnlGrid is enabled for allowed dimensions and Real, Device and Index types. */ template< int Dimensions, typename Real, typename Device, typename Index > struct tnlConfigTagMesh< MainBuildConfig, tnlGrid< Dimensions, Real, Device, Index > > { enum { enabled = tnlConfigTagDimensions< MainBuildConfig, Dimensions >::enabled && tnlConfigTagReal< MainBuildConfig, Real >::enabled && tnlConfigTagDevice< MainBuildConfig, Device >::enabled && tnlConfigTagIndex< MainBuildConfig, Index >::enabled }; }; /**** * Please, chose your preferred time discretisation here. */ template<> struct tnlConfigTagTimeDiscretisation< MainBuildConfig, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct tnlConfigTagTimeDiscretisation< MainBuildConfig, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = false}; }; template<> struct tnlConfigTagTimeDiscretisation< MainBuildConfig, tnlImplicitTimeDiscretisationTag >{ enum { enabled = false }; }; /**** * Only the Runge-Kutta-Merson solver is enabled by default. */ template<> struct tnlConfigTagExplicitSolver< MainBuildConfig, tnlExplicitEulerSolverTag >{ enum { enabled = false }; }; #endif /* MAINBUILDCONFIG_H_ */ examples/fast-sweeping-map/fastSweepingMapConfig.h 0 → 100644 +39 −0 Original line number Diff line number Diff line /*************************************************************************** fastSweepingConfig.h - description ------------------- begin : Oct 15, 2015 copyright : (C) 2015 by Tomas Sobotik email : ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef FASTSWEEPINGCONFIG_H_ #define FASTSWEEPINGCONFIG_H_ #include <config/tnlConfigDescription.h> template< typename ConfigTag > class fastSweepingMapConfig { public: static void configSetup( tnlConfigDescription& config ) { config.addDelimiter( "Parallel Eikonal solver settings:" ); config.addEntry < tnlString > ( "problem-name", "This defines particular problem.", "fast-sweeping" ); config.addRequiredEntry < tnlString > ( "initial-condition", "Initial condition for solver"); config.addRequiredEntry < int > ( "dim", "Dimension of problem."); config.addEntry < tnlString > ( "mesh", "Name of mesh.", "mesh.tnl" ); config.addEntry < tnlString > ( "exact-input", "Are the function values near the curve equal to the SDF? (yes/no)", "no" ); config.addRequiredEntry < tnlString > ( "map", "Gradient map for solver"); } }; #endif /* FASTSWEEPINGCONFIG_H_ */ examples/fast-sweeping-map/main.cpp 0 → 100644 +17 −0 Original line number Diff line number Diff line /*************************************************************************** main.cpp - description ------------------- begin : Oct 15 , 2015 copyright : (C) 2015 by Tomas Sobotik ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "main.h" Loading
examples/CMakeLists.txt +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ add_subdirectory( navier-stokes ) add_subdirectory( hamilton-jacobi-parallel ) add_subdirectory( fast-sweeping ) add_subdirectory( hamilton-jacobi-parallel-map ) add_subdirectory( fast-sweeping-map )
examples/fast-sweeping-map/CMakeLists.txt 0 → 100755 +22 −0 Original line number Diff line number Diff line set( tnl_fast_sweeping_map_SOURCES # MainBuildConfig.h # tnlFastSweepingMap2D_impl.h # tnlFastSweepingMap.h # fastSweepingMapConfig.h main.cpp) IF( BUILD_CUDA ) CUDA_ADD_EXECUTABLE(fast-sweeping-map${debugExt} main.cu) ELSE( BUILD_CUDA ) ADD_EXECUTABLE(fast-sweeping-map${debugExt} main.cpp) ENDIF( BUILD_CUDA ) target_link_libraries (fast-sweeping-map${debugExt} tnl${debugExt}-${tnlVersion} ) INSTALL( TARGETS fast-sweeping-map${debugExt} RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) #INSTALL( FILES ${tnl_fast_sweeping_map_SOURCES} # DESTINATION share/tnl-${tnlVersion}/examples/fast-sweeping-map )
examples/fast-sweeping-map/MainBuildConfig.h 0 → 100644 +64 −0 Original line number Diff line number Diff line /*************************************************************************** MainBuildConfig.h - description ------------------- begin : Jul 7, 2014 copyright : (C) 2014 by Tomas Oberhuber email : tomas.oberhuber@fjfi.cvut.cz ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef MAINBUILDCONFIG_H_ #define MAINBUILDCONFIG_H_ #include <solvers/tnlBuildConfigTags.h> class MainBuildConfig { public: static void print() { cerr << "MainBuildConfig" << endl; } }; /**** * Turn off support for float and long double. */ template<> struct tnlConfigTagReal< MainBuildConfig, float > { enum { enabled = false }; }; template<> struct tnlConfigTagReal< MainBuildConfig, long double > { enum { enabled = false }; }; /**** * Turn off support for short int and long int indexing. */ template<> struct tnlConfigTagIndex< MainBuildConfig, short int >{ enum { enabled = false }; }; template<> struct tnlConfigTagIndex< MainBuildConfig, long int >{ enum { enabled = false }; }; /**** * Use of tnlGrid is enabled for allowed dimensions and Real, Device and Index types. */ template< int Dimensions, typename Real, typename Device, typename Index > struct tnlConfigTagMesh< MainBuildConfig, tnlGrid< Dimensions, Real, Device, Index > > { enum { enabled = tnlConfigTagDimensions< MainBuildConfig, Dimensions >::enabled && tnlConfigTagReal< MainBuildConfig, Real >::enabled && tnlConfigTagDevice< MainBuildConfig, Device >::enabled && tnlConfigTagIndex< MainBuildConfig, Index >::enabled }; }; /**** * Please, chose your preferred time discretisation here. */ template<> struct tnlConfigTagTimeDiscretisation< MainBuildConfig, tnlExplicitTimeDiscretisationTag >{ enum { enabled = true }; }; template<> struct tnlConfigTagTimeDiscretisation< MainBuildConfig, tnlSemiImplicitTimeDiscretisationTag >{ enum { enabled = false}; }; template<> struct tnlConfigTagTimeDiscretisation< MainBuildConfig, tnlImplicitTimeDiscretisationTag >{ enum { enabled = false }; }; /**** * Only the Runge-Kutta-Merson solver is enabled by default. */ template<> struct tnlConfigTagExplicitSolver< MainBuildConfig, tnlExplicitEulerSolverTag >{ enum { enabled = false }; }; #endif /* MAINBUILDCONFIG_H_ */
examples/fast-sweeping-map/fastSweepingMapConfig.h 0 → 100644 +39 −0 Original line number Diff line number Diff line /*************************************************************************** fastSweepingConfig.h - description ------------------- begin : Oct 15, 2015 copyright : (C) 2015 by Tomas Sobotik email : ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef FASTSWEEPINGCONFIG_H_ #define FASTSWEEPINGCONFIG_H_ #include <config/tnlConfigDescription.h> template< typename ConfigTag > class fastSweepingMapConfig { public: static void configSetup( tnlConfigDescription& config ) { config.addDelimiter( "Parallel Eikonal solver settings:" ); config.addEntry < tnlString > ( "problem-name", "This defines particular problem.", "fast-sweeping" ); config.addRequiredEntry < tnlString > ( "initial-condition", "Initial condition for solver"); config.addRequiredEntry < int > ( "dim", "Dimension of problem."); config.addEntry < tnlString > ( "mesh", "Name of mesh.", "mesh.tnl" ); config.addEntry < tnlString > ( "exact-input", "Are the function values near the curve equal to the SDF? (yes/no)", "no" ); config.addRequiredEntry < tnlString > ( "map", "Gradient map for solver"); } }; #endif /* FASTSWEEPINGCONFIG_H_ */
examples/fast-sweeping-map/main.cpp 0 → 100644 +17 −0 Original line number Diff line number Diff line /*************************************************************************** main.cpp - description ------------------- begin : Oct 15 , 2015 copyright : (C) 2015 by Tomas Sobotik ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "main.h"