Loading examples/heat-equation/tnl-heat-equation-eoc.h +3 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #define TNL_HEAT_EQUATION_EOC_H_ #include <solvers/tnlSolver.h> #include <solvers/tnlFastBuildConfig.h> #include <solvers/tnlConfigTags.h> #include <solvers/tnlFastBuildConfigTag.h> #include <solvers/tnlBuildConfigTags.h> #include <functors/tnlTestFunction.h> #include <operators/diffusion/tnlLinearDiffusion.h> #include <operators/diffusion/tnlExactLinearDiffusion.h> Loading @@ -28,7 +28,7 @@ #include <problems/tnlHeatEquationEocRhs.h> #include <problems/tnlHeatEquationEocProblem.h> //typedef tnlDefaultConfigTag BuildConfig; //typedef tnlDefaultBuildConfigTag BuildConfig; typedef tnlFastBuildConfig BuildConfig; template< typename ConfigTag > Loading examples/heat-equation/tnl-heat-equation.h +4 −5 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #define TNL_HEAT_EQUATION_H_ #include <solvers/tnlSolver.h> #include <solvers/tnlFastBuildConfig.h> #include <solvers/tnlConfigTags.h> #include <solvers/tnlFastBuildConfigTag.h> #include <solvers/tnlBuildConfigTags.h> #include <operators/diffusion/tnlLinearDiffusion.h> #include <operators/tnlAnalyticDirichletBoundaryConditions.h> #include <operators/tnlDirichletBoundaryConditions.h> Loading @@ -29,7 +29,7 @@ #include <functors/tnlConstantFunction.h> #include <problems/tnlHeatEquationProblem.h> //typedef tnlDefaultConfigTag BuildConfig; //typedef tnlDefaultBuildConfigTag BuildConfig; typedef tnlFastBuildConfig BuildConfig; template< typename ConfigTag > Loading Loading @@ -106,8 +106,7 @@ class heatEquationSetter int main( int argc, char* argv[] ) { tnlSolver< heatEquationSetter, heatEquationConfig, BuildConfig > solver; if( ! solver. run( argc, argv ) ) if( ! tnlSolver< heatEquationSetter, heatEquationConfig, BuildConfig >::run( argc, argv ) ) return EXIT_FAILURE; return EXIT_SUCCESS; } Loading src/core/cuda/cuda-reduction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -282,8 +282,8 @@ typename Operation :: IndexType reduceOnCudaDevice( const Operation& operation, typedef typename Operation :: RealType RealType; typedef typename Operation :: ResultType ResultType; const IndexType desBlockSize( 512 ); const IndexType desGridSize( 2048 ); const IndexType desBlockSize( 256 ); const IndexType desGridSize( 65536 ); dim3 blockSize( 0 ), gridSize( 0 ); /*** Loading src/problems/tnlHeatEquationProblem.h +5 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, using typename BaseType::MeshType; using typename BaseType::DofVectorType; using typename BaseType::MeshDependentDataType; static tnlString getTypeStatic(); Loading @@ -55,7 +56,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, bool setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxDofs ); MeshDependentDataType& meshDependentData ); template< typename Matrix > bool setupLinearSystem( const MeshType& mesh, Loading @@ -65,7 +66,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const IndexType& step, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxDofs ); MeshDependentDataType& meshDependentData ); IndexType getDofs( const MeshType& mesh ) const; Loading @@ -76,6 +77,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const RealType& tau, const MeshType& mesh, DofVectorType& _u, MeshDependentDataType& meshDependentData, DofVectorType& _fu ); template< typename Matrix > Loading @@ -83,7 +85,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const RealType& tau, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxDofs, MeshDependentDataType& meshDependentData, Matrix& matrix, DofVectorType& rightHandSide ); Loading src/problems/tnlHeatEquationProblem_impl.h +24 −3 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ tnlHeatEquationProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOper setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxiliaryDofs ) MeshDependentDataType& meshDependentData ) { this->bindDofs( mesh, dofs ); const tnlString& initialConditionFile = parameters.getParameter< tnlString >( "initial-condition" ); Loading Loading @@ -158,7 +158,7 @@ makeSnapshot( const RealType& time, const IndexType& step, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxiliaryDofs ) MeshDependentDataType& meshDependentData ) { cout << endl << "Writing output at time " << time << " step " << step << "." << endl; Loading @@ -181,6 +181,7 @@ getExplicitRHS( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u, MeshDependentDataType& meshDependentData, DofVectorType& fu ) { /**** Loading Loading @@ -220,7 +221,7 @@ assemblyLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u, DofVectorType& auxDofs, MeshDependentDataType& meshDependentData, Matrix& matrix, DofVectorType& b ) { Loading @@ -244,6 +245,26 @@ assemblyLinearSystem( const RealType& time, cout << endl << b << endl; cout << endl << u << endl; abort();*/ /*cout << "Matrix multiplication test ..." << endl; tnlVector< RealType, DeviceType, IndexType > y; y.setLike( u ); tnlTimerRT timer; timer.reset(); timer.start(); for( int i = 0; i < 100; i++ ) matrix.vectorProduct( u, y ); timer.stop(); cout << "The time is " << timer.getTime(); cout << "Scalar product test ..." << endl; timer.reset(); RealType a; timer.start(); for( int i = 0; i < 100; i++ ) a = y.scalarProduct( u ); timer.stop(); cout << "The time is " << timer.getTime(); cout << endl; abort();*/ } #endif /* TNLHEATEQUATIONPROBLEM_IMPL_H_ */ Loading
examples/heat-equation/tnl-heat-equation-eoc.h +3 −3 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #define TNL_HEAT_EQUATION_EOC_H_ #include <solvers/tnlSolver.h> #include <solvers/tnlFastBuildConfig.h> #include <solvers/tnlConfigTags.h> #include <solvers/tnlFastBuildConfigTag.h> #include <solvers/tnlBuildConfigTags.h> #include <functors/tnlTestFunction.h> #include <operators/diffusion/tnlLinearDiffusion.h> #include <operators/diffusion/tnlExactLinearDiffusion.h> Loading @@ -28,7 +28,7 @@ #include <problems/tnlHeatEquationEocRhs.h> #include <problems/tnlHeatEquationEocProblem.h> //typedef tnlDefaultConfigTag BuildConfig; //typedef tnlDefaultBuildConfigTag BuildConfig; typedef tnlFastBuildConfig BuildConfig; template< typename ConfigTag > Loading
examples/heat-equation/tnl-heat-equation.h +4 −5 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ #define TNL_HEAT_EQUATION_H_ #include <solvers/tnlSolver.h> #include <solvers/tnlFastBuildConfig.h> #include <solvers/tnlConfigTags.h> #include <solvers/tnlFastBuildConfigTag.h> #include <solvers/tnlBuildConfigTags.h> #include <operators/diffusion/tnlLinearDiffusion.h> #include <operators/tnlAnalyticDirichletBoundaryConditions.h> #include <operators/tnlDirichletBoundaryConditions.h> Loading @@ -29,7 +29,7 @@ #include <functors/tnlConstantFunction.h> #include <problems/tnlHeatEquationProblem.h> //typedef tnlDefaultConfigTag BuildConfig; //typedef tnlDefaultBuildConfigTag BuildConfig; typedef tnlFastBuildConfig BuildConfig; template< typename ConfigTag > Loading Loading @@ -106,8 +106,7 @@ class heatEquationSetter int main( int argc, char* argv[] ) { tnlSolver< heatEquationSetter, heatEquationConfig, BuildConfig > solver; if( ! solver. run( argc, argv ) ) if( ! tnlSolver< heatEquationSetter, heatEquationConfig, BuildConfig >::run( argc, argv ) ) return EXIT_FAILURE; return EXIT_SUCCESS; } Loading
src/core/cuda/cuda-reduction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -282,8 +282,8 @@ typename Operation :: IndexType reduceOnCudaDevice( const Operation& operation, typedef typename Operation :: RealType RealType; typedef typename Operation :: ResultType ResultType; const IndexType desBlockSize( 512 ); const IndexType desGridSize( 2048 ); const IndexType desBlockSize( 256 ); const IndexType desGridSize( 65536 ); dim3 blockSize( 0 ), gridSize( 0 ); /*** Loading
src/problems/tnlHeatEquationProblem.h +5 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, using typename BaseType::MeshType; using typename BaseType::DofVectorType; using typename BaseType::MeshDependentDataType; static tnlString getTypeStatic(); Loading @@ -55,7 +56,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, bool setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxDofs ); MeshDependentDataType& meshDependentData ); template< typename Matrix > bool setupLinearSystem( const MeshType& mesh, Loading @@ -65,7 +66,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const IndexType& step, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxDofs ); MeshDependentDataType& meshDependentData ); IndexType getDofs( const MeshType& mesh ) const; Loading @@ -76,6 +77,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const RealType& tau, const MeshType& mesh, DofVectorType& _u, MeshDependentDataType& meshDependentData, DofVectorType& _fu ); template< typename Matrix > Loading @@ -83,7 +85,7 @@ class tnlHeatEquationProblem : public tnlPDEProblem< Mesh, const RealType& tau, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxDofs, MeshDependentDataType& meshDependentData, Matrix& matrix, DofVectorType& rightHandSide ); Loading
src/problems/tnlHeatEquationProblem_impl.h +24 −3 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ tnlHeatEquationProblem< Mesh, BoundaryCondition, RightHandSide, DifferentialOper setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxiliaryDofs ) MeshDependentDataType& meshDependentData ) { this->bindDofs( mesh, dofs ); const tnlString& initialConditionFile = parameters.getParameter< tnlString >( "initial-condition" ); Loading Loading @@ -158,7 +158,7 @@ makeSnapshot( const RealType& time, const IndexType& step, const MeshType& mesh, DofVectorType& dofs, DofVectorType& auxiliaryDofs ) MeshDependentDataType& meshDependentData ) { cout << endl << "Writing output at time " << time << " step " << step << "." << endl; Loading @@ -181,6 +181,7 @@ getExplicitRHS( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u, MeshDependentDataType& meshDependentData, DofVectorType& fu ) { /**** Loading Loading @@ -220,7 +221,7 @@ assemblyLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u, DofVectorType& auxDofs, MeshDependentDataType& meshDependentData, Matrix& matrix, DofVectorType& b ) { Loading @@ -244,6 +245,26 @@ assemblyLinearSystem( const RealType& time, cout << endl << b << endl; cout << endl << u << endl; abort();*/ /*cout << "Matrix multiplication test ..." << endl; tnlVector< RealType, DeviceType, IndexType > y; y.setLike( u ); tnlTimerRT timer; timer.reset(); timer.start(); for( int i = 0; i < 100; i++ ) matrix.vectorProduct( u, y ); timer.stop(); cout << "The time is " << timer.getTime(); cout << "Scalar product test ..." << endl; timer.reset(); RealType a; timer.start(); for( int i = 0; i < 100; i++ ) a = y.scalarProduct( u ); timer.stop(); cout << "The time is " << timer.getTime(); cout << endl; abort();*/ } #endif /* TNLHEATEQUATIONPROBLEM_IMPL_H_ */