Skip to content

Commit

Permalink
Improvements thanks to review
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenarnst committed Jan 20, 2025
1 parent a6d2b34 commit c062c29
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion conclusion.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% !TEX root = main.tex

The evolution of the Trilinos project demonstrates its critical role in scientific and high-performance computing.
This update underscores Trilinos’s dedication to maintaining relevance amidst the rapid development of both HPC software frameworks and hardware architectures
This update underscores Trilinos’ dedication to maintaining relevance amidst the rapid development of both HPC software frameworks and hardware architectures
to comprehend the increasing complexity of multiscale, multiphysics simulation codes for tackling engineering and scientific problems.
By adopting the Kokkos ecosystem, expanding package functionalities, and embracing a modular structure,
Trilinos ensures both performance portability and adaptability to diverse application domains.
Expand Down
9 changes: 5 additions & 4 deletions discretization.tex
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
% !TEX root = main.tex

This section describes Trilinos packages that provide tools for spatial and temporal discretization of integro-differential equations. Most of discretization efforts in Trilinos have been devoted to implementing tools for mesh-based discretizations of partial differential equations (PDEs) with a focus on high-order finite elements. A notable exception is the research package Compadre, which provides tools for meshless approximation of linear operators that can be used for the discretization of differential equations and for data transfer.
This section describes Trilinos packages that provide tools for spatial and temporal discretization of integro-differential equations. Most discretization efforts in Trilinos have been devoted to implementing tools for mesh-based discretizations of partial differential equations (PDEs) with a focus on high-order finite elements. A notable exception is the research package Compadre, which provides tools for meshless approximation of linear operators that can be used for the discretization of differential equations and for data transfer.
Trilinos discretization packages have been adopted by many applications addressing a wide range of physics problems, including solid mechanics, earth system modeling, semiconductor devices modeling and electro-magnetics. These applications have taken different approaches in adopting Trilinos mesh-based discretization tools. The less intrusive approach is the adoption of Intrepid2 tools to perform local finite element assembly. The application has to manage the global assembly possibly using the \code{DoFManager} provided by Panzer and FE Crs matrix and vector structures provided by Tpetra.
A more intrusive approach is to additionally use the Phalanx package for managing dependencies of field evaluations in conjunction with the Thyra Model Evaluator and Sacado automatic differentiation, and possibly Tempus for time integration. This approach is particularly useful when developing solvers for complex multiphysics problems because it allows easy re-use of computational kernels and automates the computation of Jacobians and sensitivities.
The most intrusive approach is to build the application around the Panzer package, which provides all of the above, plus the handling of linear and nonlinear solvers and integrated constrained optimization capabilities.
In the following we describe some of the Trilinos discretization packages. For brevity, we do not include the description of the following packages: Sierra ToolKit (STK), Krino and Percept, which provide mesh and level-set tools, and Shards, which provides tools for mesh cell topology. We refer to the Trilinos website (\url{https://trilinos.github.io}) for a brief description of these packages.

In the following, we do not include the description of the Sierra ToolKit (STK), Krino and Percept packages which provide mesh and level-set tools, nor the description of the Shards package which provides tools for mesh cell topology.
The STK and Krino packages are snapshotted into Trilinos.
We refer to the Trilinos website (\url{https://trilinos.github.io}) for a brief description of these packages.

\subsection{Local Assembly: Intrepid2}
Intrepid2 provides interoperable tools for compatible discretizations of PDEs; it is a performance-portable re-implementation and extension of the legacy Intrepid package \cite{bochev2012}. Intrepid2 mainly focuses on local assembly of continuous and discontinuous finite elements. It also provides limited capabilities for finite volume discretization. Intrepid2 works on batches of elements (cells), and provides tools to efficiently compute discretized linear functionals (e.g., right-hand-side vectors) and differential operators (e.g., stiffness matrices) at the element level. Intrepid2 implements compatible finite element spaces of various polynomial orders for $H({\rm grad})$, $H({\rm curl})$, $H({\rm div})$ and $L^2$ function spaces on triangles, quadrilaterals, tetrahedrons, hexahedrons, wedges and pyramids. It provides both Lagrangian basis functions and hierarchical basis functions \cite{fuentes2015} and it implements performance optimizations (e.g., sum factorizations) exploiting the underlying structure of the problem (e.g., tensor-product elements or other symmetries). The degrees of freedom of $H({\rm div})$ and $H({\rm curl})$ finite elements as well as high-order $H({\rm grad})$ finite elements depend on the global orientation of edges and faces and Intrepid2 provides orientation tools for matching the degrees of freedom on shared edges and faces. It also provides interpolation-based projection tools for projecting functions in $H({\rm grad})$, $H({\rm curl})$, $H({\rm div})$ and $L^2$ to the respective discrete spaces. Intrepid2 implements these capabilities through the following classes:
Expand Down Expand Up @@ -105,7 +106,7 @@ \subsection{Finite Element Analysis: Panzer}
\item \code{STK\_Interface}: Panzer contains a concrete implementation of the connection manager API for the STK mesh database package in Trilinos. The \code{STK\_Interface} object wraps a STK mesh database. It provides a simple interface for accessing global indices on the mesh and can be used to read/write associated solution data to the database. It additionally supports SEACAS for writing mesh data to disk. This \code{STK\_Interface} also includes support for periodic boundary conditions. This capability can match topological entities on periodic parallel distributed faces. Once matched, the DOFs are unified to enforce periodicity for the DOF manager. This capability is in the adapters-stk subpackage.
\item \emph{Linear Object Factory:} Panzer provides a linear object factory and linear object container designed to support parallel distributed assembly.
%It supports both Epetra and Tpetra objects.
The returned containers hold the linear algebra objects for either a uniquely owned DOF map used for solving the linear system or a ghosted version of the linear objects that can be used for assembly. \todo{The preceding sentence is not completely clear.} The containers support export and import operations between the unique and ghosted containers. These are used to simplify the assembly process and abstract the underlying Tpetra linear algebra objects. %(i.e., Epetra or Tpetra).
The returned containers hold either the linear algebra objects for a uniquely owned DOF map used for solving the linear system or a ghosted version of the linear objects that can be used for assembly. The containers support export and import operations between the unique and ghosted containers. These are used to simplify the assembly process and abstract the underlying Tpetra linear algebra objects. %(i.e., Epetra or Tpetra).
The linear object factory can also create DOF gather and scatter functors for the corresponding (and possibly blocked) matrices. The gather and scatter operations are specialized on the assembly types, including residuals, Jacobians, and Tangents.
Support for Hessians will be implemented as needed.
The capability is found in the disc-fe subpackage.
Expand Down
3 changes: 2 additions & 1 deletion introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
Trilinos was originally conceived as a framework of three packages for distributed memory systems. The original Trilinos publication~\cite{Heroux2005a} described the motivation, philosophy, and capabilities of Trilinos at that time. A few years later, the second Trilinos overview publication~\cite{Heroux2012} introduced the expanded set of capabilities then included in Trilinos as well as the strategic goals for Trilinos. Trilinos today is similar to the Trilinos that was envisioned two decades ago in some aspects. However, it is also very different in several other aspects. These changes were necessitated by the changes in programming models, application needs, hardware architectures, and algorithms. Trilinos has grown from a library of three packages to a library with more than fifty packages with functionality and features supporting a wide range of applications.
Older packages rely heavily on the linear algebra classes provided by Epetra.
Epetra does not support larger problems (2B+ unknowns), nor does it allow for accelerator offload.
Since the packages of the old Epetra stack are scheduled to be archived and removed from the main Trilinos repository on Github by the end of 2025 we limit ourselves to describing only the modern Trilinos software stack.
Since the packages of the old Epetra stack are scheduled to be archived and removed from the main Trilinos repository on Github by the end of 2025 we limit ourselves to describing only the modern Trilinos software stack, which builds upon the Tpetra stack and the Kokkos Ecosystem to achieve performance portability across hardware architectures.

% Purpose
This article is an attempt to capture a snapshot of where Trilinos is today as opposed to twenty and thirteen years ago when the original Trilinos articles were written.
Therefore it will focus on the major developments within Trilinos in the last decade as well as new features and functionality that have been added to advance scientific and engineering applications.
Expand Down
15 changes: 8 additions & 7 deletions linear_solvers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%
%\todo{@Siva/Alexander: do this!}

Trilinos offers many linear solver capabilities: dense and sparse direct solvers, iterative solvers, shared-memory preconditioners local to a compute node, and scalable distributed memory domain decomposition and multigrid methods. Furthermore, interfaces to several third-party direct solvers are provided. The capabilities described in this section are focused on using the modern (Tpetra) Trilinos software stack. All of the native solver capabilities are built on top of Kokkos and are GPU capable to varying degrees; any exceptions are noted in the detailed descriptions below.
Trilinos offers many linear solver capabilities: dense and sparse direct solvers, iterative solvers, shared-memory preconditioners local to a compute node, and scalable distributed memory domain decomposition and multigrid methods. Furthermore, interfaces to several third-party direct solvers are provided. All of the native solver capabilities are built on top of Kokkos and are GPU capable to varying degrees; any exceptions are noted in the detailed descriptions below.



Expand Down Expand Up @@ -162,17 +162,18 @@ \subsection{Physics Block Operators and Preconditioners: Teko}
The Teko library~\cite{Cyr2016a} provides interfaces for operators and preconditioners that are constructed from large physics-based sub-blocks.
The sub-blocks are Thyra operators which are themselves often implemented using Tpetra matrices.
Generic block preconditioning strategies, such as the Jacobi and Gauss-Seidel strategies, as well as commonly used approximate inverse strategies for the Navier-Stokes equation such as SIMPLEC, LSC and PCD, are provided \cite{CyrShadidEtAl2012_StabilizationScalableBlockPreconditioning}.
More complicated multilevel hierarchies of block solvers can be generated via Teuchos ParameterLists.
Block preconditioners for first-order formulations of Maxwell's equations and Darcy flow are distributed with the Panzer package. \todo{It is not completely clear what is meant with ``distributed'' in the previous sentence.}
Teko's solvers can be registered in the Stratimikos interface for entirely ParameterList-driven usage.
More complicated multilevel hierarchies of block solvers can be generated via \code{Teuchos::ParameterList} objects.
Block preconditioners for first-order formulations of Maxwell's equations and Darcy flow are implemented in the Panzer package.
Teko's solvers can be registered in the Stratimikos interface for usage entirely driven by \code{Teuchos::ParameterList} objects.


\subsection{Eigensolvers: Anasazi}
Anasazi~\cite{Baker2009a} is an extensible and interoperable framework for large-scale eigenvalue algorithms.
This framework provides a generic interface to a collection of algorithms that are built upon abstract interfaces
that facilitate code reuse and extensibility. Similar to Belos, Anasazi decouples the algorithms from the
implementation of the underlying linear algebra objects using traits mechanisms. Concrete linear algebra adapters
are provided for Tpetra and Thyra. Any libraries that understand Tpetra and Thyra matrices
are provided for Tpetra and Thyra, while users can also implement their own interfaces to leverage any existing
investment in their description of matrices and vectors. Any libraries that understand Tpetra and Thyra matrices
and vectors, like Belos and Ifpack2, may also be used in conjunction with Anasazi. The suite of eigensolvers provided
by Anasazi includes locally optimal block preconditioned conjugate gradient (LOBPCG), block Davidson, Riemannian Trust-Region
(RTR), and block Krylov-Schur. Recently, there has been a family of trace minimization (TraceMin) methods and a
Expand All @@ -181,9 +182,9 @@ \subsection{Eigensolvers: Anasazi}

\subsection{Unified Solver Interface: Stratimikos}

The Stratimikos package provides a unified interface to linear solvers and preconditioners in Trilinos (e.g., from Amesos2, Belos, FROSch, Ifpack2, MueLu, and Teko).
The Stratimikos package provides a unified interface to linear solvers and preconditioners in Trilinos (e.g., to Amesos2, Belos, FROSch, Ifpack2, MueLu, and Teko).
The matrix as well as the right-hand side and the solution vectors are required to support the Thyra interface.
Wrappers for Tpetra linear algebra are provided by Thyra.
Solver and preconditioner parameters are specified via a \code{ParameterList},
Solver and preconditioner parameters are specified via a \code{Teuchos::ParameterList},
which users can easily populate from an xml file.
Additional solver and preconditioner factories can easily be added via adapters (see \texttt{packages/stratimikos/adapters} for examples).
6 changes: 3 additions & 3 deletions nonlinear_solvers.tex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% !TEX root = main.tex

The packages included in this section provide the top-level algorithms for computational simulations and design studies.
These include nonlinear solvers, as well as bifurcation tracking, stability analysis, parameter continuation, optimization, and uncertainty quantification methods.
These include nonlinear solvers, bifurcation tracking, stability analysis, parameter continuation, optimization, and uncertainty quantification.
A common theme of this collection is the philosophy of ``analysis beyond simulation'', which aims to automate many computational tasks that are often performed by application code users by trial-and-error or repeated simulation. Tasks that can be automated include performing parameter studies, sensitivity analysis, calibration, optimization, and the task of locating instabilities.
Additionally, utilities for nonlinear analysis include abstraction layers and interfaces for application callbacks, as well as automatic differentiation tools that can provide the derivatives critical to analysis algorithms.

Expand All @@ -17,7 +17,7 @@ \subsection{Nonlinear Solvers: NOX, LOCA} \label{sec:nox}
The library additionally contains abstractions for solvers, directions and line searches that allow users to further customize the algorithms.
NOX provides various stopping criteria including absolute, relative, and weighted root mean square norms, as well as stagnation and NaN detection.
Applications can build custom stopping criteria within a tree-based logical structure and provide additional criteria through the StatusTest abstraction.
Nox also provides capabilities for continuation and stability analysis through the subpackage LOCA.
NOX also provides capabilities for continuation and stability analysis through the subpackage LOCA.

%Short for the
LOCA (Library of Continuation Algorithms)~\cite{Salinger2005}
Expand Down Expand Up @@ -140,7 +140,7 @@ \subsection{Uncertainty Quantification: Stokhos}
the intrusive stochastic Galerkin uncertainty quantification method~\cite{ghanem1990polynomial,ghanem2003stochastic} and the embedded ensemble propagation method~\cite{phipps2017embedded}.

Stokhos's implementation of the intrusive stochastic Galerkin uncertainty quantification method allows stochastic projections to be computed, such as Polynomial Chaos and Generalized Polynomial Chaos expansions.
The implementation includes interfaces for forming the linear and/or nonlinear systems that follow from the stochastic Galerkin projection, as well as linear solver methods that can exploit block structure of these systems.
The implementation includes interfaces for forming the linear and/or nonlinear systems that follow from the stochastic Galerkin projection, as well as linear solver methods that can exploit the block structure of these systems.
GPU performance is targeted by using Kokkos and by commuting the layout of the Galerkin operator to be outer-spatial and inner-stochastic~\cite{phipps2014exploring}.
The implementation has been used in~\cite{constantine2014efficient} to efficiently propagate uncertainty in multiphysics systems by reducing the full system with a nonlinear elimination method.

Expand Down

0 comments on commit c062c29

Please sign in to comment.