Loading TODO +16 −0 Original line number Diff line number Diff line TODO: test aproximace pro implicitni schemata TODO: pokusit se napsat test explicitni aproximace podobne jako implicinit bez specializace pro grid TODO: doladit semi-implicitni resic TODO: opravit argumenty metod v heat equation - nekde se nepredavaji dofy a pomocne dofy TODO: doresit okrajove podminky v heat equation - nacitani ze souboru => soucasne Dir. a Neum. okrajove podminky prejmenovat asi tnlAnalytic... a zavest nove tnlDirichlet... a tnlNeumann... ktere budou mit sve hodnoty ulozene ve vektoru TODO: neumanovy okrajove podminky TODO: doladit vse s CUDA TODO: doplnit mesh travelsals pro jine mesh entity nez cell TODO: implementace maticovych resicu * Gaussova eliminace * SOR metoda * Jacobiho metoda * TFQMR metoda * IDR metody TODO: implementovat tridu tnlFileName pro generovani jmen souboru Loading examples/heat-equation/heatEquationSolver.h +12 −0 Original line number Diff line number Diff line Loading @@ -76,12 +76,18 @@ class heatEquationSolver void bindAuxiliaryDofs( const MeshType& mesh, DofVectorType& auxiliaryDofs ); bool preIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ); void getExplicitRHS( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& _u, DofVectorType& _fu ); void assemblyLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading @@ -89,6 +95,12 @@ class heatEquationSolver MatrixType& matrix, DofVectorType& rightHandSide ); bool postIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ); tnlSolverMonitor< RealType, IndexType >* getSolverMonitor(); protected: Loading examples/heat-equation/heatEquationSolver_impl.h +42 −5 Original line number Diff line number Diff line Loading @@ -125,8 +125,8 @@ bindAuxiliaryDofs( const MeshType& mesh, template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, typename RightHandSide > bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide > :: setInitialCondition( const tnlParameterContainer& parameters, bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide >:: setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs ) { Loading @@ -149,13 +149,19 @@ heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide setupLinearSystem( const MeshType& mesh, MatrixType& matrix ) { const IndexType dofs = this->getDofs( mesh ); RowLengthsVectorType rowLengths; if( ! rowLengths.setSize( dofs ) ) return false; tnlMatrixSetter< MeshType, DifferentialOperator, BoundaryCondition, RowLengthsVectorType > matrixSetter; matrixSetter.template getRowLengths< Mesh::Dimensions >( mesh, differentialOperator, boundaryCondition, rowLengths ); matrix.setRowLengths( rowLengths ); matrix.setDimensions( dofs, dofs ); if( ! matrix.setRowLengths( rowLengths ) ) return false; return true; } template< typename Mesh, Loading @@ -177,6 +183,21 @@ makeSnapshot( const RealType& time, return true; } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, typename RightHandSide > bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide >:: preIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ) { return true; } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, Loading Loading @@ -226,7 +247,7 @@ assemblyLinearSystem( const RealType& time, DofVectorType& b ) { tnlLinearSystemAssembler< Mesh, DofVectorType, DifferentialOperator, BoundaryCondition, RightHandSide, MatrixType > systemAssembler; /*systemAssembler.template assembly< Mesh::Dimensions >( time, systemAssembler.template assembly< Mesh::Dimensions >( time, tau, mesh, this->differentialOperator, Loading @@ -235,9 +256,25 @@ assemblyLinearSystem( const RealType& time, u, matrix, b ); */ //matrix.print( cout ); //abort(); } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, typename RightHandSide > bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide >:: postIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ) { return true; } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, Loading examples/heat-equation/tnl-heat-equation.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,13 @@ class heatEquationConfig public: static void configSetup( tnlConfigDescription& config ) { //config.addDelimiter( "Heat equation settings:" ); } config.addDelimiter( "Heat equation settings:" ); config.addEntry< tnlString >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet"); config.addEntryEnum< tnlString >( "dirichlet" ); config.addEntryEnum< tnlString >( "neumann" ); config.addEntry< tnlString >( "boundary-conditions", "File with the values of the boundary conditions.", "boundary.tnl" ); config.addEntry< tnlString >( "initial-condition", "File with the initial condition.", "initial.tnl"); }; }; template< typename Real, Loading examples/heat-equation/tnlHeatEquationEocRhs.h +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class tnlHeatEquationEocRhs template< typename Vertex, typename Real > Real getValue( const Vertex& vertex, const Real& time ) const Real& time ) const { return testFunction.getTimeDerivative( vertex, time ) - exactOperator.getValue( testFunction, vertex, time ); Loading Loading
TODO +16 −0 Original line number Diff line number Diff line TODO: test aproximace pro implicitni schemata TODO: pokusit se napsat test explicitni aproximace podobne jako implicinit bez specializace pro grid TODO: doladit semi-implicitni resic TODO: opravit argumenty metod v heat equation - nekde se nepredavaji dofy a pomocne dofy TODO: doresit okrajove podminky v heat equation - nacitani ze souboru => soucasne Dir. a Neum. okrajove podminky prejmenovat asi tnlAnalytic... a zavest nove tnlDirichlet... a tnlNeumann... ktere budou mit sve hodnoty ulozene ve vektoru TODO: neumanovy okrajove podminky TODO: doladit vse s CUDA TODO: doplnit mesh travelsals pro jine mesh entity nez cell TODO: implementace maticovych resicu * Gaussova eliminace * SOR metoda * Jacobiho metoda * TFQMR metoda * IDR metody TODO: implementovat tridu tnlFileName pro generovani jmen souboru Loading
examples/heat-equation/heatEquationSolver.h +12 −0 Original line number Diff line number Diff line Loading @@ -76,12 +76,18 @@ class heatEquationSolver void bindAuxiliaryDofs( const MeshType& mesh, DofVectorType& auxiliaryDofs ); bool preIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ); void getExplicitRHS( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& _u, DofVectorType& _fu ); void assemblyLinearSystem( const RealType& time, const RealType& tau, const MeshType& mesh, Loading @@ -89,6 +95,12 @@ class heatEquationSolver MatrixType& matrix, DofVectorType& rightHandSide ); bool postIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ); tnlSolverMonitor< RealType, IndexType >* getSolverMonitor(); protected: Loading
examples/heat-equation/heatEquationSolver_impl.h +42 −5 Original line number Diff line number Diff line Loading @@ -125,8 +125,8 @@ bindAuxiliaryDofs( const MeshType& mesh, template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, typename RightHandSide > bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide > :: setInitialCondition( const tnlParameterContainer& parameters, bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide >:: setInitialCondition( const tnlParameterContainer& parameters, const MeshType& mesh, DofVectorType& dofs ) { Loading @@ -149,13 +149,19 @@ heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide setupLinearSystem( const MeshType& mesh, MatrixType& matrix ) { const IndexType dofs = this->getDofs( mesh ); RowLengthsVectorType rowLengths; if( ! rowLengths.setSize( dofs ) ) return false; tnlMatrixSetter< MeshType, DifferentialOperator, BoundaryCondition, RowLengthsVectorType > matrixSetter; matrixSetter.template getRowLengths< Mesh::Dimensions >( mesh, differentialOperator, boundaryCondition, rowLengths ); matrix.setRowLengths( rowLengths ); matrix.setDimensions( dofs, dofs ); if( ! matrix.setRowLengths( rowLengths ) ) return false; return true; } template< typename Mesh, Loading @@ -177,6 +183,21 @@ makeSnapshot( const RealType& time, return true; } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, typename RightHandSide > bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide >:: preIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ) { return true; } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, Loading Loading @@ -226,7 +247,7 @@ assemblyLinearSystem( const RealType& time, DofVectorType& b ) { tnlLinearSystemAssembler< Mesh, DofVectorType, DifferentialOperator, BoundaryCondition, RightHandSide, MatrixType > systemAssembler; /*systemAssembler.template assembly< Mesh::Dimensions >( time, systemAssembler.template assembly< Mesh::Dimensions >( time, tau, mesh, this->differentialOperator, Loading @@ -235,9 +256,25 @@ assemblyLinearSystem( const RealType& time, u, matrix, b ); */ //matrix.print( cout ); //abort(); } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, typename RightHandSide > bool heatEquationSolver< Mesh, DifferentialOperator, BoundaryCondition, RightHandSide >:: postIterate( const RealType& time, const RealType& tau, const MeshType& mesh, DofVectorType& u ) { return true; } template< typename Mesh, typename DifferentialOperator, typename BoundaryCondition, Loading
examples/heat-equation/tnl-heat-equation.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,13 @@ class heatEquationConfig public: static void configSetup( tnlConfigDescription& config ) { //config.addDelimiter( "Heat equation settings:" ); } config.addDelimiter( "Heat equation settings:" ); config.addEntry< tnlString >( "boundary-conditions-type", "Choose the boundary conditions type.", "dirichlet"); config.addEntryEnum< tnlString >( "dirichlet" ); config.addEntryEnum< tnlString >( "neumann" ); config.addEntry< tnlString >( "boundary-conditions", "File with the values of the boundary conditions.", "boundary.tnl" ); config.addEntry< tnlString >( "initial-condition", "File with the initial condition.", "initial.tnl"); }; }; template< typename Real, Loading
examples/heat-equation/tnlHeatEquationEocRhs.h +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ class tnlHeatEquationEocRhs template< typename Vertex, typename Real > Real getValue( const Vertex& vertex, const Real& time ) const Real& time ) const { return testFunction.getTimeDerivative( vertex, time ) - exactOperator.getValue( testFunction, vertex, time ); Loading