BOUT++ v4.2.0 released!
BOUT++ v4.2.0 is a big feature release:
- Large number of optimisations (as much as 140% faster than v4.1.2!)
- OpenMP in many more places, enables parallelisation in Z (as well as X for FCI)
- Better support for OpenMP, including in Python tools
- Much more versatile region system, allowing arbitrary regions (can e.g. mask certain parts of the domain for most common operations)
- Specialised macro for looping over Fields, handles arbitrary regions, OpenMP parallelisation, while also supporting native vectorisation
- Add support for new region system to many functions
- Better support for staggered grids: many bugfixes and many more functions support setting the location
Coordinatesobjects can be created at different locations, through theMesh::getCoordinatesandField::getCoordinatesmethods- Support for compiling as a shared library
- Experimental Python API via Cython module
- Arithmetic operators on fields are now generated using Jinja2
- Improved PETSc compatibility (better support out of the box, supports up to 3.9, drops support for versions before 3.4)
- New support classes for 2D/3D arrays (Matrix/Tensor)
- New interface for Options
- Divergence operators for FCI
- Support for attributes in NetCDF files
- Default Laplacian changed to cyclic
- Many C++ modernisation fixes
- New monotonic Hermite spline interpolator
- Better configure experience
- Zoidberg can produce curvilinear grids in all three directions (enables e.g. stellarator geometry. Current version of BOUT++ can’t actually handle this yet – upcoming version!)
- Many more tests, and a better testing framework for the integrated tests
- Some potential memory leaks and null pointer dereferences fixed
Deprecations
DataIteratoris deprecated in favour of the newRegionandInd2D/3D/Perpfamily. This should not affect user code – if it does, replacingDataIteratorwithautoshould do the right thing in most casesDataFile::writeVar: useDataFile::addOnceField::setNameandField::getName: just useField::namedirectly insteadField::errorandbout_error: useBoutExceptioninsteadrvector/rmatrix/rtensorfamilies of functions: useMatrix/Tensorinsteadoperator^(Vector2D/Vector3D): usecross()instead- The derivative function overloads with this order of arguments:
DD?(..., DIFF_METHOD, CELL_LOC, REGION). Instead, useDD?(..., CELL_LOC, DIFF_METHOD, REGION) - Vector derivative function overloads with three separate
outloc_[xyz]arguments: use the versions with a singleoutlocargument instead CyclicReduce::setCoefsandsolveoverloads that takeT[]orT**: use the version that takesArray<T>instead- The
FCIclass constructors that take abool yperiodicargument: this is no longer supported Mesh::coordinatesis deprecated in favour of the more consistently-namedMesh::getCoordinates. There is also nowField::getCoordinateswhich may be more convenient
Removed functions
PhysicsModel::addToRestartandSolver::addToRestart: userestart.adddirectly insteadSolver::addMonitor(MonitorFunc): use theMonitor*overloads instead- The
get/setarray/datamethods in theFieldclasses: these methods are no longer supported
See CHANGELOG.md for more details. You can download the source tarball from https://github.com/boutproject/BOUT-dev/releases/tag/v4.2.0