Loading src/implementation/operators/tnlDirichletBoundaryConditions_impl.h +6 −6 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ setBoundaryConditions( const RealType& time, DofVectorType& fu ) { fu[ index ] = 0; u[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); } template< typename MeshReal, Loading Loading @@ -79,7 +79,7 @@ updateLinearSystem( const RealType& time, { columns[ 0 ] = index; values[ 0 ] = 1.0; b[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); rowLength = 1; } Loading Loading @@ -118,7 +118,7 @@ setBoundaryConditions( const RealType& time, DofVectorType& fu ) { fu[ index ] = 0; u[ index ] = function.getValue( mesh.getVertex( coordinates ), time );; u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time );; } template< typename MeshReal, Loading Loading @@ -162,7 +162,7 @@ updateLinearSystem( const RealType& time, { columns[ 0 ] = index; values[ 0 ] = 1.0; b[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); rowLength = 1; } Loading Loading @@ -201,7 +201,7 @@ setBoundaryConditions( const RealType& time, DofVectorType& fu ) { fu[ index ] = 0; u[ index ] = function.getValue( mesh.getVertex( coordinates ), time );; u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time );; } template< typename MeshReal, Loading Loading @@ -245,7 +245,7 @@ updateLinearSystem( const RealType& time, { columns[ 0 ] = index; values[ 0 ] = 1.0; b[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); rowLength = 1; } Loading src/implementation/solvers/pde/CMakeLists.txt +2 −1 Original line number Diff line number Diff line SET( headers tnlExplicitTimeStepper_impl.h tnlPDESolver_impl.h tnlExplicitUpdater_impl.h tnlLinearSystemAssembler_impl.h ) tnlLinearSystemAssembler_impl.h tnlSemiImplicitTimeStepper_impl.h ) INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/implementation/solvers/pde ) src/implementation/solvers/pde/tnlExplicitTimeStepper_impl.h +2 −1 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ bool tnlExplicitTimeStepper< Problem, OdeSolver >::solve( const RealType& time, const MeshType& mesh, DofVectorType& dofVector ) { tnlAssert( this->odeSolver, ); this->odeSolver->setTau( this -> timeStep ); this->odeSolver->setProblem( * this ); this->odeSolver->setTime( time ); Loading src/implementation/solvers/tnlIterativeSolver_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,10 @@ void tnlIterativeSolver< Real, Index> :: resetIterations() template< typename Real, typename Index > bool tnlIterativeSolver< Real, Index> :: nextIteration() { solverMonitor->setIterations( ++this->currentIteration ); solverMonitor->setResidue( this->getResidue() ); // TODO: fix //tnlAssert( solverMonitor, ); //solverMonitor->setIterations( ++this->currentIteration ); //solverMonitor->setResidue( this->getResidue() ); if( this->solverMonitor && this->currentIteration % this->refreshRate == 0 ) solverMonitor->refresh(); Loading Loading
src/implementation/operators/tnlDirichletBoundaryConditions_impl.h +6 −6 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ setBoundaryConditions( const RealType& time, DofVectorType& fu ) { fu[ index ] = 0; u[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); } template< typename MeshReal, Loading Loading @@ -79,7 +79,7 @@ updateLinearSystem( const RealType& time, { columns[ 0 ] = index; values[ 0 ] = 1.0; b[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); rowLength = 1; } Loading Loading @@ -118,7 +118,7 @@ setBoundaryConditions( const RealType& time, DofVectorType& fu ) { fu[ index ] = 0; u[ index ] = function.getValue( mesh.getVertex( coordinates ), time );; u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time );; } template< typename MeshReal, Loading Loading @@ -162,7 +162,7 @@ updateLinearSystem( const RealType& time, { columns[ 0 ] = index; values[ 0 ] = 1.0; b[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); rowLength = 1; } Loading Loading @@ -201,7 +201,7 @@ setBoundaryConditions( const RealType& time, DofVectorType& fu ) { fu[ index ] = 0; u[ index ] = function.getValue( mesh.getVertex( coordinates ), time );; u[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time );; } template< typename MeshReal, Loading Loading @@ -245,7 +245,7 @@ updateLinearSystem( const RealType& time, { columns[ 0 ] = index; values[ 0 ] = 1.0; b[ index ] = function.getValue( mesh.getVertex( coordinates ), time ); b[ index ] = function.getValue( mesh.getCellCenter( coordinates ), time ); rowLength = 1; } Loading
src/implementation/solvers/pde/CMakeLists.txt +2 −1 Original line number Diff line number Diff line SET( headers tnlExplicitTimeStepper_impl.h tnlPDESolver_impl.h tnlExplicitUpdater_impl.h tnlLinearSystemAssembler_impl.h ) tnlLinearSystemAssembler_impl.h tnlSemiImplicitTimeStepper_impl.h ) INSTALL( FILES ${headers} DESTINATION include/tnl-${tnlVersion}/implementation/solvers/pde )
src/implementation/solvers/pde/tnlExplicitTimeStepper_impl.h +2 −1 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ bool tnlExplicitTimeStepper< Problem, OdeSolver >::solve( const RealType& time, const MeshType& mesh, DofVectorType& dofVector ) { tnlAssert( this->odeSolver, ); this->odeSolver->setTau( this -> timeStep ); this->odeSolver->setProblem( * this ); this->odeSolver->setTime( time ); Loading
src/implementation/solvers/tnlIterativeSolver_impl.h +4 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,10 @@ void tnlIterativeSolver< Real, Index> :: resetIterations() template< typename Real, typename Index > bool tnlIterativeSolver< Real, Index> :: nextIteration() { solverMonitor->setIterations( ++this->currentIteration ); solverMonitor->setResidue( this->getResidue() ); // TODO: fix //tnlAssert( solverMonitor, ); //solverMonitor->setIterations( ++this->currentIteration ); //solverMonitor->setResidue( this->getResidue() ); if( this->solverMonitor && this->currentIteration % this->refreshRate == 0 ) solverMonitor->refresh(); Loading