MOOSE Newsletter (March 2022)

Conda MPICH Updated to 4.0.1, GCC to 10.3.0

The moose-mpich package has been updated to 4.0.1 and now relies entirely on the MPICH built by the conda-forge maintainers (mpich-mpicc, mpich-mpicxx, and mpich-mpifort). As a result of this change, the default compilers installed on Linux using the MOOSE package are now GCC 10.3.0 / gfortran 10.3.0. Minimum supported compilers (see below) remain the same and Clang 12.0.1 / gfortran 9.3.0 is still the default compiler set on MacOS. The bulk of MOOSE PR testing will still be done using GCC 9, to maintain compatibility over a broad range of compiler releases.

To update your MOOSE packages, please activate your MOOSE conda environment and perform the command:


mamba update --all

The following package versions and builds outlined in the update prompt should be at least the following:


Package                  Version            Build
=====================================================
moose-libmesh            2022.03.18         build_0
moose-libmesh-vtk        9.1.0              build_5
moose-petsc              3.16.5             build_0
moose-mpich              4.0.1              build_0

MOOSE Supports IGA Analysis

In an ongoing collaboration with Coreform, it is now possible to perform spline-based isogeometric analysis (IGA) simulations with MOOSE.

When MOOSE is built with Exodus 8 support (as is now done by default in binary Linux distributions of MOOSE, when users build PETSc with MOOSE scripts, or when users build with environment variables pointing MOOSE to an existing HDF5 installation), Exodus IGA extensions are supported, and isogeometric meshes can be read from Exodus files output by Coreform Cubit. Simulations on these meshes can calculate solutions in either the spline basis or a derived Rational-Bernstein-Bezier basis depending on a clear_spline_nodes input setting.

A breakout model of a simple internally pressurized ring for a reactor pressure vessel serves as an example.

Simulation using MOOSE IGA capabilities of a pressurized ring created with Coreform Cubit.

The analytical solution defines a peak stress of 95.3 Pa. A second-order IGA solution converges within 0.01% of the exact solution compared to 0.2% for a traditional second-order FEA method.

Relative error of simulations using MOOSE IGA capabilities of a pressurized ring created with Coreform Cubit.

MOOSE Improvements

C++17 Support

MOOSE now requires a C++17 capable compiler and supports C++17 features. With this, GCC 7 and Clang 5 are now the minimum supported compilers.

HDF5 support in PETSc and libMesh now requested by default

The update_and_rebuild_petsc script now performs a basic search for a supported HDF5 installation in the local environment by default. Developers can place an HDF5 installation in the following searched locations:

  • /usr/lib/hdf5

  • /usr/local/hdf5

  • /usr/share/hdf5

  • /usr/local/hdf5/share

  • $HOME/.local

Or select a custom location by setting one of the environment variables HDF5_DIR, HDF5DIR, or HDF5_ROOT. If a compatible installation cannot be found, PETSc will download and build it for the user on Linux. This fallback download option is not yet available on MacOS, but will be coming soon. Subsequently, the update_and_rebuild_libmesh script now uses the --enable-hdf5 configure flag and, with recent libMesh changes, attempts to find the HDF5 installation used by PETSc.

The new conda packages mentioned above all contain the PETSc default HDF5 on Linux, but no HDF5 is currently provided on MacOS (coming soon). A serial, pre-built HDF5 is available within the moose-tools package on either platform if this is sufficient for developer needs.

MultiAppUserObjectTransfer Supports Transferring From The Nearest Sub-App

MultiAppUserObjectTransfer gained a new option that allows transferring from the nearest sub-app app from a multiapp. This will help in cases where the sub-app is a lower-dimensional manifold and therefore doesn't overlap with the domain of the parent app.

libMesh-level Changes

2022.03.18 Update

  • Update MetaPhysicL

    • OpFunction support for DualNumber and SemiDynamicSparseNumberArray, which means we can now do basic parallel sum() etc. on AD values

    • Implement ReplaceAlgebraicType to conveniently replace types in containers, and add ValueType for std::array, and std::vector

    • Add tolerance to DynamicSparseNumberBase::sparsity_trim

    • Simplify end/begin/rend/rbegin methods in DynamicStdArrayWrapper

    • When DynamicStdArray wrapper container size is exceeded, an error will now be thrown instead of an assert

  • get_nodeset_info() bugfix in MeshBase::get_info() - sideset names were being requested instead of nodesets

  • Deprecation warnings were fixed up in custom iterators due to C++17 and newer GCC/Clang

  • Poly2Tri was updated to fix various bugs related to refinement, and support was added for non-uniform refinement

  • Added virtual methods for specifying index maps that we can use for defining the RBParameterizedFunction used in EIM approximations

  • Make DynamicStdArrayWrapper member protected

  • Make the coordinate offset transfer be respected by discontinuous output, not just continuous output

  • Allow proper const-ness for our MeshBase iterators

  • TypeNTensor changes - libmesh_not_implemented() was added to all unimplemented functions and a mempcpy warning was fixed up

2022.03.02 Update

  • Work towards source code compatibility with Windows

  • Add an additional outer_product definition that supports scalar * vector -> vector

  • Add auto-detection for PETSc external packages, notably HDF5

  • Add internal thread safety within NumericVector subclasses

  • Add initial support for Poly2Tri triangulations and refactor TriangulatorInterface

  • Optimize InfFE::reinit when not all data has been requested

  • Support the matrix-free case when computing the residual and Jacobian together

  • Add more robust Packing for communication of fixed-size classes win variable-size containers

  • Enable setting PETSc mat/vec types at runtime for future GPU use

  • Require C++17 support and begin using it internally

  • Add new static TensorValue::rotation_matrix helper functions

PETSc-level Changes

PETSc has been updated to the 3.16.5 release. This release should have performance improvements and better infrastructure support, but much of the update is transparent to MOOSE users. The detailed PETSc release notes can be found at the PETSc website.

Changes that may be interesting to MOOSE users include the following:

  • Added PCQR - an interface to SuiteSparse QR factorization, which is a direct solver. This can be triggered in MOOSE using the -pc_type qr option.

  • PETSc has better GPU support via native solver options like GAMG, or other third-party solver options such as HYPRE. The enhanced GPU capability can be triggered in MOOSE via the -mat_type aijcusparse -vec_type cuda command line option. Note that GPU capability is still experimental in MOOSE, and only algebra solver operations are available on GPUs. Residual and Jacobian evaluations are not available on GPUs yet. If you want to have meaningful performance improvement, you have to explore many problem-dependent PETSc options.

Bug Fixes and Minor Enhancements

  • The ElementPropertyReadFile user object was deprecated and replaced by PropertyReadFile. It can now load nodal data, and is no longer restricted to contiguous IDs for elements or nodes.

  • The PiecewiseConstantFromCSV function was added to use the PropertyReadFile user object to compute a function based on data in a CSV file. The data may be sorted by element id, node id, block id or by nearest neighbor regions.