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

Fixing tnl-heat-equation-benchmark.

parent ae1ee52b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -77,7 +77,8 @@ class tnlArray : public virtual tnlObject
      void bind( Element* _data,
                 const Index _size );

      void bind( const tnlArray< Element, Device, Index >& array,
      template< typename Array >      
      void bind( const Array& array,
                 const IndexType& begin = 0,
                 const IndexType& size = 0 );

+3 −1
Original line number Diff line number Diff line
@@ -225,12 +225,14 @@ bind( Element* data,
template< typename Element,
           typename Device,
           typename Index >
   template< typename Array >
void
tnlArray< Element, Device, Index >::
bind( const tnlArray< Element, Device, Index >& array,
bind( const Array& array,
      const IndexType& begin,
      const IndexType& size )
{
   tnlAssert( ( std::is_same< Device, typename Array::DeviceType>::value ), );
   tnlAssert( begin <= array.getSize(),
              std::cerr << " begin = " << begin << " array.getSize() = " << array.getSize() );
   tnlAssert( begin + size  <= array.getSize(),
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ template< typename Real, typename Index >
void tnlIterativeSolver< Real, Index> :: configSetup( tnlConfigDescription& config,
                                                      const tnlString& prefix )
{
   config.addEntry< int >   ( prefix + "max-iterations", "Maximal number of iterations the solver may perform.", 100000000000 );
   config.addEntry< int >   ( prefix + "max-iterations", "Maximal number of iterations the solver may perform.", 1000000000 );
   config.addEntry< int >   ( prefix + "min-iterations", "Minimal number of iterations the solver must perform.", 0 );
   config.addEntry< double >( prefix + "convergence-residue", "Convergence occurs when the residue drops bellow this limit.", 1.0e-6 );
   config.addEntry< double >( prefix + "divergence-residue", "Divergence occurs when the residue exceeds given limit.", DBL_MAX );
+3 −1
Original line number Diff line number Diff line
@@ -144,9 +144,11 @@ makeSnapshot( const RealType& time,
{
   cout << endl << "Writing output at time " << time << " step " << step << "." << endl;
   this->bindDofs( mesh, dofs );
   MeshFunctionType u;
   u.bind( mesh, dofs );
   tnlString fileName;
   FileNameBaseNumberEnding( "u-", step, 5, ".tnl", fileName );
   if( ! dofs.save( fileName ) )
   if( ! u.save( fileName ) )
      return false;
   return true;
}
+2 −0
Original line number Diff line number Diff line
@@ -18,7 +18,9 @@
#ifndef PURE_C_RHS_H
#define	PURE_C_RHS_H

#ifdef HAVE_CUDA
#include<cuda.h>
#endif

/****
 * Just testing data for measuring performance