\end{array}\right),
* @f}
* where $U,P$ are the values of velocity and pressure degrees of freedom,
- * respectively, $M$ is the mass matrix on the velocity space, $B$ corresponds to
+ * respectively, $M$ is the @ref GlossMassMatrix "mass matrix" on the velocity space, $B$ corresponds to
* the negative divergence operator, and $B^T$ is its transpose and corresponds
* to the negative gradient.
*
\begin{array}{cc} M & B \\ B^T & 0 \end{array}
\right),
@f}
- * where $M$ represents the mass matrix that results from discretizing the
+ * where $M$ represents the @ref GlossMassMatrix "mass matrix" that results from discretizing the
* identity operator $\mathbf 1$ and $B$ the equivalent of the gradient
* operator.
*
// That's quite simple, right?
//
// Two remarks are in order, though: First, these functions are used in a
- // lot of contexts. Maybe you want to create a Laplace or mass matrix for
+ // lot of contexts. Maybe you want to create a Laplace or @ref GlossMassMatrix "mass matrix" for
// a vector values finite element; or you want to use the default Q1
// mapping; or you want to assembled the matrix with a coefficient in the
// Laplace operator. For this reason, there are quite a large number of
\end{array}\right),
@f}
where $U,P$ are the values of velocity and pressure degrees of freedom,
-respectively, $M$ is the mass matrix on the velocity space, $B^T$ corresponds to
+respectively, $M$ is the @ref GlossMassMatrix "mass matrix" on the velocity space, $B^T$ corresponds to
the negative divergence operator, and $B$ is its transpose and corresponds
to the gradient.
// After we have the pressure, we can compute the velocity. The equation
// reads $MU=-BP+F$, and we solve it by first computing the right hand
// side, and then multiplying it with the object that represents the
- // inverse of the mass matrix:
+ // inverse of the @ref GlossMassMatrix "mass matrix":
U = op_M_inv * (F - op_B * P);
}
<li>
Second, every time we multiplied with $B^TM^{-1}B$ we had to solve with the
-mass matrix $M$. This wasn't particularly difficult, however, since the mass
+@ref GlossMassMatrix "mass matrix" $M$. This wasn't particularly difficult, however, since the mass
matrix is always well conditioned and so simple to invert using CG and a
little bit of preconditioning.
</ol>
using no preconditioner, the condition number of the Schur complement matrix
depends on the size ratios of the largest to the smallest cells, and one still
needs on the order of 50-100 CG iterations. However, there is a simple cure:
-precondition with the mass matrix on the pressure space and we get down to a
+precondition with the @ref GlossMassMatrix "mass matrix" on the pressure space and we get down to a
number between 5-15 CG iterations, pretty much independently of the structure
of the mesh (take a look at the <a href="#Results">results section</a> of this
program to see that indeed the number of CG iterations does not change as we
SolverCG<Vector<double>> cg(solver_control);
// Now to the preconditioner to the Schur complement. As explained in
- // the introduction, the preconditioning is done by a mass matrix in the
+ // the introduction, the preconditioning is done by a @ref GlossMassMatrix "mass matrix" in the
// pressure variable.
//
// Actually, the solver needs to have the preconditioner in the form
// Next comes the declaration of the main class. It's public interface of
// functions is like in most of the other tutorial programs. Worth
// mentioning is that we now have to store four matrices instead of one: the
- // mass matrix $M$, the Laplace matrix $A$, the matrix $M+k^2\theta^2A$ used
+ // @ref GlossMassMatrix "mass matrix" $M$, the Laplace matrix $A$, the matrix $M+k^2\theta^2A$ used
// for solving for $U^n$, and a copy of the mass matrix with boundary
// conditions applied used for solving for $V^n$. Note that it is a bit
// wasteful to have an additional copy of the mass matrix around. We will
unsigned int timestep_number;
const double theta;
- // Here's what's new: first, we need that boundary mass matrix $B$ that
+ // Here's what's new: first, we need that boundary @ref GlossMassMatrix "mass matrix" $B$ that
// came out of the absorbing boundary condition. Likewise, since this
// time we consider a realistic medium, we must have a measure of the
// wave speed $c_0$ that will enter all the formulas with the Laplace
\f}
Again, note that the first matrix equation above is, in fact, the
definition of an iterative procedure, so it is solved multiple times
-until a stopping criterion is met. Moreover, $M$ is the mass matrix,
+until a stopping criterion is met. Moreover, $M$ is the @ref GlossMassMatrix "mass matrix",
i.e. $M_{ij} = \left( \varphi_i,\varphi_j \right)_{\Omega}$, $A$ is
the Laplace matrix, i.e. $A_{ij} = \left( \nabla \varphi_i, \nabla
\varphi_j \right)_{\Omega}$, $S$ is the nonlinear term in the
\theta F^n
\right],
@f}
-where $M$ is the mass matrix and $A$ is the stiffness matrix that results from
+where $M$ is the @ref GlossMassMatrix "mass matrix" and $A$ is the stiffness matrix that results from
discretizing the Laplacian. Bringing all known quantities to the right hand
side yields the linear system we have to solve in every step:
@f{align*}
&
\theta k \left| a_{ij} \right| &\geq m_{ij},\qquad j \neq i,
@f}
-where $M = m_{ij}$ denotes the mass matrix and $A = a_{ij}$ the stiffness
+where $M = m_{ij}$ denotes the @ref GlossMassMatrix "mass matrix" and $A = a_{ij}$ the stiffness
matrix with $a_{ij} \leq 0$ for $j \neq i$, respectively. With
$a_{ij} \leq 0$, we can formulate bounds for the global time step $k$ as
follows:
= (B_c M_{K_c})^{ij} \phi_{g'}^j,
@f}
where $M_{K_c}^{lj}=\int_{K_c} f(x) \varphi_{g'}^l(x) \varphi_{g'}^j(x)$ is
- the weighted mass matrix on child $c$ of cell $K$.
+ the weighted @ref GlossMassMatrix "mass matrix" on child $c$ of cell $K$.
The next question is what happens if a child $K_c$ of $K$ is not
active. Then, we have to apply the process recursively, i.e. we have to
{
// The first case is that both cells are no further refined. In that case,
// we can assemble the relevant terms (see the introduction). This
- // involves assembling the mass matrix on the finer of the two cells (in
+ // involves assembling the @ref GlossMassMatrix "mass matrix" on the finer of the two cells (in
// fact there are two mass matrices with different coefficients, one for
// the fission distribution cross section $\chi_g\nu\Sigma_{f,g'}$ and one
// for the scattering cross section $\Sigma_{s,g'\to g}$). This is
On the left side of this equation remains the term from the time
derivative and the original (physical) diffusion which we treat
implicitly (this is actually a nice term: the matrices that result
-from the left hand side are the mass matrix and a multiple of the
+from the left hand side are the @ref GlossMassMatrix "mass matrix" and a multiple of the
Laplace matrix — both are positive definite and if the time step
size $k$ is small, the sum is simple to invert). On the right hand
side, the terms in the first line result from the time derivative; in
space was a good choice. In a small deviation from step-22, we
here have a coefficient $\eta$ in the momentum equation, and by the same
derivation as there we should arrive at the conclusion that it is the weighted
-mass matrix with entries $\tilde S_{ij}=(\eta^{-1}\varphi_i,\varphi_j)$ that
+@ref GlossMassMatrix "mass matrix" with entries $\tilde S_{ij}=(\eta^{-1}\varphi_i,\varphi_j)$ that
we should be using.
It was more complicated to come up with a good replacement $\tilde
is of a form that Krylov-based iterative solvers like GMRES can solve in a
few iterations. We then replaced the exact inverse of $A$ by the action
of an AMG preconditioner $\tilde{A}$ based on a vector Laplace matrix,
-approximated the Schur complement $S = B A^{-1} B^T$ by a mass matrix $M_p$
+approximated the Schur complement $S = B A^{-1} B^T$ by a @ref GlossMassMatrix "mass matrix" $M_p$
on the pressure space and wrote an <tt>InverseMatrix</tt> class for
implementing the action of $M_p^{-1}\approx S^{-1}$ on vectors. In the
InverseMatrix class, we used a CG solve with an incomplete Cholesky (IC)
matrix and vector notation, this equation then reads: @f[ A
\tilde{\Psi} = \varepsilon_h M \tilde{\Psi} \quad, @f] where $A$ is
the stiffness matrix arising from the differential operator $L$, and
-$M$ is the mass matrix. The solution to the eigenvalue problem is an
+$M$ is the @ref GlossMassMatrix "mass matrix". The solution to the eigenvalue problem is an
eigenspectrum $\varepsilon_{h,\ell}$, with associated eigenfunctions
$\Psi_\ell=\sum_j \phi_j\tilde{\psi}_j$.
DoFHandler<dim> dof_handler;
// With these exceptions: For our eigenvalue problem, we need both a
- // stiffness matrix for the left hand side as well as a mass matrix for
+ // stiffness matrix for the left hand side as well as a @ref GlossMassMatrix "mass matrix" for
// the right hand side. We also need not just one solution function, but a
// whole set of these for the eigenfunctions we want to compute, along
// with the corresponding eigenvalues:
// parameter as is done in the MatrixFreeOperators::LaplaceOperator class.
//
// As a sidenote, if we implemented several different operations on the same
- // grid and degrees of freedom (like a mass matrix and a Laplace matrix), we
+ // grid and degrees of freedom (like a @ref GlossMassMatrix "mass matrix" and a Laplace matrix), we
// would define two classes like the current one for each of the operators
// (derived from the MatrixFreeOperators::Base class), and let both of them
// refer to the same MatrixFree data cache from the general problem
&[BU-G]_i \geq 0, \quad \Lambda_i \leq 0,\quad \Lambda_i[BU-G]_i = 0
\qquad \forall i.&
@f}
-where $B$ is the mass matrix on the chosen finite element space and the
+where $B$ is the @ref GlossMassMatrix "mass matrix" on the chosen finite element space and the
indices $i$ above are for all degrees of freedom in the set $\cal S$ of degrees of
freedom located in the interior of the domain
(we have Dirichlet conditions on the perimeter). However, we
// (unconstrained) form of the linear system
// (<code>complete_system_matrix</code> and
// <code>complete_system_rhs</code>) as well as the active set itself and
- // the diagonal of the mass matrix $B$ used in scaling Lagrange multipliers
+ // the diagonal of the @ref GlossMassMatrix "mass matrix" $B$ used in scaling Lagrange multipliers
// in the active set formulation. The rest is as in step-4:
template <int dim>
class ObstacleProblem
// @sect4{PlasticityContactProblem::assemble_mass_matrix_diagonal}
- // The next helper function computes the (diagonal) mass matrix that
+ // The next helper function computes the (diagonal) @ref GlossMassMatrix "mass matrix" that
// is used to determine the active set of the active set method we use in
// the contact algorithm. This matrix is of mass matrix type, but unlike
// the standard mass matrix, we can make it diagonal (even in the case of
where $\mathbf{u}_t^{*}$ is the velocity linearly extrapolated from
$\mathbf{u}^{(n_p)}_t$ and $\mathbf{u}^{(n_{pp})}_t$ to the current time $t^{(n)}$ if $\theta<\theta^*$ while $\mathbf{u}_t^{*}$ is $\mathbf{u}^{(n_p)}_t$ if $\theta>\theta^*$.
Consequently, the equation is linear in $S_h^{(n)}$ and all that is required
-is to solve with a mass matrix on the saturation space.
+is to solve with a @ref GlossMassMatrix "mass matrix" on the saturation space.
Since the Dirichlet boundary conditions for saturation are only imposed on the
inflow boundaries, the third term on the left hand side of the equation above
// @sect4{TwoPhaseFlowProblem<dim>::assemble_darcy_preconditioner}
// This function assembles the matrix we use for preconditioning the Darcy
- // system. What we need are a vector mass matrix weighted by
+ // system. What we need are a vector @ref GlossMassMatrix "mass matrix" weighted by
// $\left(\mathbf{K} \lambda_t\right)^{-1}$ on the velocity components and a
// mass matrix weighted by $\left(\mathbf{K} \lambda_t\right)$ on the
// pressure component. We start by generating a quadrature object of
at the handling of constraints within the matrix-free framework.
Finally, we will use an explicit time-stepping
method to solve the problem and introduce Gauss-Lobatto finite elements that
-are very convenient in this case since their mass matrix can be accurately
+are very convenient in this case since their @ref GlossMassMatrix "mass matrix" can be accurately
approximated by a diagonal, and thus trivially invertible, matrix. The two
ingredients to this property are firstly a distribution of the nodal points of
Lagrange polynomials according to the point distribution of the Gauss-Lobatto
\frac{dy}{dt} = g(t,y).
@f}
On the other hand, when using finite elements, discretized time derivatives always result in the
-presence of a mass matrix on the left hand side. This can easily be seen by
+presence of a @ref GlossMassMatrix "mass matrix" on the left hand side. This can easily be seen by
considering that if the solution vector $y(t)$ in the equation above is in fact the vector
of nodal coefficients $U(t)$ for a variable of the form
@f{eqnarray*}
// @sect4{<code>Diffusion::assemble_system</code>}
// In this function, we compute $-\int D \nabla b_i \cdot \nabla b_j
// d\boldsymbol{r} - \int \Sigma_a b_i b_j d\boldsymbol{r}$ and the mass
- // matrix $\int b_i b_j d\boldsymbol{r}$. The mass matrix is then
+ // matrix $\int b_i b_j d\boldsymbol{r}$. The @ref GlossMassMatrix "mass matrix" is then
// inverted using a direct solver; the <code>inverse_mass_matrix</code>
// variable will then store the inverse of the mass matrix so that
// $M^{-1}$ can be applied to a vector using the <code>vmult()</code>
than GMRES for example), and applicable (matrix and preconditioner are
symmetric).
-For the approximations we will use a CG solve with the mass matrix in the
+For the approximations we will use a CG solve with the @ref GlossMassMatrix "mass matrix" in the
pressure space for approximating the action of $S^{-1}$. Note that the mass
matrix is spectrally equivalent to $S$. We can expect the number of CG
iterations to be independent of $h$, even with a simple preconditioner like
}
// The preconditioner matrix has a different coupling (we only fill in
- // the 1,1 block with the mass matrix), otherwise this code is identical
+ // the 1,1 block with the @ref GlossMassMatrix "mass matrix"), otherwise this code is identical
// to the construction of the system_matrix above.
{
preconditioner_matrix.clear();
the approximations on the right in the equation above.
As discussed in step-22, $-M_p^{-1}=:\widetilde{S^{-1}} \approx
-S^{-1}$, where $M_p$ is the pressure mass matrix and is solved approximately by using CG
+S^{-1}$, where $M_p$ is the pressure @ref GlossMassMatrix "mass matrix" and is solved approximately by using CG
with ILU as a preconditioner, and $\widetilde{A^{-1}}$ is obtained by one of
multiple methods: solving a linear system with CG and ILU as
preconditioner, just using one application of an ILU, solving a linear
// @sect4{StokesProblem::assemble_system}
// In this function, the system matrix is assembled. We assemble the pressure
- // mass matrix in the (1,1) block (if needed) and move it out of this location
+ // @ref GlossMassMatrix "mass matrix" in the (1,1) block (if needed) and move it out of this location
// at the end of this function.
template <int dim>
void StokesProblem<dim>::assemble_system()
with $\tilde{A} = A + \gamma B^TW^{-1}B$ and $\tilde{S}$ is the
corresponding Schur complement $\tilde{S} = B^T \tilde{A}^{-1} B$. We
-let $W = M_p$ where $M_p$ is the pressure mass matrix, then
+let $W = M_p$ where $M_p$ is the pressure @ref GlossMassMatrix "mass matrix", then
$\tilde{S}^{-1}$ can be approximated by
@f{eqnarray*}
\tilde{S}^{-1} \approx -(\nu+\gamma)M_p^{-1}.
// we solve this system via a direct solver for simplicity. The computation
// involved in the second factor is a simple matrix-vector
// multiplication. The Schur complement $\tilde{S}$ can be well approximated
- // by the pressure mass matrix and its inverse can be obtained through an
+ // by the pressure @ref GlossMassMatrix "mass matrix" and its inverse can be obtained through an
// inexact solver. Because the pressure mass matrix is symmetric and
// positive definite, we can use CG to solve the corresponding linear
// system.
// we check that it is diagonal and then extract the determinant of the
// original Jacobian, i.e., the inverse of the determinant of the inverse
// Jacobian, and set the weight as $\text{det}(J) / h_d^2$ according to
- // the 1d Laplacian times $d-1$ copies of the mass matrix.
+ // the 1d Laplacian times $d-1$ copies of the @ref GlossMassMatrix "mass matrix".
cell_matrices.clear();
FEEvaluation<dim, fe_degree, fe_degree + 1, 1, number> phi(*data);
unsigned int old_mapping_data_index = numbers::invalid_unsigned_int;
@f}
(In this last step, we have assumed that the indices $i,j,k$ only range
over those degrees of freedom active on cell $K$,
-thereby ensuring that the mass matrix on the space $RT_s(K)$ is invertible.)
+thereby ensuring that the @ref GlossMassMatrix "mass matrix" on the space $RT_s(K)$ is invertible.)
Equivalently, using the symmetry of the matrix $M$, we have that
@f{equation*}{
C^K = \left(G^K\right)^{T} \left(M^K\right)^{-1}.
coefficient.value_list(fe_values.get_quadrature_points(),
coefficient_values);
- // The first cell matrix we will compute is the mass matrix
+ // The first cell matrix we will compute is the @ref GlossMassMatrix "mass matrix"
// for the Raviart-Thomas space. Hence, we need to loop over
// all the quadrature points for the velocity FEValues object.
cell_matrix_M = 0;
const Tensor<2, dim> grad_phi_j =
fe_values[displacement].gradient(j, q);
- // calculate the values of the mass matrix.
+ // calculate the values of the @ref GlossMassMatrix "mass matrix".
quadrature_data.mass_coefficient[i][j] =
rho_values[q] * xi * phi_i * phi_j;
where $\boldsymbol{\varphi}_i$ runs through all basis functions with from 1 to
$n_\text{dofs}$.
-We now denote by $\mathcal M$ the mass matrix with entries $\mathcal M_{ij} =
+We now denote by $\mathcal M$ the @ref GlossMassMatrix "mass matrix" with entries $\mathcal M_{ij} =
\sum_{K} \left(\boldsymbol{\varphi}_i,
\boldsymbol{\varphi}_j\right)_K$, and by
@f[
@f}
where
- $m_i \dealcoloneq \int_{\Omega} \phi_i \, \mathrm{d}\mathbf{x}$
- is the lumped mass matrix
+ is the lumped @ref GlossMassMatrix "mass matrix"
- $\tau$ is the time step size
- $\mathbf{c}_{ij} \dealcoloneq \int_{\Omega} \nabla\phi_j\phi_i \,
\mathrm{d}\mathbf{x}$ (note that $\mathbf{c}_{ij}\in \mathbb{R}^d$)
//
// The class <code>OfflineData</code> contains pretty much all components
// of the discretization that do not evolve in time, in particular, the
- // DoFHandler, SparsityPattern, boundary maps, the lumped mass matrix,
+ // DoFHandler, SparsityPattern, boundary maps, the lumped @ref GlossMassMatrix "mass matrix",
// $\mathbf{c}_{ij}$ and $\mathbf{n}_{ij}$ matrices. Here, the term
// <i>offline</i> refers to the fact that all the class
// members of <code>OfflineData</code> have well-defined values
// This function solves the linear system with FGMRES with a block diagonal
// preconditioner and an algebraic multigrid (AMG) method for the diagonal
// blocks. The preconditioner applies a V cycle to the $(0,0)$ (i.e., the
- // velocity-velocity) block and a CG with the mass matrix for the $(1,1)$
+ // velocity-velocity) block and a CG with the @ref GlossMassMatrix "mass matrix" for the $(1,1)$
// block (which is our approximation to the Schur complement: the pressure
// mass matrix assembled above).
template <int dim, int spacedim>
// The next function sets up the DoFHandler object, computes
// the constraints, and sets the linear algebra objects to their correct
- // sizes. We also compute the mass matrix here by calling a function from the
+ // sizes. We also compute the @ref GlossMassMatrix "mass matrix" here by calling a function from the
// library. We will compute the other 3 matrices next, because these need to
// be computed 'by hand'.
//
@f[
M\boldsymbol{B}=\boldsymbol{G},
@f]
-where the components of the (local) mass matrix and the right-hand side are given respectively by
+where the components of the (local) @ref GlossMassMatrix "mass matrix" and the right-hand side are given respectively by
@f[
M_{mn}\dealcoloneq\int_{\Omega}\psi_n:\psi_m \quad \mbox{and} \quad G_m\dealcoloneq\int_e\average{{\rm div}\, \psi_m}\cdot \mathbf{n}_e\jump{\varphi}, \qquad 1\leq m,n \leq N_c+N_n.
@f]
// As indicated by its name, the function
// <code>assemble_local_matrix()</code> is used for the assembly of the
- // (local) mass matrix used to compute the two lifting terms (see the matrix
+ // (local) @ref GlossMassMatrix "mass matrix" used to compute the two lifting terms (see the matrix
// $\boldsymbol{M}_c$ introduced in the introduction when describing the
// computation of $b_e$). The function
// <code>compute_discrete_hessians()</code> computes the required discrete
* M u_{n+1} + \theta k F(u_{n+1}) = M u_n - (1-\theta)k F(u_n).
* @f]
*
- * Here, <i>M</i> is the mass matrix. We see, that the right hand side
+ * Here, <i>M</i> is the @ref GlossMassMatrix "mass matrix". We see, that the right hand side
* amounts to an explicit Euler step with modified step size in weak form
* (up to inversion of M). The left hand side corresponds to an implicit
* Euler step with modified step size (right hand side given). Thus, the
* step size from explicit_data().
*
* Its return value is $ Mu+cF(u) $, where $u$ is the current state
- * vector, $M$ the mass matrix, $F$ the operator in space and $c$ is the
+ * vector, $M$ the @ref GlossMassMatrix "mass matrix", $F$ the operator in space and $c$ is the
* adjusted time step size $(1-\theta) \Delta t$.
*/
SmartPointer<OperatorBase, ThetaTimestepping<VectorType>> op_explicit;
*
* Its return value is the solution <i>u</i> of <i>Mu-cF(u)=f</i>, where
* <i>f</i> is the dual space vector found in the "Previous time" entry of
- * the input data, <i>M</i> the mass matrix, <i>F</i> the operator in
+ * the input data, <i>M</i> the @ref GlossMassMatrix "mass matrix", <i>F</i> the operator in
* space and <i>c</i> is the adjusted time step size $ \theta \Delta t$
*/
SmartPointer<OperatorBase, ThetaTimestepping<VectorType>> op_implicit;
* for <code>degree=2</code> are $p_0(x)=(1-x)^2$, $p_1(x)=2x(x-1)$, and
* $p_2(x)=x^2$, in accordance with the construction principle for degree 3.
*
- * These two relaxations improve the condition number of the mass matrix
+ * These two relaxations improve the condition number of the @ref GlossMassMatrix "mass matrix"
* (i.e., interpolation) significantly, as can be seen from the following
* table:
*
* to the continuous space defined by a single FiniteElement @p projection_fe .
* This is achieved using
* FETools::compute_projection_from_quadrature_points_matrix(). In doing so
- * the mass matrix of this element is required, which will be calculated
+ * the @ref GlossMassMatrix "mass matrix" of this element is required, which will be calculated
* with the @p mass_quadrature rule . Should the cell now belong to another processor,
* the data is then sent to this processor. The class makes use of a feature
* of p4est (and parallel::distributed::Triangulation) that allows one to
/**
* Constructor which takes the FiniteElement @p projection_fe , the quadrature
- * rule @p mass_quadrature used to integrate its local mass matrix and
+ * rule @p mass_quadrature used to integrate its local @ref GlossMassMatrix "mass matrix" and
* finally the quadrature rule @p data_quadrature which is used to store @p DataType.
*
* @pre @p projection_fe has to be scalar-valued.
* With this vector, one can get, for any given degree of freedom, a unique
* number among those DoFs that sit on the boundary; or, if your DoF was
* interior to the domain, the result would be numbers::invalid_dof_index.
- * We need this mapping, for example, to build the mass matrix on the boundary
+ * We need this mapping, for example, to build the @ref GlossMassMatrix "mass matrix" on the boundary
* (for this, see make_boundary_sparsity_pattern() function, the corresponding
* section below, as well as the MatrixCreator namespace documentation).
*
* necessarily on the real cell). As a consequence, the first basis function
* of this element is always the function that is constant and equal to one,
* regardless of the polynomial degree of the element. In addition, as a
- * result of the orthogonality of the basis functions, the mass matrix is
+ * result of the orthogonality of the basis functions, the @ref GlossMassMatrix "mass matrix" is
* diagonal if the grid cells are parallelograms. Note that this is in
* contrast to the FE_DGPMonomial class that actually uses the monomial basis
* listed above as basis functions, without transformation from reference to
* The basis functions for this element are chosen to be the monomials listed
* above. Note that this is the main difference to the FE_DGP class that uses
* a set of polynomials of complete degree <code>p</code> that form a Legendre
- * basis on the unit square. Thus, there, the mass matrix is diagonal, if the
+ * basis on the unit square. Thus, there, the @ref GlossMassMatrix "mass matrix" is diagonal, if the
* grid cells are parallelograms. The basis here does not have this property;
* however, it is simpler to compute. On the other hand, this element has the
* additional disadvantage that the local cell matrices usually have a worse
* increases. In interpolation, this effect is known as the Runge
* phenomenon. For Galerkin methods, the Runge phenomenon is typically not
* visible in the solution quality but rather in the condition number of the
- * associated system matrices. For example, the elemental mass matrix of
+ * associated system matrices. For example, the elemental @ref GlossMassMatrix "mass matrix" of
* equidistant points at degree 10 has condition number 2.6e6, whereas the
* condition number for Gauss-Lobatto points is around 400.
*
/**
* Implementation of scalar, discontinuous tensor product elements based on
* Lagrange polynomials with arbitrary nodes. The primary purpose of this
- * class is to provide an element for which the mass matrix can be made
+ * class is to provide an element for which the @ref GlossMassMatrix "mass matrix" can be made
* diagonal by choosing basis functions that are not either zero or one at the
* vertices of the cell, but instead are zero or one at a given set of
* quadrature points. If this set of quadrature points is then also used in
* increases. In interpolation, this effect is known as the Runge
* phenomenon. For Galerkin methods, the Runge phenomenon is typically not
* visible in the solution quality but rather in the condition number of the
- * associated system matrices. For example, the elemental mass matrix of
+ * associated system matrices. For example, the elemental @ref GlossMassMatrix "mass matrix" of
* equidistant points at degree 10 has condition number 2.6e6, whereas the
* condition number for Gauss-Lobatto points is around 400.
*
* different are the basis functions of this space. This is useful in
* contexts where one wants to achieve certain properties of the matrices
* that result from integrating bilinear forms of these shape functions.
- * For example, when computing the mass matrix on cell $K$,
+ * For example, when computing the @ref GlossMassMatrix "mass matrix" on cell $K$,
* @f[
* M_{ij}^K = \int_K \varphi_i(\mathbf x) \varphi_j(\mathbf x) \; dx
* @f]
* vector fields with normal components continuous between mesh cells. The
* purpose of this finite element is in localizing the interactions
* between degrees of freedom around the nodes when an appropriate quadrature
- * rule is used, leading to a block-diagonal mass matrix (even with full-tensor
+ * rule is used, leading to a block-diagonal @ref GlossMassMatrix "mass matrix" (even with full-tensor
* coefficient).
*
* The elements are defined through enrichment of classical Raviart-Thomas
* @brief Enriched version of FE_SimplexP that can be used with nodal
* quadrature.
*
- * Many explicit time integration schemes require solving a mass matrix at
+ * Many explicit time integration schemes require solving a @ref GlossMassMatrix "mass matrix" at
* each time step. There are various ways around this requirement - for
* example, step-48 replaces the mass matrix with a diagonal approximation,
* which makes the solution step trivial. In step-48, and also commonly for
* After these quadrature approximations, we end up with a nodal
* representation <tt>V<sub>h</sub></tt> of <tt>v<sub>h</sub></tt> that
* satisfies the following system of linear equations: <tt>M V<sub>h</sub> =
- * Q U</tt>, where <tt>M<sub>ij</sub>=(phi_i,phi_j)</tt> is the mass matrix
+ * Q U</tt>, where <tt>M<sub>ij</sub>=(phi_i,phi_j)</tt> is the @ref GlossMassMatrix "mass matrix"
* approximated by <tt>lhs_quadrature</tt>, and <tt>Q</tt> is the matrix
* <tt>Q<sub>iq</sub>=phi<sub>i</sub>(x<sub>q</sub>) w<sub>q</sub></tt>
* where <tt>w<sub>q</sub></tt> are quadrature weights; <tt>U</tt> is the
*
* The global projection can be computed by local matrices if the finite
* element spaces are discontinuous. With continuous elements, this is
- * impossible, since a global mass matrix must be inverted.
+ * impossible, since a global @ref GlossMassMatrix "mass matrix" must be inverted.
*/
template <int dim, class InVector, class OutVector, int spacedim>
void
namespace L2
{
/**
- * The mass matrix for scalar or vector values finite elements. \f[ \int_Z
+ * The @ref GlossMassMatrix "mass matrix" for scalar or vector values finite elements. \f[ \int_Z
* uv\,dx \quad \text{or} \quad \int_Z \mathbf u\cdot \mathbf v\,dx \f]
*
* Likewise, this term can be used on faces, where it computes the
}
/**
- * The weighted mass matrix for scalar or vector values finite elements.
+ * The weighted @ref GlossMassMatrix "mass matrix" for scalar or vector values finite elements.
* \f[ \int_Z \omega(x) uv\,dx \quad \text{or} \quad \int_Z \omega(x)
* \mathbf u\cdot \mathbf v\,dx \f]
*
* <li> 0: The vector Laplacian for the velocity (here with a vector valued
* element)
* <li> 1: The divergence matrix
- * <li> 2: The pressure mass matrix used in the preconditioner
+ * <li> 2: The pressure @ref GlossMassMatrix "mass matrix" used in the preconditioner
* </ul>
*
* With these matrices, the function called by MeshWorker::loop() could be
*
* In this class we make use of the method applied to the generalized
* eigenspectrum problem $(A-\lambda B)x=0$, for $x\neq0$; where $A$ is a
- * system matrix, $B$ is a mass matrix, and $\lambda, x$ are a set of
+ * system matrix, $B$ is a @ref GlossMassMatrix "mass matrix", and $\lambda, x$ are a set of
* eigenvalues and eigenvectors respectively.
*
* The ArpackSolver can be used in application codes with serial objects in
* this parameter is entirely unused.
*
* @param B The inner product of the underlying space, typically the mass
- * matrix. For constrained problems, it can be a partial mass matrix, like
+ * matrix. For constrained problems, it can be a partial @ref GlossMassMatrix "mass matrix", like
* for instance the velocity mass matrix of a Stokes problem. Only its
* function <code>vmult()</code> is used.
*
* Return the norm of the vector <i>v</i> with respect to the norm induced
* by this matrix, i.e. <i>v<sup>T</sup>Mv)</i>. This is useful, e.g. in the
* finite element context, where the <i>L<sup>T</sup></i>-norm of a function
- * equals the matrix norm with respect to the mass matrix of the vector
+ * equals the matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the vector
* representing the nodal values of the finite element function. Note that
* even though the function's name might suggest something different, for
* historic reasons not the norm but its square is returned, as defined
* Return the square of the norm of the vector $v$ with respect to the norm
* induced by this matrix, i.e. $\left(v,Mv\right)$. This is useful, e.g. in
* the finite element context, where the $L_2$ norm of a function equals the
- * matrix norm with respect to the mass matrix of the vector representing
+ * matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the vector representing
* the nodal values of the finite element function.
*
* Obviously, the matrix needs to be quadratic for this operation, and for
* Return the square of the norm of the vector $v$ with respect to the
* norm induced by this matrix, i.e., $\left(v,Mv\right)$. This is useful,
* e.g., in the finite context, where the $L_2$ norm of a function equals
- * the matrix norm with respect to the mass matrix of the vector
+ * the matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the vector
* representing the nodal values of the finite element function.
*
* Obviously, the matrix needs to be quadratic for this operation.
* Return the square of the norm of the vector <tt>v</tt> induced by this
* matrix, i.e. <i>(v,Mv)</i>. This is useful, e.g. in the finite element
* context, where the <i>L<sup>2</sup></i> norm of a function equals the
- * matrix norm with respect to the mass matrix of the vector representing
+ * matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the vector representing
* the nodal values of the finite element function.
*
* Obviously, the matrix needs to be quadratic for this operation, and for
* different blocks in a block system. For example, a preconditioner for the
* Oseen system can be built as a block system, where the pressure block is of
* the form <b>M</b><sup>-1</sup><b>FA</b><sup>-1</sup> with <b>M</b> the
- * pressure mass matrix, <b>A</b> the pressure Laplacian and <b>F</b> the
+ * pressure @ref GlossMassMatrix "mass matrix", <b>A</b> the pressure Laplacian and <b>F</b> the
* advection diffusion operator applied to the pressure space. Since only a
* single matrix is needed for the other blocks, using BlockSparseMatrix or
* similar would be a waste of memory.
*
* In this class we make use of the method applied to the generalized
* eigenspectrum problem $(A-\lambda B)x=0$, for $x\neq0$; where $A$ is a
- * system matrix, $B$ is a mass matrix, and $\lambda, x$ are a set of
+ * system matrix, $B$ is a @ref GlossMassMatrix "mass matrix", and $\lambda, x$ are a set of
* eigenvalues and eigenvectors respectively.
*
* The ArpackSolver can be used in application codes in the following way:
* Return the square of the norm of the vector $v$ with respect to the
* norm induced by this matrix, i.e. $\left(v,Mv\right)$. This is useful,
* e.g. in the finite element context, where the $L_2$ norm of a function
- * equals the matrix norm with respect to the mass matrix of the vector
+ * equals the matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the vector
* representing the nodal values of the finite element function.
*
* Obviously, the matrix needs to be quadratic for this operation.
* Return the square of the norm of the vector $v$ with respect to the
* norm induced by this matrix, i.e. $\left(v^\ast,Mv\right)$. This is
* useful, e.g. in the finite element context, where the $L_2$ norm of a
- * function equals the matrix norm with respect to the mass matrix of
+ * function equals the matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of
* the vector representing the nodal values of the finite element
* function.
*
* A better preconditioner in such a case would be one that provides a more
* representative approximation for $ S^{-1} $. One approach is shown in
* step-22, where $ D $ is the null matrix and the preconditioner for $ S^{-1}
- * $ is derived from the mass matrix over this space.
+ * $ is derived from the @ref GlossMassMatrix "mass matrix" over this space.
*
* From another viewpoint, a similar result can be achieved by first
* constructing an object that represents an approximation for $ S $ wherein
*
* The SLEPc solvers are intended to be used for solving the generalized
* eigenspectrum problem $(A-\lambda B)x=0$, for $x\neq0$; where $A$ is a
- * system matrix, $B$ is a mass matrix, and $\lambda, x$ are a set of
+ * system matrix, $B$ is a @ref GlossMassMatrix "mass matrix", and $\lambda, x$ are a set of
* eigenvalues and eigenvectors respectively. The emphasis is on methods and
* techniques appropriate for problems in which the associated matrices are
* sparse. Most of the methods offered by the SLEPc library are projection
* Return the square of the norm of the vector $v$ with respect to the norm
* induced by this matrix, i.e. $\left(v,Mv\right)$. This is useful, e.g. in
* the finite element context, where the $L_2$ norm of a function equals the
- * matrix norm with respect to the mass matrix of the vector representing
+ * matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the vector representing
* the nodal values of the finite element function.
*
* Obviously, the matrix needs to be quadratic for this operation, and for
* @f}
* in 3d. The typical application setting is a discretization of the Laplacian
* $L$ on a Cartesian (axis-aligned) geometry, where it can be exactly
- * represented by the Kronecker or tensor product of a 1d mass matrix $M$ and
+ * represented by the Kronecker or tensor product of a 1d @ref GlossMassMatrix "mass matrix" $M$ and
* a 1d Laplace matrix $A$ in each tensor direction (due to symmetry $M$ and $A$
* are the same in each dimension). The dimension of the resulting class is the
* product of the one-dimensional matrices.
* @warning This class accepts the following types:
* "std::array<Table<2, Number>, dim>", "std::array<FullMatrix<Number>, dim>",
* and "Table<2, Number>". In the latter case, we consider the same 1d
- * mass matrix @p mass_matrix and the same 1d derivative matrix
+ * @ref GlossMassMatrix "mass matrix" @p mass_matrix and the same 1d derivative matrix
* @p derivative_matrix for each tensor direction.
*/
template <typename T>
protected:
/**
- * An array containing a mass matrix for each tensor direction.
+ * An array containing a @ref GlossMassMatrix "mass matrix" for each tensor direction.
*/
std::array<Table<2, Number>, dim> mass_matrix;
* A class similar to TensorProductMatrixSymmetricSum.
*
* The class TensorProductMatrixSymmetricSum stores a
- * 1d mass matrix, 1d stiffness matrix, eigenvalues and eigenvectors
+ * 1d @ref GlossMassMatrix "mass matrix", 1d stiffness matrix, eigenvalues and eigenvectors
* for each direction. If one uses one TensorProductMatrixSymmetricSum
* instance for, e.g., each cell, these quantities are stored
* for each cell. There is no possibility to reuse quantities between
* Return the square of the norm of the vector <tt>v</tt> with respect to
* the norm induced by this matrix, i.e. <i>(v,Mv)</i>. This is useful, e.g.
* in the finite element context, where the <i>L<sup>2</sup></i> norm of a
- * function equals the matrix norm with respect to the mass matrix of the
+ * function equals the matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the
* vector representing the nodal values of the finite element function.
*
* Obviously, the matrix needs to be quadratic for this operation.
* Return the square of the norm of the vector $v$ with respect to the
* norm induced by this matrix, i.e., $\left(v,Mv\right)$. This is useful,
* e.g. in the finite element context, where the $L_2$ norm of a function
- * equals the matrix norm with respect to the mass matrix of the vector
+ * equals the matrix norm with respect to the @ref GlossMassMatrix "mass matrix" of the vector
* representing the nodal values of the finite element function.
*
* Obviously, the matrix needs to be quadratic for this operation.
/**
- * This struct implements the action of the inverse mass matrix operation
+ * This struct implements the action of the inverse @ref GlossMassMatrix "mass matrix" operation
* using an FEEvaluationData argument.
*/
template <int dim, typename Number>
/**
- * This struct implements the action of the inverse mass matrix operation
+ * This struct implements the action of the inverse @ref GlossMassMatrix "mass matrix" operation
* using an FEEvaluationData argument.
*/
template <int dim, typename Number>
/**
- * This struct implements the action of the inverse mass matrix operation
+ * This struct implements the action of the inverse @ref GlossMassMatrix "mass matrix" operation
* using an FEEvaluationData argument.
*/
template <int dim, typename Number>
/**
* This class implements the operation of the action of the inverse of a
- * mass matrix on an element for the special case of an evaluation object
+ * @ref GlossMassMatrix "mass matrix" on an element for the special case of an evaluation object
* with as many quadrature points as there are cell degrees of freedom. It
* uses algorithms from FEEvaluation and produces the exact mass matrix for
* DGQ elements. This algorithm uses tensor products of inverse 1d shape
VectorizedArrayType> &fe_eval);
/**
- * Applies the inverse mass matrix operation on an input array. It is
+ * Applies the inverse @ref GlossMassMatrix "mass matrix" operation on an input array. It is
* assumed that the passed input and output arrays are of correct size,
* namely FEEvaluation::dofs_per_cell long. The inverse of the
* local coefficient (also containing the inverse JxW values) must be
VectorizedArrayType * out_array) const;
/**
- * Applies the inverse mass matrix operation on an input array, using the
+ * Applies the inverse @ref GlossMassMatrix "mass matrix" operation on an input array, using the
* inverse of the JxW values provided by the `fe_eval` argument passed to
* the constructor of this class. Note that the user code must call
* FEEvaluation::reinit() on the underlying evaluator to make the
/**
- * This class implements the operation of the action of a mass matrix.
+ * This class implements the operation of the action of a @ref GlossMassMatrix "mass matrix".
*
* @note This class only supports the non-blocked vector variant of the
* Base operator because only a single FEEvaluation object is used in the
compute_diagonal() override;
/**
- * Compute the lumped mass matrix. This is equal to the mass matrix times a
+ * Compute the lumped @ref GlossMassMatrix "mass matrix". This is equal to the mass matrix times a
* vector of all ones and is equivalent to approximating the mass matrix
* with a nodal quadrature rule.
*
private:
/**
- * Applies the mass matrix operation on an input vector. It is
+ * Applies the @ref GlossMassMatrix "mass matrix" operation on an input vector. It is
* assumed that the passed input and output vector are correctly initialized
* using initialize_dof_vector().
*/
/**
- * Create a coupling mass matrix for non-matching, overlapping grids.
+ * Create a coupling @ref GlossMassMatrix "mass matrix" for non-matching, overlapping grids.
*
* Given two non-matching triangulations, representing the domains $\Omega$
* and $B$, with $B \subseteq \Omega$, and two finite element spaces
const ComponentMask & comps1 = ComponentMask());
/**
- * Create a coupling mass matrix for non-matching independent grids,
+ * Create a coupling @ref GlossMassMatrix "mass matrix" for non-matching independent grids,
* using a convolution kernel with compact support.
*
* Given two non-matching triangulations, representing the domains
* the coefficient @p a, as well as the degree of the given @p Mapping (if
* any).
*
- * Note, that for vector-valued elements the mass matrix and the laplace
+ * Note, that for vector-valued elements the @ref GlossMassMatrix "mass matrix" and the laplace
* matrix is implemented in such a way that each component couples only with
* itself, i.e. there is no coupling of shape functions belonging to different
* components. If the degrees of freedom have been sorted according to their
namespace MatrixCreator
{
/**
- * Assemble the mass matrix. If no coefficient is given (i.e., if the
+ * Assemble the @ref GlossMassMatrix "mass matrix". If no coefficient is given (i.e., if the
* pointer to a function object is zero as it is by default), the
* coefficient is taken as being constant and equal to one.
* In case you want to specify @p constraints and use the default argument
constraints = AffineConstraints<typename SparseMatrixType::value_type>());
/**
- * Assemble the mass matrix and a right hand side vector. If no coefficient
+ * Assemble the @ref GlossMassMatrix "mass matrix" and a right hand side vector. If no coefficient
* is given (i.e., if the pointer to a function object is zero as it is by
* default), the coefficient is taken as being constant and equal to one.
* In case you want to specify @p constraints and use the default argument
/**
- * Assemble the mass matrix and a right hand side vector along the boundary.
+ * Assemble the @ref GlossMassMatrix "mass matrix" and a right hand side vector along the boundary.
*
* The matrix is assumed to already be initialized with a suiting sparsity
* pattern (the DoFHandler provides an appropriate function).
};
/**
- * Create 1d mass matrix and 1d derivative matrix for a scalar
+ * Create 1d @ref GlossMassMatrix "mass matrix" and 1d derivative matrix for a scalar
* constant-coefficient
* Laplacian for a @p dim dimensional Cartesian cell. Its boundary types
* can be specified with @p boundary_ids. The cell extent (including the cell extent
* (<i>f<sub>h</sub></i>,<i>v<sub>h</sub></i>)=(<i>f</i>,<i>v<sub>h</sub></i>)
* for all discrete test functions <i>v<sub>h</sub></i>. This is done through
* the solution of the linear system of equations <i> M v = f</i> where
- * <i>M</i> is the mass matrix $m_{ij} = \int_\Omega \phi_i(x) \phi_j(x) dx$
+ * <i>M</i> is the @ref GlossMassMatrix "mass matrix" $m_{ij} = \int_\Omega \phi_i(x) \phi_j(x) dx$
* and $f_i = \int_\Omega f(x) \phi_i(x) dx$. The solution vector $v$ then is
* the nodal representation of the projection <i>f<sub>h</sub></i>. The
* project() functions are used in the step-21 and step-23 tutorial programs.
* The projection takes place on all boundary parts with boundary indicators
* listed in the map (std::map<types::boundary_id, const
* Function<spacedim,number>*>) of boundary functions. These boundary parts may
- * or may not be continuous. For these boundary parts, the mass matrix is
+ * or may not be continuous. For these boundary parts, the @ref GlossMassMatrix "mass matrix" is
* assembled using the MatrixTools::create_boundary_mass_matrix() function, as
* well as the appropriate right hand side. Then the resulting system of
* equations is solved using a simple CG method (without preconditioning), which
* The projection happens on only those parts of the boundary whose
* indicators are represented in this map.
* @param[in] q The face quadrature used in the integration necessary to
- * compute the mass matrix and right hand side of the projection.
+ * compute the @ref GlossMassMatrix "mass matrix" and right hand side of the projection.
* @param[out] boundary_values The result of this function. It is a map
* containing all indices of degrees of freedom at the boundary (as covered
* by the boundary parts in @p boundary_functions) and the computed dof
* (\varphi_i, f_h)_\Omega = (\varphi_i,f)_\Omega
* @f}
* for all test functions $\varphi_i$. This requires solving a linear system
- * involving the mass matrix since the equation above is equivalent to
+ * involving the @ref GlossMassMatrix "mass matrix" since the equation above is equivalent to
* the linear system
* @f{align*}{
* \sum_j (\varphi_i, \varphi_j)_\Omega F_j = (\varphi_i,f)_\Omega
* therefore make sure that the given quadrature formula is sufficiently
* accurate for creating the right-hand side.
*
- * Otherwise, only serial Triangulations are supported and the mass matrix
+ * Otherwise, only serial Triangulations are supported and the @ref GlossMassMatrix "mass matrix"
* is assembled using MatrixTools::create_mass_matrix. The given
* quadrature rule is then used for both the matrix and the right-hand side.
* You should therefore make sure that the given quadrature formula is also
* - implicit_function()
* - explicit_function()
*
- * If the mass matrix is different from the identity, the user should supply
+ * If the @ref GlossMassMatrix "mass matrix" is different from the identity, the user should supply
* - mass_times_vector() and, optionally,
* - mass_times_setup()
*
/**
* A function object that users may supply and that is intended to compute
- * the product of the mass matrix with a given vector `v`. This function
+ * the product of the @ref GlossMassMatrix "mass matrix" with a given vector `v`. This function
* will be called by ARKode (possibly several times) after
* mass_times_setup() has been called at least once. ARKode tries to do its
* best to call mass_times_setup() the minimum amount of times.
/**
* A function object that users may supply and that is intended to set up
- * the mass matrix. This function is called by ARKode any time a mass
+ * the @ref GlossMassMatrix "mass matrix". This function is called by ARKode any time a mass
* matrix update is required. The user should compute the mass matrix (or
* update all the variables that allow the application of the mass matrix).
* This function is guaranteed to be called by ARKode at least once, before
/**
* A LinearSolveFunction object that users may supply and that is intended
* to solve the linearized system $Ax=b$, where $A = M-\gamma J$ is the
- * Jacobian of the nonlinear residual. The application of the mass matrix
+ * Jacobian of the nonlinear residual. The application of the @ref GlossMassMatrix "mass matrix"
* $M$ and Jacobian $J$ are known through the functions mass_times_vector()
* and jacobian_times_vector() and $\gamma$ is a factor provided by
* SUNDIALS. The matrix-vector product $Ax$ is encoded in the supplied
*
* This function should compute the solution to the preconditioner equation
* $Pz=r$ and store it in @p z. In this equation $P$ should approximate the
- * mass matrix $M$.
+ * @ref GlossMassMatrix "mass matrix" $M$.
*
* @param[in] t The current time
* @param[in] r The right-hand side of the preconditioner equation
* specified in mass_preconditioner_solve().
*
* This function should prepare the solution of the preconditioner equation
- * $Pz=r$. In this equation $P$ should approximate the mass matrix $M$.
+ * $Pz=r$. In this equation $P$ should approximate the @ref GlossMassMatrix "mass matrix" $M$.
*
* If the mass_preconditioner_setup() function is not provided, then
* mass_preconditioner_solve() should do all the work by itself.
setup_system_solver(const VectorType &solution);
/**
- * Set up the solver and preconditioner for a non-identity mass matrix in
+ * Set up the solver and preconditioner for a non-identity @ref GlossMassMatrix "mass matrix" in
* the ARKODE memory object based on the user-specified functions.
* @param solution The solution vector which is used as a template to create
* new vectors.