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

Merge branch 'TO/heat-equation' of mmg-gitlab.fjfi.cvut.cz:tnl/tnl-dev into TO/heat-equation

parents ad50df1f 5d3db6df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ g++ -std=c++14 -I${HOME}/.local/include/tnl example-host.cpp -o example-host

TNL requires standard C++14 which we enforce with the first parameter `-std=c++14`. Next, we need to tell the compiler the folder with TNL headers. This is done with the flag `-I`. By default, TNL installs into `${HOME}/.local/include/tnl`. You may also replace it just with the path where you have downloaded TNL. TNL is header only library and so it does not require any instalation. Finaly, we just past the source code file `example-host.cpp` using the command-line parameter `-c`.

For the best performance we suggest to add parameters `-DNDEBUG -O3 -funroll-loops`. The first one deactivates assertions in TNL which can significantly slow down your program.
**For the best performance we recommend to add parameters `-DNDEBUG -O3 -funroll-loops`. The source code of TNL contains a lot of assertions which significantly decrease the performance. The parameter `-DNDEBUG` deactivates them.**

### Compilation with `nvcc` for CUDA <a name="command_line_nvcc"></a>

+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ bind( const MeshPointer& meshPointer,
{
   TNL_ASSERT_GE( data->getSize(), offset + meshPointer->template getEntitiesCount< typename MeshType::template EntityType< MeshEntityDimension > >(),
                  "The input vector is not large enough for binding to the mesh function." );

   static_assert( std::is_same< typename Vector::RealType, RealType >::value, "Cannot bind Vector with different Real type." );
   setupSynchronizer(meshPointer->getDistributedMesh());
   this->meshPointer=meshPointer;
   this->data.bind( *data, offset, getMesh().template getEntitiesCount< typename Mesh::template EntityType< MeshEntityDimension > >() );
+4 −4
Original line number Diff line number Diff line
@@ -38,15 +38,15 @@ template< typename Mesh,
                                                              typename BoundaryCondition::RealType > >
class HeatEquationProblem : public PDEProblem< Mesh,
                                               Communicator,
                                               typename DifferentialOperator::RealType,
                                               typename Mesh::RealType,
                                               typename Mesh::DeviceType,
                                               typename DifferentialOperator::IndexType  >
                                               typename Mesh::IndexType  >
{
   public:

      typedef typename DifferentialOperator::RealType RealType;
      typedef typename Mesh::RealType RealType;
      typedef typename Mesh::DeviceType DeviceType;
      typedef typename DifferentialOperator::IndexType IndexType;
      typedef typename Mesh::IndexType IndexType;
      typedef Functions::MeshFunction< Mesh > MeshFunctionType;
      typedef Pointers::SharedPointer< MeshFunctionType, DeviceType > MeshFunctionPointer;
      typedef PDEProblem< Mesh, Communicator, RealType, DeviceType, IndexType > BaseType;