Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes for tokamak-2fluid example #2668

Merged
merged 2 commits into from
Mar 16, 2023
Merged

Conversation

ZedThree
Copy link
Member

Not comprehensive, still fails to run successfully on basic input file (zero pivot in cyclic reduce)

Fixes:

  • unused variables
  • wrong variable names (including case)
  • creating laplacians from wrong input sections
  • some issues with staggering

Currently fails with:

====== Back trace ======
 -> CyclicReduce::solve on line 172 of '/home/peter/Codes/BOUT++/BOUT-dev/include/bout/cyclic_reduction.hxx'
 -> LaplaceCyclic::solve(Field3D, Field3D) on line 305 of '/home/peter/Codes/BOUT++/BOUT-dev/src/invert/laplace/impls/cyclic/cyclic_laplace.cxx'
 -> Solving for phi on line 546 of '/home/peter/Codes/BOUT++/BOUT-dev/examples/tokamak-2fluid/2fluid.cxx'
 -> Running RHS: PvodeSolver::rhs(0) on line 307 of '/home/peter/Codes/BOUT++/BOUT-dev/src/solver/impls/pvode/pvode.cxx'
 -> Initialising PVODE solver on line 93 of '/home/peter/Codes/BOUT++/BOUT-dev/src/solver/impls/pvode/pvode.cxx'

====== Exception thrown ======
Zero pivot in CyclicReduce::reduce

The d3d cases are missing ShiftAngle from the grid file and so don't run for that reason.


Maybe we should have a clean out of the examples, and delete everything that doesn't successfully run?

ZedThree and others added 2 commits February 22, 2023 16:02
Not comprehensive, still fails to run successfully on basic input
file (zero pivot in cyclic reduce)

Fixes:

- unused variables
- wrong variable names (including case)
- creating laplacians from wrong input sections
- some issues with staggering
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

// Equation terms

auto& ni_options = globalOptions["Ni"];
ni_options.setConditionallyUsed();
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be nicer to only set that if the option is not used?

@bendudson
Copy link
Contributor

Merging for now as better than nothing. I think the correct thing to do is to remove examples that don't work or are not useful for e.g. the manual. If people want full physics models then those are in other repositories.

@bendudson bendudson merged commit 557ac38 into master Mar 16, 2023
@bendudson bendudson deleted the tokamak-2fluid-fixes branch March 16, 2023 15:29
@ThomasMellor
Copy link

Hello, I have recently installed bout and have been trying the examples. This is the error I get for the tokamak-2fluid example. Was this fixed since the issue was brought up?

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.

None yet

4 participants