* quadrilaterals, we have discussed in step-3: we selected an appropriate
* finite element, quadrature rule and mapping object, e.g., FE_Q, QGauss, and
* MappingFE (initialized with FE_Q). For simplex meshes, we selected in
- * step-3simplex FE_SimplexP, QGaussSimplex, and MappingFE (intialized with
+ * step-3simplex FE_SimplexP, QGaussSimplex, and MappingFE (initialized with
* FE_SimplexP).
*
* For mixed meshes, we need multiple finite elements, quadrature rules, and
<h3>Possibilities for extensions</h3>
-A couple of possible extensions are available concerning minor updates fo the
+A couple of possible extensions are available concerning minor updates to the
present code as well as a deeper numerical investigation of the Gelfand problem.
<h4>More sophisticated Newton iteration</h4>
program is run) and then a `output/parameters_22.prm` (every time you
run the program with an existing input file), is because you may want
to leave most parameters to their
-default values, and only modify a handful of them, while still beeing able to
+default values, and only modify a handful of them, while still being able to
reproduce the results and inspect what parameters were used for a specific
simulation. It is generally good scientific practice to store the
parameter file you used for a simulation along with the simulation
// calculations. These essentially act as the input arguments to
// all dependent functions that the @p optimizer must evaluate.
// They are, collectively, the independent variables
- // for the problem, the history variables, the time step sie and the
+ // for the problem, the history variables, the time step size and the
// constitutive parameters (since we've not hard encoded them in the
// energy density function).
//
the other spatial dimensions (where graphene samples can reach up to
several centimeters) the atomistic thickness of graphene typically ranges
around 2.5 ångstrom ($2.5\times10^{-10}\text{m}$). We will thus model
-graphene as a lower-dimensional interface $\Sigma$ imbedded into the
+graphene as a lower-dimensional interface $\Sigma$ embedded into the
computational domain $\Omega\subset\mathbb{R}^d$. More precisely, $\Sigma$
is a two-dimensional sheet in three spatial dimensions, or a
one-dimensional line in two spatial dimensions. The special electronic
<a name="Intro"></a>
<h1>Introduction</h1>
-<h3>Problem statment</h3>
+<h3>Problem Statement</h3>
In this example, we consider the <i>local discontinuous Galerkin</i> (LDG) method for approximating the solution to the bi-Laplacian problem,
@f{align*}{
\nabla u & = \mathbf{0} \quad \mbox{on } \partial\Omega, \\
u & = 0 \quad \mbox{on } \partial\Omega,
@f}
-where $\Omega\subset\mathbb{R}^d$ $(d=2,3)$ is an open bounded Lipschitz domain and $f\in L^2(\Omega)$. This is the same problem we have already considered in step-47, but we will take here a different approach towards solving it: Rather than using continuous finite elements and the interior penalty method, we consider discontinuous finite elements and the local discontinous Galerkin method defined using lifting operators.
+where $\Omega\subset\mathbb{R}^d$ $(d=2,3)$ is an open bounded Lipschitz domain and $f\in L^2(\Omega)$. This is the same problem we have already considered in step-47, but we will take here a different approach towards solving it: Rather than using continuous finite elements and the interior penalty method, we consider discontinuous finite elements and the local discontinuous Galerkin method defined using lifting operators.
The weak formulation of this problem reads as follows: find $u\in H_0^2(\Omega)$ such that
@f[
@f[
G_m=\int_e\average{{\rm div}\, \psi_m}\cdot\mathbf{n}_e\jump{\varphi^c}=\frac{1}{2}\int_e{\rm div}\, \psi_m\cdot\mathbf{n}_{K_c}\varphi^c,
@f]
-while if $\varphi=\varphi^n$, namely $\varphi$ has support on the neighbhoring cell $K_n$, then
+while if $\varphi=\varphi^n$, namely $\varphi$ has support on the neighboring cell $K_n$, then
@f[
G_m=\int_e\average{{\rm div}\, \psi_m}\cdot\mathbf{n}_e\jump{\varphi^n}=\frac{1}{2}\int_e{\rm div}\, \psi_m\cdot\mathbf{n}_{K_n}\varphi^n.
@f]
const bool at_boundary = face->at_boundary();
- // Recall that by convention, the average of a function accross a
+ // Recall that by convention, the average of a function across a
// boundary face $e$ reduces to the trace of the function on the
// only element adjacent to $e$, namely there is no factor
// $\frac{1}{2}$. We distinguish between the two cases (the current
* process messages of sizes larger than 2 GB with MPI_Byte as the
* underlying data type. This helper is required for MPI versions before 4.0
* because routines like `MPI_Send`
- * use a signed interger for the @p count variable. Instead, you can use this
+ * use a signed integer for the @p count variable. Instead, you can use this
* data type with the appropriate size set to the size of your message and
* by passing
* 1 as the @p count.
* This class, as a base class, allows to keep track of other objects using a
* specific object. It is used to avoid that pointers that point to an object of
* a class derived from Subscriptor are referenced after that object has been
- * invalidated. Here, invalidation is assumend to happen when the object is
+ * invalidated. Here, invalidation is assumed to happen when the object is
* moved from or destroyed.
* The mechanism works as follows: The member function subscribe() accepts a
* pointer to a boolean that is modified on invalidation. The object that owns
/**
* Given a CGAL Triangulation describing a polyhedral region, create
- * a Quadrature rule to integrate over the polygon by looping trough all the
+ * a Quadrature rule to integrate over the polygon by looping through all the
* vertices and exploiting QGaussSimplex.
*
* @param[in] tria The CGAL triangulation object describing the polyhedral
* combination with the Triangulation::Signals::post_p4est_refinement
* signal. At this stage, the p4est oracle already has been refined, but
* the triangulation is still unchanged. After the modification, all
- * refine and coarsen flags describe how the traingulation will actually
+ * refine and coarsen flags describe how the triangulation will actually
* be refined.
*
* The use of this class is demonstrated in step-75.
* distributes DoFs: i.e., for a given support point, the global dof indices
* for component i should be less than the global dof indices for component i
* + 1. Due to various technical complications (like DoF unification in
- * hp-mode) this assumption needs to be satified for this function to work in
+ * hp-mode) this assumption needs to be satisfied for this function to work in
* all relevant cases.
*/
template <int dim, int spacedim>
* contrast with FE_Q(p) where QGauss<dim>(p+1) is the default choice. In
* particular, care must be taken to not use a quadrature formula that
* evaluates the basis functions (and their derivatives) on sub-element
- * boundaries as the gradients of piecewiese functions on internal boundaries
+ * boundaries as the gradients of piecewise functions on internal boundaries
* are set to zero. No checks are performed internally to ensure that this is
* not the case - it is the user's responsibility to avoid these situations.
*
Vector(const Vector<dim, spacedim> &) = delete;
/**
- * Move constuctor.
+ * Move constructor.
*/
// NOLINTNEXTLINE OSX does not compile with noexcept
Vector(Vector<dim, spacedim> &&) = default;
else
col_val = 0;
- // account for indirect contributions by constraints in row, going trough
+ // account for indirect contributions by constraints in row, going through
// the direct and indirect references in the given column.
for (size_type q = 0; q < global_rows.size(i); ++q)
{
LogStream::Prefix prefix("SQMR");
- // temporary vectors, allocated trough the @p VectorMemory object at the
+ // temporary vectors, allocated through the @p VectorMemory object at the
// start of the actual solution process and deallocated at the end.
typename VectorMemory<VectorType>::Pointer Vr(this->memory);
typename VectorMemory<VectorType>::Pointer Vu(this->memory);
}
}
- // Helper function that applies the 1d evaluation kernals.
+ // Helper function that applies the 1d evaluation kernels.
// std::integral_constant<bool, false> is the interpolation path, and
- // std::integral_constant<bool, true> bellow is the integration path.
+ // std::integral_constant<bool, true> below is the integration path.
template <int dim, int fe_degree, int n_q_points_1d, typename Number>
template <int normal_dir>
inline void
/**
- * Helper enum to spefify the type of vectorization for
+ * Helper enum to specify the type of vectorization for
* FEEvaluationImplHangingNodesRunnerTypes::scalar.
*/
enum class VectorizationTypes
{
// if we have a block vector with components with the same DoFHandler,
// we need to figure out which component and which DoF within the
- // comonent are we currently considering
+ // component are we currently considering
const unsigned int n_fe_components =
phi.get_dof_info().start_components.back();
const unsigned int comp =
phi.get_current_cell_index());
++v)
// if we have a block vector with components with the same
- // DoFHandler, we need to loop over all components manully and
+ // DoFHandler, we need to loop over all components manually and
// need to apply the correct shift
for (unsigned int j = 0; j < c_pools[v].row.size() - 1; ++j)
for (unsigned int comp = 0;
/**
* Similar function to MGTransferMatrixFree::build() with the difference that
* the information for the prolongation for each level has already been built.
- * So this function only tries to optimize the data structues of the two-level
- * transfer operators, e.g., by enabling inplace vector operations, by
- * checking if @p external_partitioners and the internal ones are compatible.
+ * So this function only tries to optimize the data structures of the
+ * two-level transfer operators, e.g., by enabling inplace vector operations,
+ * by checking if @p external_partitioners and the internal ones are
+ * compatible.
*/
void
build(const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
/**
* Base class of MGTransferBlockMatrixFree. While MGTransferBlockMatrixFree
- * constains all the setup routines of the transfer operators for the blocks,
+ * contains all the setup routines of the transfer operators for the blocks,
* this class simply applies them, e.g., for restricting and prolongating.
*/
template <int dim, typename Number, typename TransferType>
*
* $|\frac{\partial \psi}{\partial x_i}| > 0$.
*
- * In practice, it might happend the bound we have for the expression in
- * the left-hand side is only floating-point close to zero.
+ * In practice, the bound we have for the expression in the left-hand side
+ * may be near but not equal to zero due to roundoff errors.
*
* This constant is a safety margin, $C$, that states that the implicit
* function theorem can be used when
*
* $|\partial_k \psi_j| > L_{jk}$.
*
- * and then returns a coordindate direction, $i$, and a lower bound $L$,
+ * and then returns a coordinate direction, $i$, and a lower bound $L$,
* such that
*
* @f[
// In the following, we will access the scratch arrays declared as 'mutable'
// in the class. In order to do so from this function, we have to make sure
- // that we guard this access by a mutex so that the invokation of this 'const'
+ // that we guard this access by a mutex so that the invocation of this 'const'
// function is thread-safe.
std::lock_guard<std::mutex> lock(scratch_arrays_mutex);
private:
/**
- * Simple struct to keep relavant data. Can be accessed though p4est's user
+ * Simple struct to keep relevant data. Can be accessed though p4est's user
* pointer.
*/
class QuadrantData
dof_handler.get_fe_collection().max_dofs_per_cell());
// loop over all cells and record which subdomain a DoF belongs to.
- // interface goes to proccessor with smaller subdomain id
+ // interface goes to processor with smaller subdomain id
for (const auto &cell : dof_handler.cell_iterators_on_level(level))
{
// get the owner of the cell; note that we have made sure above
FE_P_BubblesImplementation::get_fe_data<dim>(degree),
FE_P_BubblesImplementation::unit_support_points<dim>(degree),
{FE_P_BubblesImplementation::unit_support_points<dim - 1>(degree)},
- // Interface contraints are not yet implemented
+ // Interface constraints are not yet implemented
FullMatrix<double>())
, approximation_degree(degree)
{}
// might have to renumber/rename children...)
// we need a loop in cases c) and d), as the anisotropic
- // children migt have a lower index than the mother quad
+ // children might have a lower index than the mother quad
for (unsigned int loop = 0; loop < 2; ++loop)
{
// usually, only active objects can be refined
const AdditionalQGeneratorData &additional_data,
QPartitioning<dim> & q_partitioning)
{
- // Make this int to avoid a warning signed/unsigned comparision.
+ // Make this int to avoid a warning signed/unsigned comparison.
const int n_roots = roots.size();
// The number of intervals are roots.size() + 1
if (height_direction_data)
return height_direction_data->direction;
- // We have to choose some direction, we might aswell take 0.
+ // We have to choose some direction, we might as well take 0.
return 0;
}