Skip to content

v2.0.0

Latest

Choose a tag to compare

@dmalhotra dmalhotra released this 11 Nov 18:28

Built on SCTL 2.1.0. Documentation: https://biest.readthedocs.io

New

  • Field periods: Surface declares its field periods, and FieldPeriodBIOp, SurfaceOp, VacuumField and TaylorState work on one field period (#9). FieldPeriodBIOp::Eval and the vacuum-field classes also take data on half a field period and complete it by stellarator symmetry, with biest::Parity giving the parity of the data (#10).
  • Off-surface evaluation: OffSurfaceOp splits its panels until their Legendre coefficients are within the tolerance and the area element is resolved, and can fit them to given fields such as the density. For the rotating ellipse of virtual-casing, at 3, 6 and 9 digits requested, the field off the surface gets 3.7, 7.3 and 10.6 digits, against 1.9, 3.3 and 3.6 with panels fit to the surface alone (#9).
  • Near quadrature between surfaces: the potential of one surface at the grid points of another nearby surface, in place of the trapezoidal rule (#9).
  • Singular quadrature chosen at run time from the tolerance and the grid anisotropy, or given by SingularQuadParams (#9).
  • VacuumField and TaylorState can be used as objects that keep their operators from one call to the next (#9). ExtVacuumField::GetTargetCoord and IntVacuumField::GetTargetCoord return the points of the field grid (#10).
  • Unit tests for the operators and solvers, CI, and documentation on Read the Docs (#8).

Performance

  • SurfaceOp uses 1D transforms of rows and columns in place of 2D FFTW plans; the singular correction uses SmallGEMM in place of BLAS; temporaries are in scratch memory. W7-X on 96 threads: inner solves take 4.1-7.0 s, against 8.4-21.5 s (#9).
  • Repeated calls of the operators, VacuumField::Compute and TaylorState::Compute make no heap allocations (#9).

Fixes

  • SurfaceOp::SurfCurl read the wrong entries for every vector field after the first (#8).
  • BoundaryIntegralOp gave every surface the normal orientation of the last one; with surfaces of opposite grid orientation, kernels that use the source normal had errors of 4e-2 (#8).
  • FieldPeriodBIOp::Eval resampled the density with the NFP given to SetupSingular in place of the one given to Eval (#8).
  • IntVacuumField: the field of the current I0 read the wrong grid coordinates when NFP > 1 (#8).
  • VacuumField on a toroidal shell: the vector potential of the second basis field included the first, and the fluxes were measured on one surface only (#8).
  • VacuumField and TaylorState choose the outer and inner surfaces by enclosed volume in place of area (#8).
  • CompleteVecField assumed that the toroidal index increases counterclockwise; data ordered clockwise gave a discontinuous surface (#8).
  • OffSurfaceOp stopped refining at 8 panel nodes per grid point, which lost accuracy on surfaces that need more (#8).
  • WriteVTK with half_period wrote a scalar that changes sign, such as B.n, with the wrong sign on the mirrored half (#10).
  • TaylorState now compiles with Clang and Intel icpx, and the code compiles without warnings with GCC, Clang and icpx (#11).

Interface changes

  • FieldPeriodBIOp<Real, HedgehogOrder> is the one public layer-potential class, without the COORD_DIM, KDIM0 and KDIM1 parameters; BoundaryIntegralOp is internal. SetupSingular takes a tolerance and a SingularQuadParams, or the field periods and grids of a surface, and optional fields to resolve. Eval(U, F, NFP, src_Nt, src_Np, half_period = false, parity = Parity::Even) (#9, #10).
  • SingularQuadParams replaces the template parameters UPSAMPLE, PATCH_DIM0 and RAD_DIM of BoundaryIntegralOp, FieldPeriodBIOp, VacuumField and TaylorState; SingularCorrection::Setup takes skip_t and skip_p in place of TRG_SKIP (#9).
  • The SurfaceOp constructor takes NFP and the toroidal orientation. SurfaceOp::CompleteVecField(X, half_period, NFP, Nt, Np, Y, parity, tor_orient, dtheta = 0) replaces the version with is_surf (#9, #10).
  • WriteVTK takes the parity of F (#10).
  • VacuumField::EvalOffSurface takes tor_flux, pol_flux and a J for each surface in place of J0, and its targets by reference (#9).
  • OffSurfaceOp::Setup and SetupSurface take optional fields for the panels to resolve; SetupSurface and SetTargets set up the panels and the targets separately (#9).
  • biest::Mat is removed; use sctl::Tensor (#9).
  • applications/virtual-casing is removed; it is superseded by hiddenSymmetries/virtual-casing (#8).

Full Changelog: v1.0.0...v2.0.0