Commit 957643c7 authored by Tomas Sobotik's avatar Tomas Sobotik
Browse files

Added: hamilton-jacobi solver, godunov & upwind operators,...

Added: hamilton-jacobi solver, godunov & upwind operators, tnlNeumannBoundaryReflectionCondition, several testing functions.
parent 481bbf8e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@ add_subdirectory( make-project )
add_subdirectory( simple-solver )
add_subdirectory( heat-equation )
add_subdirectory( navier-stokes )
add_subdirectory( hamilton-jacobi )
+43 −0
Original line number Diff line number Diff line
#        L1 diff.        L2 diff.      Max. diff.
               0               0               0
         63.4811         5.99202         1.42631
         66.6332         6.12578         1.44652
         74.3659         6.78359         1.55463
         76.1032           6.927          1.6077
          77.061         6.95798         1.60792
         77.9231         6.98365         1.60794
         81.2149         7.11651         1.60972
         86.3198         7.62176         1.71196
         87.3666         7.72083         1.72539
         90.5339         7.96395         1.76724
         90.8934         7.99094         1.77766
         91.0297           7.996          1.7777
         91.1378         8.00015          1.7777
         91.2273         8.00368          1.7777
         91.3036         8.00675          1.7777
         91.3695         8.00945         1.77771
         91.4275         8.01186         1.77771
         91.4789         8.01402         1.77771
         91.5251         8.01598         1.77771
         91.5666         8.01776         1.77771
         91.6044          8.0194         1.77771
         91.6389          8.0209          1.7777
         91.6706         8.02229         1.77769
         91.6997         8.02357         1.77771
         91.7266         8.02476         1.77772
         91.7516         8.02586         1.77775
          91.775         8.02691         1.77773
          91.911         8.03128         1.77771
         93.1946         8.09195         1.77771
         93.3197         8.09916         1.77771
         94.0818         8.12529         1.77771
         94.7892         8.15632         1.77771
         94.8432         8.15885         1.77771
         94.8603         8.15963         1.77771
         94.9743         8.16191         1.77774
         97.8219         8.28404          1.7833
          99.374         8.36043          1.7848
         99.8968         8.38787         1.78488
         100.112          8.3992         1.78488
         100.223         8.40505         1.78488
               0               0               0
+18 −0
Original line number Diff line number Diff line
set( tnl_hamilton_jacobi_SOURCES
     hamiltonJacobiProblemSetter.h
     hamiltonJacobiProblemSetter_impl.h
     hamiltonJacobiProblemSolver.h
     hamiltonJacobiProblemSolver_impl.h
     main.cpp
     hamiltonJacobiProblemConfig.h )
               
ADD_EXECUTABLE(hamilton-jacobi${debugExt} main.cpp)
target_link_libraries (hamilton-jacobi${debugExt} tnl${debugExt}-${tnlVersion} )

INSTALL( TARGETS hamilton-jacobi${debugExt}
         RUNTIME DESTINATION bin
         PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
        
INSTALL( FILES ${tnl_hamilton_jacobi_SOURCES}
               Makefile
         DESTINATION share/tnl-${tnlVersion}/examples/hamilton-jacobi )
+18 −0
Original line number Diff line number Diff line
set( tnl_hamilton_jacobi_SOURCES
     hamiltonJacobiProblemSetter.h
     hamiltonJacobiProblemSetter_impl.h
     hamiltonJacobiProblemSolver.h
     hamiltonJacobiProblemSolver_impl.cpp
     main.cpp
     hamiltonJacobiProblemConfig.h )
               
ADD_EXECUTABLE(hamilton-jacobi${debugExt} main.cpp)
target_link_libraries (hamilton-jacobi${debugExt} tnl${debugExt}-${tnlVersion} )

INSTALL( TARGETS hamilton-jacobi${debugExt}
         RUNTIME DESTINATION bin
         PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
        
INSTALL( FILES ${tnl_hamilton_jacobi_SOURCES}
               Makefile
         DESTINATION share/tnl-${tnlVersion}/examples/hamilton-jacobi )
+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/tnlConfigTags.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_ */
Loading