Skip to content

Fci higher order tidy grid variables#3

Open
totork wants to merge 256 commits intonext-fcifrom
fci-higher-order-tidy-grid-variables
Open

Fci higher order tidy grid variables#3
totork wants to merge 256 commits intonext-fcifrom
fci-higher-order-tidy-grid-variables

Conversation

@totork
Copy link
Copy Markdown
Owner

@totork totork commented Feb 27, 2026

No description provided.

dschwoerer and others added 30 commits March 19, 2024 15:52
Use the new track feature (better name required) to dump the different
components of the ddt() as well as the residuum for the evolved fields.
This keeps track of all the changes done to the field and stores them to
a OptionsObject.
This keeps track of all the changes done to the field and stores them to
a OptionsObject.
gcc 9.4 is unable to correctly parse the construction for the function
argument, if name.change is used directly. First making a copy seems to work
around that issue.
dschwoerer and others added 30 commits March 14, 2025 10:28
When using FCI yup/down fields, each poloidal plane
uses a different coordinate system. Quantities like J
therefore can't be averaged between planes.

Magnetic field strength is a scalar that can be interpolated,
and is used here to calculate the divergence of a parallel flow.
Use Bxy rather than J on neighboring slices: B can be compared
between slices, but J cannot (different coordinate system).
Each poloidal slice has a different coordinate system, so metrics
can't be directly compared or averaged. Only Bxy and the parallel
connection length (dy, g_22) make sense to calculate.
Don't calculate parallel slices in a derivative: The result is
unlikely to be correct.
If the argument to `sqrt` has parallel slices, then the
slices will be operated on and the result will have parallel slices.

To avoid unnecessary work, discard slices before calling.
Returns a shallow copy without parallel slices.
Enables user to avoid performing calculations on slices if not needed.
Always perform calculations in the yup/down slices if present
in BOTH arguments.
i.e. automagic always on for arithmetic operators.

To avoid unnecessary work, use `withoutParallelSlices` to pass
arguments without parallel slices.
Added comment to explain why it's ok to use the yup/down
slices of the metric components if they are read from the grid file.
Iterated for `i < localmesh->ystart - abs_offset()` so when ystart is 1
and the boundary offset is 1, no boundary is applied.
Reverting some changes back to David's version.
Prefer to have consistent behavior so that code works and can be
optimized without breaking.

The field.withoutParallelSlices() method can be used to strip slices
before calling an operation, if slices are not needed.
If the field has parallel slices, assign the value also to the slices.
…-tidy-noop

applyParallelBoundary can be a no-op for non-fci
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.

4 participants