From: Reza Rastak Date: Thu, 28 May 2020 13:46:12 +0000 (-0400) Subject: The constexpr paragraph moved to the correct place. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1380f4f03a006c6a71f750e9f0f650a7e200beb;p=release-papers.git The constexpr paragraph moved to the correct place. --- diff --git a/9.2/paper.tex b/9.2/paper.tex index f6aa4c7..b294407 100644 --- a/9.2/paper.tex +++ b/9.2/paper.tex @@ -248,21 +248,6 @@ that we briefly outline in the remainder of this section: solution. This, too, has been addressed in this release. \item \todo[inline]{Reza: Please add a short summary of the \texttt{DiscreteTime} class} -\item Certain types of quantities in a simulation are constants fully known - at compile time. They can be pre-calculated and fully stored inside the - compiled program binary in order to avoid unnecessary initialization during - runtime. This optimization is now enabled for the class templates - \texttt{Tensor} and \texttt{SymmetricTensor} by qualifying their constructor, - member functions, and overloaded operators as \texttt{constexpr}. - For instance, the linear mechanical constitutive model for elastic solids - uses a constant fourth-order elasticity tensor - $\mathbb{C} = \lambda \boldsymbol{I} \otimes \boldsymbol{I} + 2 \mu \mathbb{I}$ - which does not depend on the current state of strain. - This tensor can be statically initialized by defining it as - \texttt{constexpr SymmetricTensor<4, dim>}. - As another example, the lattice vectors in a crystal plasticity model are generally - constant and known during compilation time, enabling their efficient definition as - \texttt{constexpr Tensor<1, dim>}. \item z \todo[inline]{What else? Maybe mention the updated step-12?} \end{itemize} % @@ -703,9 +688,26 @@ vectorization within an element~\cite{KronbichlerKormann2019} in the future. \subsection{Expanded use of C++11 facilities} \label{subsec:cxx} -\todo[inline]{Reza: Short paragraph about constexpr} - -\todo[inline]{Mention as last sentence that next release will use C++14.} +Certain types of quantities in a simulation are constants fully known +at compile time. They can be pre-calculated and fully stored inside the +compiled program binary in order to avoid unnecessary initialization during +runtime. This optimization is now enabled for the class templates +\texttt{Tensor} and \texttt{SymmetricTensor} by qualifying their constructor, +member functions, and overloaded operators as \texttt{constexpr}. +For instance, the linear mechanical constitutive model for elastic solids +uses a constant fourth-order elasticity tensor +$\mathbb{C} = \lambda \boldsymbol{I} \otimes \boldsymbol{I} + 2 \mu \mathbb{I}$ +which does not depend on the current state of strain. +This tensor can be statically initialized by defining it as +\texttt{constexpr SymmetricTensor<4, dim>}. +As another example, the lattice vectors in a crystal plasticity model are generally +constant and known during compilation time, enabling their efficient definition as +\texttt{constexpr Tensor<1, dim>}. +The capability of defining \texttt{constexpr} variables, functions, and methods +was introduced by the C++11 standard and was later expanded by the C++14 standard. +Therefore, the extent of \texttt{constexpr} support in \dealii{} depends on the C++ +standard which is used to compile the library. The next release of \dealii{} +will fully adopt the features of the C++14 standard. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%