Skip to content

Overhaul of ConvergenceTest namespace - #152

Open
sebglane wants to merge 12 commits into
masterfrom
fix_convergence_results
Open

Overhaul of ConvergenceTest namespace#152
sebglane wants to merge 12 commits into
masterfrom
fix_convergence_results

Conversation

@sebglane

Copy link
Copy Markdown
Collaborator

No description provided.

@sebglane
sebglane marked this pull request as draft August 20, 2021 16:10
@sebglane

Copy link
Copy Markdown
Collaborator Author

Tests are missing...

@sebglane

Copy link
Copy Markdown
Collaborator Author

Relevant output of fix_convergence_results for TGV.cc

Velocity convergence table
================================================================================
level  dofs  cells refinements cell diameter time step         L2               Linfty               H1         
1     132098 16384 8           1.10e-02      1.00e-01  2.569818e-02 -     3.885917e-02 -     3.094638e-01 -     
2     132098 16384 8           1.10e-02      5.00e-02  7.593713e-03 -3.52 1.083262e-02 -3.69 8.404851e-02 -3.76 
3     132098 16384 8           1.10e-02      2.50e-02  2.049094e-03 -3.78 2.862242e-03 -3.84 2.201931e-02 -3.86 
4     132098 16384 8           1.10e-02      1.25e-02  5.317996e-04 -3.89 7.367094e-04 -3.92 5.656499e-03 -3.92 
5     132098 16384 8           1.10e-02      6.25e-03  1.354414e-04 -3.95 1.870005e-04 -3.96 1.458189e-03 -3.91 


Pressure convergence table
================================================================================
level dofs  cells refinements cell diameter time step         L2               Linfty               H1         
1     16641 16384 8           1.10e-02      1.00e-01  8.840995e-03 -     2.528316e-02 -     1.228554e-01 -     
2     16641 16384 8           1.10e-02      5.00e-02  2.520948e-03 -3.62 6.771660e-03 -3.80 3.849286e-02 -3.35 
3     16641 16384 8           1.10e-02      2.50e-02  6.758555e-04 -3.80 1.832223e-03 -3.77 2.059895e-02 -1.80 
4     16641 16384 8           1.10e-02      1.25e-02  1.751759e-04 -3.90 5.321705e-04 -3.57 1.856231e-02 -0.30 
5     16641 16384 8           1.10e-02      6.25e-03  4.461541e-05 -3.95 1.968393e-04 -2.87 1.838439e-02 -0.03

and that of master

                               Velocity convergence table
==============================================================================================
level    dt    cells  dofs    hmax           L2                 H1               Linfty       
    7 1.00e-01 16384 132098 1.10e-02 2.569818e-02     - 3.094638e-01     - 3.885917e-02     - 
    7 5.00e-02 16384 132098 1.10e-02 7.593713e-03 -1.76 8.404851e-02 -1.88 1.083262e-02 -1.84 
    7 2.50e-02 16384 132098 1.10e-02 2.049094e-03 -1.89 2.201931e-02 -1.93 2.862242e-03 -1.92 
    7 1.25e-02 16384 132098 1.10e-02 5.317996e-04 -1.95 5.656499e-03 -1.96 7.367094e-04 -1.96 
    7 6.25e-03 16384 132098 1.10e-02 1.354414e-04 -1.97 1.458189e-03 -1.96 1.870005e-04 -1.98 

                               Pressure convergence table
==============================================================================================
level    dt    cells dofs    hmax           L2                 H1               Linfty       
    7 1.00e-01 16384 16641 1.10e-02 8.840995e-03     - 1.228554e-01     - 2.528316e-02     - 
    7 5.00e-02 16384 16641 1.10e-02 2.520948e-03 -1.81 3.849286e-02 -1.67 6.771660e-03 -1.90 
    7 2.50e-02 16384 16641 1.10e-02 6.758555e-04 -1.90 2.059895e-02 -0.90 1.832223e-03 -1.89 
    7 1.25e-02 16384 16641 1.10e-02 1.751759e-04 -1.95 1.856231e-02 -0.15 5.321705e-04 -1.78 
    7 6.25e-03 16384 16641 1.10e-02 4.461541e-05 -1.97 1.838439e-02 -0.01 1.968393e-04 -1.43 

The values of the error are the same, rates are different.

@j507

j507 commented Aug 25, 2021

Copy link
Copy Markdown
Collaborator

