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/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 src/implementation/functions/tnlSinWaveFunction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -129,11 +129,11 @@ getValue( const Vertex& v, if( XDiffOrder == 1 && YDiffOrder == 0 ) return 2.0 * M_PI * x / ( this->waveLength * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 2 && YDiffOrder == 0 ) return 2.0 * M_PI * y * y / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * x * x / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); return 2.0 * M_PI * x * x / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * x * x / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 0 && YDiffOrder == 1 ) return 2.0 * M_PI * y / ( this->waveLength * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 0 && YDiffOrder == 2 ) return 2.0 * M_PI * x * x / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * y * y / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); return 2.0 * M_PI * y * y / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * y * y / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); return 0.0; } Loading src/implementation/matrices/tnlMatrixSetter_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -54,8 +54,8 @@ template< int Dimensions, void tnlMatrixSetter< tnlGrid< Dimensions, Real, Device, Index >, DifferentialOperator, BoundaryConditions, RowLengthsVector >:: getRowLengths( const MeshType& mesh, DifferentialOperator& differentialOperator, BoundaryConditions& boundaryConditions, const DifferentialOperator& differentialOperator, const BoundaryConditions& boundaryConditions, RowLengthsVector& rowLengths ) const { TraversalUserData userData( differentialOperator, boundaryConditions, rowLengths ); Loading src/implementation/mesh/tnlTraversal_Grid1D_impl.h +14 −5 Original line number Diff line number Diff line Loading @@ -35,12 +35,21 @@ processEntities( const GridType& grid, */ CoordinatesType coordinates; const IndexType& xSize = grid.getDimensions().x(); for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) /**** * Boundary conditions */ coordinates.x() = 0; boundaryEntitiesProcessor.template processCell( grid, userData, 0, coordinates ); coordinates.x() = xSize - 1; boundaryEntitiesProcessor.template processCell( grid, userData, xSize - 1, coordinates ); /**** * Interior cells */ for( coordinates.x() = 1; coordinates.x() < xSize-1; coordinates.x() ++ ) { const IndexType index = grid.getCellIndex( coordinates ); if( grid.isBoundaryCell( coordinates ) ) boundaryEntitiesProcessor.template processCell( grid, userData, index, coordinates ); else interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); } } 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/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
src/implementation/functions/tnlSinWaveFunction_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -129,11 +129,11 @@ getValue( const Vertex& v, if( XDiffOrder == 1 && YDiffOrder == 0 ) return 2.0 * M_PI * x / ( this->waveLength * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 2 && YDiffOrder == 0 ) return 2.0 * M_PI * y * y / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * x * x / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); return 2.0 * M_PI * x * x / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * x * x / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 0 && YDiffOrder == 1 ) return 2.0 * M_PI * y / ( this->waveLength * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); if( XDiffOrder == 0 && YDiffOrder == 2 ) return 2.0 * M_PI * x * x / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * y * y / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); return 2.0 * M_PI * y * y / ( this->waveLength * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) * sqrt( x * x + y * y ) ) * this->amplitude * cos( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ) - 4.0 * M_PI * M_PI * y * y / ( this->waveLength * this->waveLength * ( x * x + y * y ) ) * this->amplitude * sin( this->phase + 2.0 * M_PI * sqrt( x * x + y * y ) / this->waveLength ); return 0.0; } Loading
src/implementation/matrices/tnlMatrixSetter_impl.h +2 −2 Original line number Diff line number Diff line Loading @@ -54,8 +54,8 @@ template< int Dimensions, void tnlMatrixSetter< tnlGrid< Dimensions, Real, Device, Index >, DifferentialOperator, BoundaryConditions, RowLengthsVector >:: getRowLengths( const MeshType& mesh, DifferentialOperator& differentialOperator, BoundaryConditions& boundaryConditions, const DifferentialOperator& differentialOperator, const BoundaryConditions& boundaryConditions, RowLengthsVector& rowLengths ) const { TraversalUserData userData( differentialOperator, boundaryConditions, rowLengths ); Loading
src/implementation/mesh/tnlTraversal_Grid1D_impl.h +14 −5 Original line number Diff line number Diff line Loading @@ -35,12 +35,21 @@ processEntities( const GridType& grid, */ CoordinatesType coordinates; const IndexType& xSize = grid.getDimensions().x(); for( coordinates.x() = 0; coordinates.x() < xSize; coordinates.x() ++ ) /**** * Boundary conditions */ coordinates.x() = 0; boundaryEntitiesProcessor.template processCell( grid, userData, 0, coordinates ); coordinates.x() = xSize - 1; boundaryEntitiesProcessor.template processCell( grid, userData, xSize - 1, coordinates ); /**** * Interior cells */ for( coordinates.x() = 1; coordinates.x() < xSize-1; coordinates.x() ++ ) { const IndexType index = grid.getCellIndex( coordinates ); if( grid.isBoundaryCell( coordinates ) ) boundaryEntitiesProcessor.template processCell( grid, userData, index, coordinates ); else interiorEntitiesProcessor.template processCell( grid, userData, index, coordinates ); } } Loading