Commit b2840e59 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

tnl-quickstart is ready to use.

simple-solver and make-project were removed from examples.
parent f4094ce0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
add_subdirectory( make-project )
add_subdirectory( simple-solver )
add_subdirectory( heat-equation )
add_subdirectory( navier-stokes )
+8 −8
Original line number Diff line number Diff line
@@ -80,27 +80,27 @@ class heatEquationSetter
         if( boundaryConditionsType == "dirichlet" )
         {
            typedef tnlAnalyticDirichletBoundaryConditions< MeshType, ConstantFunction, Real, Index > BoundaryConditions;
            typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Solver;
            typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem;
            SolverStarter solverStarter;
            return solverStarter.template run< Solver >( parameters );
            return solverStarter.template run< Problem >( parameters );
         }
         typedef tnlAnalyticNeumannBoundaryConditions< MeshType, ConstantFunction, Real, Index > BoundaryConditions;
         typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Solver;
         typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem;
         SolverStarter solverStarter;
         return solverStarter.template run< Solver >( parameters );
         return solverStarter.template run< Problem >( parameters );
      }
      typedef tnlVector< Real, Device, Index > VectorType;
      if( boundaryConditionsType == "dirichlet" )
      {
         typedef tnlDirichletBoundaryConditions< MeshType, VectorType, Real, Index > BoundaryConditions;
         typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Solver;
         typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem;
         SolverStarter solverStarter;
         return solverStarter.template run< Solver >( parameters );
         return solverStarter.template run< Problem >( parameters );
      }
      typedef tnlNeumannBoundaryConditions< MeshType, VectorType, Real, Index > BoundaryConditions;
      typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Solver;
      typedef tnlHeatEquationProblem< MeshType, BoundaryConditions, RightHandSide, ApproximateOperator > Problem;
      SolverStarter solverStarter;
      return solverStarter.template run< Solver >( parameters );
      return solverStarter.template run< Problem >( parameters );
   };
};

+0 −4
Original line number Diff line number Diff line
INSTALL( FILES Makefile
               main.cpp
               program-name.cfg.desc
         DESTINATION share/tnl-${tnlVersion}/examples/make-project )
 No newline at end of file

examples/make-project/Makefile

deleted100644 → 0
+0 −42
Original line number Diff line number Diff line
TNL_VERSION=0.1
TNL_INSTALL_DIR=${HOME}/local/lib
TNL_INCLUDE_DIR=${HOME}/local/include/tnl-${TNL_VERSION}

TARGET = program-name
CONFIG_FILE = $(TARGET).cfg.desc
INSTALL_DIR = ${HOME}/local
CXX = g++
CUDA_CXX = nvcc
CXX_FLAGS = -std=gnu++0x -I$(TNL_INCLUDE_DIR)
LD_FLAGS = -L$(TNL_INSTALL_DIR) -ltnl-0.1

SOURCES = main.cpp
HEADERS = 
OBJECTS = main.o
DIST = $(SOURCES) Makefile

all: $(TARGET)
clean: 
	rm -f $(OBJECTS)
	rm -f $(TARGET)-conf.h	

dist: $(DIST)
	tar zcvf $(TARGET).tgz $(DIST) 

install: $(TARGET)
	cp $(TARGET) $(INSTALL_DIR)/bin
	cp $(CONFIG_FILE) $(INSTALL_DIR)/share

uninstall: $(TARGET)
	rm -f $(INSTALL_DIR)/bin/$(TARGET) 
	rm -f $(CONFIG_FILE) $(INSTALL_DIR)/share

$(TARGET): $(OBJECTS)
	$(CXX) -o $(TARGET) $(OBJECTS) $(LD_FLAGS)

%.o: %.cpp $(TARGET)-conf.h $(HEADERS)
	$(CXX) -c -o $@ $(CXX_FLAGS) $<

$(TARGET)-conf.h:
	echo "#define CONFIG_FILE \"${INSTALL_DIR}/share/${CONFIG_FILE}\" " > $(TARGET)-conf.h 

examples/make-project/main.cpp

deleted100644 → 0
+0 −40
Original line number Diff line number Diff line
/***************************************************************************
                          main.cpp  -  description
                             -------------------
    begin                : Jan 12, 2013
    copyright            : (C) 2013 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.                                   *
 *                                                                         *
 ***************************************************************************/

#include "program-name-conf.h"
#include <config/tnlConfigDescription.h>
#include <config/tnlParameterContainer.h>

int main( int argc, char* argv[] )
{
   tnlParameterContainer parameters;
   tnlConfigDescription conf_desc;
   if( conf_desc.parseConfigDescription( CONFIG_FILE ) != 0 )
      return EXIT_FAILURE;
   if( ! parseCommandLine( argc, argv, conf_desc, parameters ) )
   {
      conf_desc.printUsage( argv[ 0 ] );
      return EXIT_FAILURE;
   }

   /****
    * Write your code here
    */
   return EXIT_SUCCESS;
}

Loading