In fix_convergence_results the rates are computed with evaluate_all_convergence_rates. I had been using evaluate_convergence_rates where I can manually set dim = 1. Maybe this is the culprit.

@sebglane

Copy link
Copy Markdown
Collaborator Author

Relevant output of fix_convergence_results for Guermond.cc

Velocity convergence table
================================================================================
level  dofs  cells refinements cell diameter time step         L2               Linfty               H1         
1     132098 16384 8           1.10e-02      1.00e-01  8.553226e-03 -     2.984499e-02 -     1.802801e-01 -     
2     132098 16384 8           1.10e-02      5.00e-02  2.106748e-03 -4.04 3.850347e-03 -5.91 2.427610e-02 -5.79 
3     132098 16384 8           1.10e-02      2.50e-02  5.270936e-04 -4.00 6.671879e-04 -5.06 5.897830e-03 -4.08 
4     132098 16384 8           1.10e-02      1.25e-02  1.322852e-04 -3.99 1.668826e-04 -4.00 1.636175e-03 -3.70 
5     132098 16384 8           1.10e-02      6.25e-03  3.319652e-05 -3.99 4.178635e-05 -4.00 4.617877e-04 -3.65 


Pressure convergence table
================================================================================
level dofs  cells refinements cell diameter time step         L2               Linfty               H1         
1     16641 16384 8           1.10e-02      1.00e-01  8.728770e-03 -     4.231686e-02 -     1.034468e-01 -     
2     16641 16384 8           1.10e-02      5.00e-02  1.888946e-03 -4.42 1.387980e-02 -3.22 1.816496e-02 -5.02 
3     16641 16384 8           1.10e-02      2.50e-02  4.692749e-04 -4.02 4.332481e-03 -3.36 5.317010e-03 -3.54 
4     16641 16384 8           1.10e-02      1.25e-02  1.190634e-04 -3.96 1.337364e-03 -3.39 3.035792e-03 -1.62 
5     16641 16384 8           1.10e-02      6.25e-03  3.683274e-05 -3.39 4.172894e-04 -3.36 2.755555e-03 -0.28

and that of master

                               Velocity convergence table
==============================================================================================
level    dt    cells  dofs    hmax           L2                 H1               Linfty       
    7 1.00e-01 16384 132098 1.10e-02 8.553226e-03     - 1.802801e-01     - 2.984499e-02     - 
    7 5.00e-02 16384 132098 1.10e-02 2.106748e-03 -2.02 2.427610e-02 -2.89 3.850347e-03 -2.95 
    7 2.50e-02 16384 132098 1.10e-02 5.270936e-04 -2.00 5.897830e-03 -2.04 6.671879e-04 -2.53 
    7 1.25e-02 16384 132098 1.10e-02 1.322852e-04 -1.99 1.636175e-03 -1.85 1.668826e-04 -2.00 
    7 6.25e-03 16384 132098 1.10e-02 3.319652e-05 -1.99 4.617877e-04 -1.83 4.178635e-05 -2.00 

                               Pressure convergence table
==============================================================================================
level    dt    cells dofs    hmax           L2                 H1               Linfty       
    7 1.00e-01 16384 16641 1.10e-02 8.728745e-03     - 1.034468e-01     - 4.230299e-02     - 
    7 5.00e-02 16384 16641 1.10e-02 1.888833e-03 -2.21 1.816494e-02 -2.51 1.386592e-02 -1.61 
    7 2.50e-02 16384 16641 1.10e-02 4.688182e-04 -2.01 5.316969e-03 -1.77 4.318606e-03 -1.68 
    7 1.25e-02 16384 16641 1.10e-02 1.172501e-04 -2.00 3.035722e-03 -0.81 1.323489e-03 -1.71 
    7 6.25e-03 16384 16641 1.10e-02 3.046558e-05 -1.94 2.755478e-03 -0.14 4.034146e-04 -1.71

@sebglane

Copy link
Copy Markdown
Collaborator Author

In fix_convergence_results the rates are computed with evaluate_all_convergence_rates. I had been using evaluate_convergence_rates where I can manually set dim = 1. Maybe this is the culprit.

Fixed in ecb7d4f

@sebglane

Copy link
Copy Markdown
Collaborator Author

New convergence tables for ecb7d4f

TGV.cc

