Skip to content

Add option to Div_par_K_Grad_par_mod to use petsc support operator method - #3513

Open
dschwoerer wants to merge 14 commits into
nextfrom
petsc-op-option
Open

dschwoerer wants to merge 14 commits into
nextfrom
petsc-op-option

Conversation

@dschwoerer

Copy link
Copy Markdown
Contributor

This allows for a runtime switch of the underlying method for further testing much easier.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread include/bout/petsc_operators.hxx
Comment thread src/mesh/difops.cxx
Comment thread src/mesh/petsc_operators.cxx

@ZedThree ZedThree left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm wondering if there's actually enough options here now to use the generic Factory somehow? We could just make the operator a class?

Comment thread include/bout/difops.hxx Outdated
Comment thread include/bout/petsc_operators.hxx Outdated
Comment thread src/mesh/difops.cxx Outdated
Comment thread src/mesh/difops.cxx Outdated
Comment thread src/mesh/difops.cxx Outdated
Comment thread tests/MMS/spatial/fci/fci_mms.cxx Outdated
Comment thread src/mesh/difops.cxx Outdated
@dschwoerer

Copy link
Copy Markdown
Contributor Author

I'm wondering if there's actually enough options here now to use the generic Factory somehow? We could just make the operator a class?

Maybe? That seems though a different PR ...

@dschwoerer

Copy link
Copy Markdown
Contributor Author

@bendudson it seems the support operator does not converge:

Running command: ./fci_mms MYG=1 mesh:ddy:first=C2 mesh:paralleltransform:xzinterpolation:type=lagrange4pt mesh:file=mesh.8.fci.nc ... done in 0.472s
grad_par errors: l-2 0.007596 l-inf 0.011683
grad2_par2 errors: l-2 0.104717 l-inf 0.144821
div_par errors: l-2 0.007596 l-inf 0.011683
div_par_K_grad_par errors: l-2 0.073924 l-inf 0.127443
div_par_K_grad_par_mod_Original errors: l-2 0.070800 l-inf 0.122122
div_par_K_grad_par_mod_PetscOperator errors: l-2 0.049332 l-inf 0.156445
laplace_par errors: l-2 0.104717 l-inf 0.144821
FV_div_par_mod errors: l-2 0.021949 l-inf 0.044925
FV_div_par_fvv errors: l-2 0.067395 l-inf 0.161695
Running command: ./fci_mms MYG=1 mesh:ddy:first=C2 mesh:paralleltransform:xzinterpolation:type=lagrange4pt mesh:file=mesh.16.fci.nc ... done in 0.521s
grad_par errors: l-2 0.001570 l-inf 0.002509
grad2_par2 errors: l-2 0.030554 l-inf 0.044746
div_par errors: l-2 0.001570 l-inf 0.002509
div_par_K_grad_par errors: l-2 0.021575 l-inf 0.041754
div_par_K_grad_par_mod_Original errors: l-2 0.021353 l-inf 0.041218
div_par_K_grad_par_mod_PetscOperator errors: l-2 0.044648 l-inf 0.213109
laplace_par errors: l-2 0.030554 l-inf 0.044746
FV_div_par_mod errors: l-2 0.004186 l-inf 0.009372
FV_div_par_fvv errors: l-2 0.023426 l-inf 0.061165
Running command: ./fci_mms MYG=1 mesh:ddy:first=C2 mesh:paralleltransform:xzinterpolation:type=lagrange4pt mesh:file=mesh.32.fci.nc ... done in 0.745s
grad_par errors: l-2 0.000370 l-inf 0.000595
grad2_par2 errors: l-2 0.007939 l-inf 0.011790
div_par errors: l-2 0.000370 l-inf 0.000595
div_par_K_grad_par errors: l-2 0.005606 l-inf 0.011136
div_par_K_grad_par_mod_Original errors: l-2 0.005590 l-inf 0.011091
div_par_K_grad_par_mod_PetscOperator errors: l-2 0.043008 l-inf 0.285402
laplace_par errors: l-2 0.007939 l-inf 0.011790
FV_div_par_mod errors: l-2 0.000969 l-inf 0.002131
FV_div_par_fvv errors: l-2 0.009590 l-inf 0.024281
Running command: ./fci_mms MYG=1 mesh:ddy:first=C2 mesh:paralleltransform:xzinterpolation:type=lagrange4pt mesh:file=mesh.64.fci.nc ... done in 1.61s
grad_par errors: l-2 0.000091 l-inf 0.000147
grad2_par2 errors: l-2 0.002004 l-inf 0.002986
div_par errors: l-2 0.000091 l-inf 0.000147
div_par_K_grad_par errors: l-2 0.001415 l-inf 0.002827
div_par_K_grad_par_mod_Original errors: l-2 0.001414 l-inf 0.002822
div_par_K_grad_par_mod_PetscOperator errors: l-2 0.052484 l-inf 0.521644
laplace_par errors: l-2 0.002004 l-inf 0.002986
FV_div_par_mod errors: l-2 0.000238 l-inf 0.000518
FV_div_par_fvv errors: l-2 0.004446 l-inf 0.010604

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants