Loading src/operators/diffusion/tnlLinearDiffusion_impl.h +9 −6 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > template< typename Vector, typename MatrixRow > template< typename Vector, typename Matrix > __cuda_callable__ void tnlLinearDiffusion< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: Loading @@ -87,8 +87,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, Vector& u, Vector& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const RealType lambdaX = tau * mesh.getHxSquareInverse(); //printf( "tau = %f lambda = %f dx_sqr = %f dx = %f, \n", tau, lambdaX, mesh.getHxSquareInverse(), mesh.getHx() ); matrixRow.setElement( 0, mesh.template getCellNextToCell< -1 >( index ), - lambdaX ); Loading Loading @@ -156,7 +157,7 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > template< typename Vector, typename MatrixRow > template< typename Vector, typename Matrix > __cuda_callable__ void tnlLinearDiffusion< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: Loading @@ -167,8 +168,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, Vector& u, Vector& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const RealType lambdaX = tau * mesh.getHxSquareInverse(); const RealType lambdaY = tau * mesh.getHySquareInverse(); matrixRow.setElement( 0, mesh.template getCellNextToCell< 0, -1 >( index ), -lambdaY ); Loading Loading @@ -240,7 +242,7 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > template< typename Vector, typename MatrixRow > template< typename Vector, typename Matrix > __cuda_callable__ void tnlLinearDiffusion< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: Loading @@ -251,8 +253,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, Vector& u, Vector& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const RealType lambdaX = tau * mesh.getHxSquareInverse(); const RealType lambdaY = tau * mesh.getHySquareInverse(); const RealType lambdaZ = tau * mesh.getHzSquareInverse(); Loading src/operators/tnlAnalyticDirichletBoundaryConditions_impl.h +3 −2 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ template< int Dimensions, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -145,8 +145,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); matrixRow.setElement( 0, index, 1.0 ); b[ index ] = function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); } Loading src/operators/tnlAnalyticNeumannBoundaryConditions_impl.h +9 −6 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ template< typename MeshReal, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticNeumannBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -122,8 +122,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const Real functionValue = this->function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); if( coordinates.x() == 0 ) { Loading Loading @@ -205,7 +206,7 @@ template< typename MeshReal, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticNeumannBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -215,8 +216,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const Real functionValue = this->function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); if( coordinates.x() == 0 ) { Loading Loading @@ -320,7 +322,7 @@ template< typename MeshReal, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticNeumannBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -330,8 +332,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const Real functionValue = this->function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); if( coordinates.x() == 0 ) { Loading src/operators/tnlDirichletBoundaryConditions_impl.h +3 −2 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ template< int Dimensions, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -138,8 +138,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); matrixRow.setElement( 0, index, 1.0 ); b[ index ] = this->vector[ index ]; } Loading src/operators/tnlNeumannBoundaryConditions_impl.h +9 −6 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ template< typename MeshReal, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlNeumannBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -99,8 +99,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); if( coordinates.x() == 0 ) { matrixRow.setElement( 0, index, 1.0 ); Loading Loading @@ -179,7 +180,7 @@ template< typename MeshReal, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlNeumannBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -189,8 +190,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); if( coordinates.x() == 0 ) { matrixRow.setElement( 0, index, 1.0 ); Loading Loading @@ -291,7 +293,7 @@ template< typename MeshReal, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlNeumannBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -301,8 +303,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); if( coordinates.x() == 0 ) { matrixRow.setElement( 0, index, 1.0 ); Loading Loading
src/operators/diffusion/tnlLinearDiffusion_impl.h +9 −6 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > template< typename Vector, typename MatrixRow > template< typename Vector, typename Matrix > __cuda_callable__ void tnlLinearDiffusion< tnlGrid< 1, MeshReal, Device, MeshIndex >, Real, Index >:: Loading @@ -87,8 +87,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, Vector& u, Vector& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const RealType lambdaX = tau * mesh.getHxSquareInverse(); //printf( "tau = %f lambda = %f dx_sqr = %f dx = %f, \n", tau, lambdaX, mesh.getHxSquareInverse(), mesh.getHx() ); matrixRow.setElement( 0, mesh.template getCellNextToCell< -1 >( index ), - lambdaX ); Loading Loading @@ -156,7 +157,7 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > template< typename Vector, typename MatrixRow > template< typename Vector, typename Matrix > __cuda_callable__ void tnlLinearDiffusion< tnlGrid< 2, MeshReal, Device, MeshIndex >, Real, Index >:: Loading @@ -167,8 +168,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, Vector& u, Vector& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const RealType lambdaX = tau * mesh.getHxSquareInverse(); const RealType lambdaY = tau * mesh.getHySquareInverse(); matrixRow.setElement( 0, mesh.template getCellNextToCell< 0, -1 >( index ), -lambdaY ); Loading Loading @@ -240,7 +242,7 @@ template< typename MeshReal, typename MeshIndex, typename Real, typename Index > template< typename Vector, typename MatrixRow > template< typename Vector, typename Matrix > __cuda_callable__ void tnlLinearDiffusion< tnlGrid< 3, MeshReal, Device, MeshIndex >, Real, Index >:: Loading @@ -251,8 +253,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, Vector& u, Vector& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const RealType lambdaX = tau * mesh.getHxSquareInverse(); const RealType lambdaY = tau * mesh.getHySquareInverse(); const RealType lambdaZ = tau * mesh.getHzSquareInverse(); Loading
src/operators/tnlAnalyticDirichletBoundaryConditions_impl.h +3 −2 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ template< int Dimensions, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -145,8 +145,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); matrixRow.setElement( 0, index, 1.0 ); b[ index ] = function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); } Loading
src/operators/tnlAnalyticNeumannBoundaryConditions_impl.h +9 −6 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ template< typename MeshReal, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticNeumannBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -122,8 +122,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const Real functionValue = this->function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); if( coordinates.x() == 0 ) { Loading Loading @@ -205,7 +206,7 @@ template< typename MeshReal, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticNeumannBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -215,8 +216,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const Real functionValue = this->function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); if( coordinates.x() == 0 ) { Loading Loading @@ -320,7 +322,7 @@ template< typename MeshReal, typename Function, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlAnalyticNeumannBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Function, Real, Index >:: Loading @@ -330,8 +332,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); const Real functionValue = this->function.getValue( mesh.template getCellCenter< VertexType >( coordinates ), time ); if( coordinates.x() == 0 ) { Loading
src/operators/tnlDirichletBoundaryConditions_impl.h +3 −2 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ template< int Dimensions, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlDirichletBoundaryConditions< tnlGrid< Dimensions, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -138,8 +138,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); matrixRow.setElement( 0, index, 1.0 ); b[ index ] = this->vector[ index ]; } Loading
src/operators/tnlNeumannBoundaryConditions_impl.h +9 −6 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ template< typename MeshReal, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlNeumannBoundaryConditions< tnlGrid< 1, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -99,8 +99,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); if( coordinates.x() == 0 ) { matrixRow.setElement( 0, index, 1.0 ); Loading Loading @@ -179,7 +180,7 @@ template< typename MeshReal, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlNeumannBoundaryConditions< tnlGrid< 2, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -189,8 +190,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); if( coordinates.x() == 0 ) { matrixRow.setElement( 0, index, 1.0 ); Loading Loading @@ -291,7 +293,7 @@ template< typename MeshReal, typename Vector, typename Real, typename Index > template< typename MatrixRow > template< typename Matrix > __cuda_callable__ void tnlNeumannBoundaryConditions< tnlGrid< 3, MeshReal, Device, MeshIndex >, Vector, Real, Index >:: Loading @@ -301,8 +303,9 @@ updateLinearSystem( const RealType& time, const CoordinatesType& coordinates, DofVectorType& u, DofVectorType& b, MatrixRow& matrixRow ) const Matrix& matrix ) const { typename Matrix::MatrixRow matrixRow = matrix.getRow( index ); if( coordinates.x() == 0 ) { matrixRow.setElement( 0, index, 1.0 ); Loading