Commit b7fab41b authored by Vít Hanousek's avatar Vít Hanousek
Browse files

Merge branch 'develop' into mpi

parents b32f2651 dc183e8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
ADD_SUBDIRECTORY( Operators )
#ADD_SUBDIRECTORY( Solvers )
ADD_SUBDIRECTORY( Solvers )
+3 −3
Original line number Diff line number Diff line
@@ -7,14 +7,14 @@ set( tnl_hamilton_jacobi_SOURCES
     hamiltonJacobiProblemConfig.h
     tnl-direct-eikonal-solver.h )
               
ADD_EXECUTABLE(tnl-hamilton-jacobi${debugExt} main.cpp)
target_link_libraries (tnl-hamilton-jacobi${debugExt} tnl${debugExt}-${tnlVersion} )
#ADD_EXECUTABLE(tnl-hamilton-jacobi${debugExt} main.cpp)
#target_link_libraries (tnl-hamilton-jacobi${debugExt} tnl${debugExt}-${tnlVersion} )

ADD_EXECUTABLE(tnl-direct-eikonal-solver${debugExt} tnl-direct-eikonal-solver.cpp )
target_link_libraries (tnl-direct-eikonal-solver${debugExt} tnl${debugExt}-${tnlVersion} )


INSTALL( TARGETS tnl-hamilton-jacobi${debugExt} 
INSTALL( TARGETS #tnl-hamilton-jacobi${debugExt} 
                 tnl-direct-eikonal-solver${debugExt}
         RUNTIME DESTINATION bin
         PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

#pragma once 

#include <config/tnlConfigDescription.h>
#include <TNL/Config/ConfigDescription.h>

template< typename ConfigTag >
class HamiltonJacobiProblemConfig
+14 −13
Original line number Diff line number Diff line
@@ -13,23 +13,24 @@

#pragma once

#include <solvers/tnlSolver.h>
#include <solvers/tnlFastBuildConfigTag.h>
#include <solvers/tnlBuildConfigTags.h>
#include <functions/tnlConstantFunction.h>
#include <functions/tnlMeshFunction.h>
//#include <problems/tnlHeatEquationProblem.h>
#include <mesh/tnlGrid.h>
#include <TNL/Solvers/Solver.h>
#include <TNL/Solvers/FastBuildConfigTag.h>
#include <TNL/Solvers/BuildConfigTags.h>
#include <TNL/Functions/Analytic/Constant.h>
#include <TNL/Functions/MeshFunction.h>
#include <TNL/Meshes/Grid.h>
#include "tnlDirectEikonalProblem.h"

using namespace TNL;

//typedef tnlDefaultBuildMeshConfig BuildConfig;
typedef tnlFastBuildConfig BuildConfig;
typedef Solvers::FastBuildConfig BuildConfig;

template< typename MeshConfig >
class tnlDirectEikonalSolverConfig
{
   public:
      static void configSetup( tnlConfigDescription& config )
      static void configSetup( Config::ConfigDescription& config )
      {
         config.addDelimiter( "Direct eikonal equation solver settings:" );
         config.addRequiredEntry< String >( "input-file", "Input file." );
@@ -50,12 +51,12 @@ class tnlDirectEikonalSolverSetter
   typedef Device DeviceType;
   typedef Index IndexType;

   typedef Containers::StaticVector< MeshType::meshDimensions, Real > Point;
   typedef Containers::StaticVector< MeshType::getMeshDimension(), Real > Point;

   static bool run( const Config::ParameterContainer& parameters )
   {
      enum { Dimensions = MeshType::meshDimensions };
      typedef tnlConstantFunction< Dimensions, Real > Anisotropy;
      static const int Dimension = MeshType::getMeshDimension();
      typedef Functions::Analytic::Constant< Dimension, Real > Anisotropy;
      typedef tnlDirectEikonalProblem< MeshType, Anisotropy > Problem;
      SolverStarter solverStarter;
      return solverStarter.template run< Problem >( parameters );
@@ -64,7 +65,7 @@ class tnlDirectEikonalSolverSetter

int main( int argc, char* argv[] )
{
   if( ! tnlSolver< tnlDirectEikonalSolverSetter, tnlDirectEikonalSolverConfig, BuildConfig >::run( argc, argv ) )
   if( ! Solvers::Solver< tnlDirectEikonalSolverSetter, tnlDirectEikonalSolverConfig, BuildConfig >::run( argc, argv ) )
      return EXIT_FAILURE;
   return EXIT_SUCCESS;
}
+16 −14
Original line number Diff line number Diff line
@@ -7,8 +7,10 @@

#pragma once 

#include <mesh/tnlGrid.h>
#include <functions/tnlMeshFunction.h>
#include <TNL/Meshes/Grid.h>
#include <TNL/Functions/MeshFunction.h>

using namespace TNL;

template< typename Mesh >
class tnlDirectEikonalMethodsBase
@@ -18,16 +20,16 @@ class tnlDirectEikonalMethodsBase
template< typename Real,
          typename Device,
          typename Index >
class tnlDirectEikonalMethodsBase< tnlGrid< 1, Real, Device, Index > >
class tnlDirectEikonalMethodsBase< Meshes::Grid< 1, Real, Device, Index > >
{
   public:
      
      typedef tnlGrid< 1, Real, Device, Index > MeshType;
      typedef Meshes::Grid< 1, Real, Device, Index > MeshType;
      typedef Real RealType;
      typedef Device DevcieType;
      typedef Index IndexType;
      typedef tnlMeshFunction< MeshType > MeshFunctionType;
      typedef tnlMeshFunction< MeshType, 1, bool > InterfaceMapType;
      typedef Functions::MeshFunction< MeshType > MeshFunctionType;
      typedef Functions::MeshFunction< MeshType, 1, bool > InterfaceMapType;
      
      void initInterface( const MeshFunctionType& input,
                          MeshFunctionType& output,
@@ -43,16 +45,16 @@ class tnlDirectEikonalMethodsBase< tnlGrid< 1, Real, Device, Index > >
template< typename Real,
          typename Device,
          typename Index >
class tnlDirectEikonalMethodsBase< tnlGrid< 2, Real, Device, Index > >
class tnlDirectEikonalMethodsBase< Meshes::Grid< 2, Real, Device, Index > >
{
   public:
      
      typedef tnlGrid< 2, Real, Device, Index > MeshType;
      typedef Meshes::Grid< 2, Real, Device, Index > MeshType;
      typedef Real RealType;
      typedef Device DevcieType;
      typedef Index IndexType;
      typedef tnlMeshFunction< MeshType > MeshFunctionType;
      typedef tnlMeshFunction< MeshType, 2, bool > InterfaceMapType;
      typedef Functions::MeshFunction< MeshType > MeshFunctionType;
      typedef Functions::MeshFunction< MeshType, 2, bool > InterfaceMapType;

      void initInterface( const MeshFunctionType& input,
                          MeshFunctionType& output,
@@ -66,16 +68,16 @@ class tnlDirectEikonalMethodsBase< tnlGrid< 2, Real, Device, Index > >
template< typename Real,
          typename Device,
          typename Index >
class tnlDirectEikonalMethodsBase< tnlGrid< 3, Real, Device, Index > >
class tnlDirectEikonalMethodsBase< Meshes::Grid< 3, Real, Device, Index > >
{
   public:
      
      typedef tnlGrid< 3, Real, Device, Index > MeshType;
      typedef Meshes::Grid< 3, Real, Device, Index > MeshType;
      typedef Real RealType;
      typedef Device DevcieType;
      typedef Index IndexType;
      typedef tnlMeshFunction< MeshType > MeshFunctionType;
      typedef tnlMeshFunction< MeshType, 3, bool > InterfaceMapType;
      typedef Functions::MeshFunction< MeshType > MeshFunctionType;
      typedef Functions::MeshFunction< MeshType, 3, bool > InterfaceMapType;

      void initInterface( const MeshFunctionType& input,
                          MeshFunctionType& output,
Loading