Velocity convergence table
================================================================================
level  dofs  cells refinements    h     time step         L2               Linfty               H1         
1     132098 16384 8           1.10e-02 1.00e-01  2.569818e-02 -     3.885917e-02 -     3.094638e-01 -     
2     132098 16384 8           1.10e-02 5.00e-02  7.593713e-03 -1.76 1.083262e-02 -1.84 8.404851e-02 -1.88 
3     132098 16384 8           1.10e-02 2.50e-02  2.049094e-03 -1.89 2.862242e-03 -1.92 2.201931e-02 -1.93 
4     132098 16384 8           1.10e-02 1.25e-02  5.317996e-04 -1.95 7.367094e-04 -1.96 5.656499e-03 -1.96 
5     132098 16384 8           1.10e-02 6.25e-03  1.354414e-04 -1.97 1.870005e-04 -1.98 1.458189e-03 -1.96 


Pressure convergence table
================================================================================
level dofs  cells refinements    h     time step         L2               Linfty               H1         
1     16641 16384 8           1.10e-02 1.00e-01  8.840995e-03 -     2.528316e-02 -     1.228554e-01 -     
2     16641 16384 8           1.10e-02 5.00e-02  2.520948e-03 -1.81 6.771660e-03 -1.90 3.849286e-02 -1.67 
3     16641 16384 8           1.10e-02 2.50e-02  6.758555e-04 -1.90 1.832223e-03 -1.89 2.059895e-02 -0.90 
4     16641 16384 8           1.10e-02 1.25e-02  1.751759e-04 -1.95 5.321705e-04 -1.78 1.856231e-02 -0.15 
5     16641 16384 8           1.10e-02 6.25e-03  4.461541e-05 -1.97 1.968393e-04 -1.43 1.838439e-02 -0.01 

Guermond.cc

Velocity convergence table
================================================================================
level  dofs  cells refinements    h     time step         L2               Linfty               H1         
1     132098 16384 8           1.10e-02 1.00e-01  8.553226e-03 -     2.984499e-02 -     1.802801e-01 -     
2     132098 16384 8           1.10e-02 5.00e-02  2.106748e-03 -2.02 3.850347e-03 -2.95 2.427610e-02 -2.89 
3     132098 16384 8           1.10e-02 2.50e-02  5.270936e-04 -2.00 6.671879e-04 -2.53 5.897830e-03 -2.04 
4     132098 16384 8           1.10e-02 1.25e-02  1.322852e-04 -1.99 1.668826e-04 -2.00 1.636175e-03 -1.85 
5     132098 16384 8           1.10e-02 6.25e-03  3.319652e-05 -1.99 4.178635e-05 -2.00 4.617877e-04 -1.83 


Pressure convergence table
================================================================================
level dofs  cells refinements    h     time step         L2               Linfty               H1         
1     16641 16384 8           1.10e-02 1.00e-01  8.728770e-03 -     4.231686e-02 -     1.034468e-01 -     
2     16641 16384 8           1.10e-02 5.00e-02  1.888946e-03 -2.21 1.387980e-02 -1.61 1.816496e-02 -2.51 
3     16641 16384 8           1.10e-02 2.50e-02  4.692749e-04 -2.01 4.332481e-03 -1.68 5.317010e-03 -1.77 
4     16641 16384 8           1.10e-02 1.25e-02  1.190634e-04 -1.98 1.337364e-03 -1.70 3.035792e-03 -0.81 
5     16641 16384 8           1.10e-02 6.25e-03  3.683274e-05 -1.69 4.172894e-04 -1.68 2.755555e-03 -0.14 

@sebglane
sebglane marked this pull request as ready for review August 26, 2021 07:09
@sebglane

Copy link
Copy Markdown
Collaborator Author

@j507 I think that the implementation works. However, there is still the issue discussed in #118. We should check whether this PR is a problem or whether the current master branch also has the same issues. The changes made to ThermalTGV.cc should not make a difference.

Comment on lines 4 to 6
* @brief The source file solving the Couette flow problem.
*
*/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not really use this program anymore. We can just delete it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to keep this program as a convergence test.

Comment on lines +590 to +594
if (!std::filesystem::exists(this->prm.graphical_output_directory))
{
try
{
std::filesystem::create_directories(this->prm.graphical_output_directory);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I am not mistaken this is already done in ProblemClass

| Start time | 0 |
| Final time | 2 |
| Verbose | false |
+------------------------------------------+----------------------++------------------------------------------+----------------------+

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double printed?

@sebglane sebglane linked an issue Dec 20, 2021 that may be closed by this pull request
@sebglane

sebglane commented Dec 20, 2021

Copy link
Copy Markdown
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants