time step if the electric field it encounters along the way were roughly
constant. So the maximal difference between $\|\mathbf v_i^{(n-1)}\|$ and
$\|\mathbf v_i^{(n)}\|$ would be a factor of two. As a consequence,
-we will choose $c_\text{saftey}=0.5$.
+we will choose $c_\text{safety}=0.5$.
There is only one other case we ought to consider: What happens in
the very first time step? There, any particles to be moved along have just
the reference location: In order to evaluate things such as
$\nabla V(\mathbf x_i)$, it is necessary to evaluate finite element
fields at locations $\mathbf x_i$. But this requires evaluating the
-finite element shape functions at points on the refence cell
+finite element shape functions at points on the reference cell
$\hat{\mathbf x}_i$. To make this efficient, every particle doesn't
just store its location and the cell it is on, but also what location
that point corresponds to in the cell's reference coordinate system.
held at $V=+V_0$. The rest of the boundary satisfies a Neumann boundary
condition.
-This setup mimicks real devices. The re-entrant corner results in an
+This setup mimics real devices. The re-entrant corner results in an
electric potential $V$ whose derivative (the electric field $\mathbf E$)
has a singularity -- in other words, it becomes very large in the vicinity
of the corner, allowing it to rip electrons away from the metal. These
electrons emitted from the cathode actually make it through the
hole in the anode -- electrons that just bounce into the anode
itself are not actually doing anything useful other than converting
-eletricity into heat. As a consequence, in the `track_lost_particle()`
+electricity into heat. As a consequence, in the `track_lost_particle()`
function (which is called for each particle that leaves the domain,
see above), we will estimate where it might have left the domain
and report this in the output.
// solution vector, i.e., to make sure that the values of degrees of
// freedom located on hanging nodes are so that the solution is
// continuous. This is necessary since SolutionTransfer only operates on
- // cells locally, without regard to the neighborhoof.
+ // cells locally, without regard to the neighborhood.
triangulation.execute_coarsening_and_refinement();
setup_system();
// The following function is used when creating the initial grid. The grid we
// would like to create is actually similar to the one from step-14, i.e., the
// square domain with the square hole in the middle. It can be generated by
- // excatly the same function. However, since its implementation is only a
+ // exactly the same function. However, since its implementation is only a
// specialization of the 2d case, we will present a different way of creating
// this domain which is dimension independent.
//
prm.declare_entry("mesh",
"grid.inp",
Patterns::Anything(),
- "intput file name");
+ "input file name");
prm.declare_entry("diffusion power",
"2.0",
// MatrixFreeOperators::LaplaceOperator class which defines `local_apply()`,
// `compute_diagonal()`, and `set_coefficient()` functions internally. Note that
// the polynomial degree is a template parameter of this class. This is
-// necesary for the matrix-free code.
+// necessary for the matrix-free code.
template <int dim, int degree>
class LaplaceProblem
{
// Finally, the system_rhs vector is of type LA::MPI::Vector, but the
// MatrixFree class only work for
// dealii::LinearAlgebra::distributed::Vector. Therefore we must
-// compute the right-hand side using MatrixFree funtionality and then
+// compute the right-hand side using MatrixFree functionality and then
// use the functions in the `ChangeVectorType` namespace to copy it to
// the correct type.
template <int dim, int degree>
solvers -- meaning that the states from both sides are combined in a way that
is consistent with the Euler equations along a discontinuity -- and
approximate Riemann solvers, which violate some physical properties and rely
-on other mechanisms to render the scheme accurate overall. Approxiate Riemann
+on other mechanisms to render the scheme accurate overall. Approximate Riemann
solvers have the advantage of beging cheaper to compute. Most flux functions
have their origin in the finite volume community, which are similar to DG
methods with polynomial degree 0 within the cells (called volumes). As the
magnetic hysteretic effects or damage models for the composite polymer that these material
seek to model.
- Of course, the implemented models could be modified or completely replaced with models that are
- focussed on other aspects of physics, such as electro-active polymers, biomechanical materials,
+ focused on other aspects of physics, such as electro-active polymers, biomechanical materials,
elastoplastic media, etc.
- Implement a different time-discretization scheme for the viscoelastic evolution law.
- Instead of deriving everything directly from an energy density function, use the
// Next is the symbolic representation of the saturation function for
// the elastic part of the free energy density function, followed by the
// magnetoelastic contribution to the free energy density function.
- // This all has the same stucture as we'd seen previously.
+ // This all has the same structure as we'd seen previously.
const Differentiation::SD::Expression f_mu_e_sd =
1.0 +
(mu_e_inf_sd / mu_e_sd - 1.0) *
material_assisted_computation.update_end_of_timestep();
}
- // ... and test for discrepencies between the two.
+ // ... and test for discrepancies between the two.
check_material_class_results(material_hand_calculated,
material_assisted_computation);
// The following lambda function will then copy data into the
// global matrix and right-hand side. Though there are no hanging
// node constraints in DG discretization, we define an empty
- // AffineConstraints oject that allows us to use the
+ // AffineConstraints object that allows us to use the
// AffineConstraints::distribute_local_to_global() functionality.
AffineConstraints<double> constraints;
constraints.close();
{
/**
* Base class for Point-based predicates providing basic functionality for
- * dericed classes, not supposed to be used on its own.
+ * derived classes, not supposed to be used on its own.
*/
class PointPredicate
{
/**
* Base class for BoundingBox predicates providing basic functionality for
- * dericed classes, not supposed to be used on its own.
+ * derived classes, not supposed to be used on its own.
*/
class BoundingBoxPredicate
{
// The (`dim + 1`)-coordinate direction that has been restricted.
const unsigned int restricted_direction;
- // Value of the restriced coordinate.
+ // Value of the restricted coordinate.
const double coordinate_value;
};
* @endcode
* The repetitions of `std::array` look awkward and, worse, the index
* ranges have reversed: the leftmost index has range [0,2), the middle
- * index has rnage [0,3) and the rightmost index has range [0,4).
+ * index has range [0,3) and the rightmost index has range [0,4).
* We address this issue by providing a class ndarray that allows to you
* declare the above stacked `std::array` type by simply writing:
* @code
}
/**
- * This operator advances the iterator by @p offet lanes and returns a
+ * This operator advances the iterator by @p offset lanes and returns a
* reference to <tt>*this</tt>.
*/
VectorizedArrayIterator<T> &
* whenever the control flow itself would depend on (computed) data. For
* example, in case of a scalar data type the statement
* <code>(left < right) ? true_value : false_value</code>
- * could have been also implementd using an <code>if</code>-statement:
+ * could have been also implemented using an <code>if</code>-statement:
* @code
* if (left < right)
* result = true_value;
/**
* Constructor.
*
- * The flag @p allow_artificial_cells can be used to enable artifical
+ * The flag @p allow_artificial_cells can be used to enable artificial
* cells. If enabled, this class will behave similarly
* to parallel::distributed::Triangulation and
* parallel::fullydistributed::Triangulation in the sense that there will
* updates lead to communication only with the direct process neighbors in
* a point-to-point fashion, these degenerate to an operation in which
* every process communicates with every other process (an "all-to-all"
- * communication) if no artifical cells are available. If such ghost-value
- * updates are the bottleneck in your code, you may want to consider
- * enabling artificial cells.
+ * communication) if no artificial cells are available. If such
+ * ghost-value updates are the bottleneck in your code, you may want to
+ * consider enabling artificial cells.
*/
Triangulation(
const MPI_Comm &mpi_communicator,
*
* The TemporarilyMatchRefineFlags class should only be used in
* combination with the Triangulation::Signals::post_p4est_refinement
- * signal. At this stage, the p4est orcale already has been refined, but
+ * 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 acutally
+ * refine and coarsen flags describe how the traingulation will actually
* be refined.
*
* The use of this class is demonstrated in step-75.
* Pointer to the first cached degree of freedom of a geometric object for all
* relevant active finite elements.
*
- * @note In normal mode it is possible to access this data strucutre directly.
+ * @note In normal mode it is possible to access this data structure directly.
* In hp-mode, an indirection via hp_object_fe_indices/hp_object_fe_ptr is
* necessary.
*/
/**
* A list of connections with which this object connects to the
- * triangulation. They get triggered specifially when data needs to be
+ * triangulation. They get triggered specifically when data needs to be
* transferred due to refinement or repartitioning. Only active in hp-mode.
*/
std::vector<boost::signals2::connection> tria_listeners_for_transfer;
HessianVector shape_hessians;
/**
- * Store the 3nd derivatives of the shape functions at the quadrature
+ * Store the 3rd derivatives of the shape functions at the quadrature
* points. See the description of the data type for the layout of the
* data in this field.
*/
{
// face is visited the second time -> now we know the cells
// on both sides of the face and we can determine for both
- // cells the neigbor
+ // cells the neighbor
col_cc[j_0] = neighbors[col_cf[j_0]].first;
col_cc[neighbors[col_cf[j_0]].second] = i_0;
}
update_locally_owned_cell_bounding_boxes_rtree = 0x080,
/**
- * Update vertex to neighbhor subdomain
+ * Update vertex to neighbor subdomain
*/
update_vertex_to_neighbor_subdomain = 0x100,
public:
/*
- * Copy constrcutor.
+ * Copy constructor.
*/
VectorReference(const VectorReference &vector) = default;
const auto face_orientations = this->compute_face_orientations();
# ifdef DEBUG
- // currently on structured meshes are supported -> face numers and
+ // currently on structured meshes are supported -> face numbers and
// orientations have to be the same for all filled lanes
for (unsigned int v = 1; v < VectorizedArrayType::size(); ++v)
{
/**
- * Generate evalution points on a simplex with arbitrary number of
+ * Generate evaluation points on a simplex with arbitrary number of
* subdivisions.
*/
template <int dim>
/**
* This class is used to stack the output from several computations into one
- * output file by stacking the data sets in another co-ordinate direction
+ * output file by stacking the data sets in another coordinate direction
* orthogonal to the space directions. The most common use is to stack the
* results of several time steps into one space-time output file, or for
* example to connect the results of solutions of a parameter dependent
* processes. The finest level of information is given by the leaves, which in
* this context would be the collection of all the bounding boxes associated
* to the locally owned cells of the triangulation. Exchanging this information
- * with all participating processess would defeat the purpuse of parallel
+ * with all participating processes would defeat the purpuse of parallel
* computations. If however one constructs an RTree containing these bounding
* boxes (for example, by calling
* GridTools::Cache::get_cell_bounding_boxes_rtree()), and then extracts one of
* @f}
* with $u_j$ the degrees of freedom and $\varphi_j$ the corresponding shape
* functions. $\{\phi_{\bf k}({\bf x}) = \exp(i \, 2 \pi \, {\bf k} \cdot
- * {\bf x}) \}$ are expoential functions on cell $K$. $a_{\bf k}$ and ${\cal
+ * {\bf x}) \}$ are exponential functions on cell $K$. $a_{\bf k}$ and ${\cal
* F}_{{\bf k},j}$ are coefficients and transformation matrices from the
* Fourier expansion of each shape function. For practical reasons, we will
* perform the calculation of these matrices and coefficients only on the
Assert(cache.is_ready(),
ExcMessage(
- "Utilties::MPI::RemotePointEvaluation is not ready yet! "
- "Please call Utilties::MPI::RemotePointEvaluation::reinit() "
+ "Utilities::MPI::RemotePointEvaluation is not ready yet! "
+ "Please call Utilities::MPI::RemotePointEvaluation::reinit() "
"yourself or the other evaluate_at_points(), which does this for"
"you."));
- Assert(&dof_handler.get_triangulation() == &cache.get_triangulation(),
- ExcMessage(
- "The provided Utilties::MPI::RemotePointEvaluation and DoFHandler "
- "object have been set up with different Triangulation objects, "
- "a scenario not supported!"));
+ Assert(
+ &dof_handler.get_triangulation() == &cache.get_triangulation(),
+ ExcMessage(
+ "The provided Utilities::MPI::RemotePointEvaluation and DoFHandler "
+ "object have been set up with different Triangulation objects, "
+ "a scenario not supported!"));
// evaluate values at points if possible
const auto evaluation_point_results = [&]() {
* shape and the mesh, to control the shape and regularity of the triangles
* you should use other meshing softwares. The two arguments `deflection` and
* `angular_deflection` select the accuracy of the created triangulation with
- * respect to the orginal topological shape. The argument
+ * respect to the original topological shape. The argument
* `sew_different_faces` gives the possibility to use a Sewer from OpenCASCADE
* to create a watertight closed STL using the argument `sewer_tolerance`. The
* argument `is_relative` specifies if distance are relative and `in_parallel`
* specified ID at the specified location. Note that there is no check for
* duplicate particle IDs so the user must make sure the IDs are unique over
* all processes. Data is stored in a global PropertyPool object
- * (corresponding to the global "heap") but can later be transfered to
+ * (corresponding to the global "heap") but can later be transferred to
* another property pool by calling set_property_pool().
*
* @param[in] location Initial location of particle.
* Copy-constructor for Particle. This function creates a particle with
* exactly the state of the input argument. The copied data is stored in a
* global PropertyPool object (corresponding to the global "heap") but can
- * later be transfered to another property pool by calling
+ * later be transferred to another property pool by calling
* set_property_pool().
*/
Particle(const Particle<dim, spacedim> &particle);
/**
* Constructor for Particle. This function creates a particle from a data
* vector. Data is stored in a global PropertyPool object (corresponding to
- * the global "heap") but can later be transfered to another property pool
+ * the global "heap") but can later be transferred to another property pool
* by calling set_property_pool(). This constructor is usually called after
* serializing a particle by calling the write_data() function.
*
/**
* Return the ID number of this particle. The ID of a particle is intended
* to be a property that is globally unique even in parallel computations
- * and is transfered along with other properties of a particle if it
+ * and is transferred along with other properties of a particle if it
* moves from a cell owned by the current processor to a cell owned by
* a different processor, or if ownership of the cell it is on is
* transferred to a different processor.
/**
* Set the ID number of this particle. The ID of a particle is intended
* to be a property that is globally unique even in parallel computations
- * and is transfered along with other properties of a particle if it
+ * and is transferred along with other properties of a particle if it
* moves from a cell owned by the current processor to a cell owned by
* a different processor, or if ownership of the cell it is on is
* transferred to a different processor. As a consequence, when setting
inline bool
Particle<dim, spacedim>::has_properties() const
{
- // Particles always have a property pool asssociated with them,
+ // Particles always have a property pool associated with them,
// but we can access properties only if there is a valid handle.
// The only way a particle can have no valid handle if it has
// been moved-from -- but that leaves an object in an invalid
* Create and insert a number of particles into the collection of particles.
* This function takes a list of positions and creates a set of particles
* at these positions, which are then distributed and added to the local
- * particle collection of a procesor. Note that this function uses
+ * particle collection of a processor. Note that this function uses
* GridTools::distributed_compute_point_locations(). Consequently, it can
* require intense communications between the processors. This function
* is used in step-70.
*
* @param[in] properties (Optional) A vector of vector of properties
* associated with each local point. The size of the vector should be either
- * zero (no properties will be transfered nor attached to the generated
+ * zero (no properties will be transferred nor attached to the generated
* particles) or it should be a vector of `positions.size()` vectors of size
* `n_properties_per_particle()`. Notice that this function call will
* transfer the properties from the local mpi process to the final mpi
* Insert a number of particles into the collection of particles. This
* function takes a list of particles for which we don't know the associated
* cell iterator, and distributes them to the correct local particle
- * collection of a procesor, by unpacking the locations, figuring out where
+ * collection of a processor, by unpacking the locations, figuring out where
* to send the particles by calling
* GridTools::distributed_compute_point_locations(), and sending the
* particles to the corresponding process.
/**
* Set the position of the particles within the particle handler using a
* function with spacedim components. The new set of point defined by the
- * fuction has to be sufficiently close to the original one to ensure that
+ * function has to be sufficiently close to the original one to ensure that
* the sort_particles_into_subdomains_and_cells algorithm manages to find
* the new cells in which the particles belong.
*
/**
* Cache structure used to store the elements which are required to
- * exchange the particle information (location and properties) accross
+ * exchange the particle information (location and properties) across
* processors in order to update the ghost particles. This structure
* is only used to update the ghost particles.
*/
{
/**
* Cache structure used to store the elements which are required to
- * exchange the particle information (location and properties) accross
+ * exchange the particle information (location and properties) across
* processors in order to update the ghost particles.
*
* This structure should only be used when one wishes to carry out work
*
* Arguments to the function are
*
- * @param[in] v The vector to be mulitplied by the Jacobian
+ * @param[in] v The vector to be multiplied by the Jacobian
* @param[out] Jv The vector to be filled with the product J*v
* @param[in] t The current time
* @param[in] y The current $y$ vector for the current ARKode internal
/**
* 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 fo the mass matrix
+ * Jacobian of the nonlinear residual. The application of the 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
* components of your system.
*
* When running in parallel, every process will call this function
- * independently, and syncronization will happen at the end of the
+ * independently, and synchronization will happen at the end of the
* initialization setup to communicate what components are local. Make sure
* you only return the locally owned (or locally relevant) components, in
* order to minimize communication between processes.
/**
* A view to a vector which can be used whenever a N_Vector is required.
*
- * Objects of this class should preferrably be created by
+ * Objects of this class should preferably be created by
* make_nvector_view() as
*
* @code
public:
/**
* Create a non-owning content with an existing @p vector.
- * @param vector The underlying vector to wrap in thi object.
+ * @param vector The underlying vector to wrap in this object.
*/
NVectorContent(VectorType *vector);
/**
* Create a non-owning content with an existing const @p vector. If this
* constructor is used, access is only allowed via the get() const method.
- * @param vector The underlying vector to wrap in thi object.
+ * @param vector The underlying vector to wrap in this object.
*/
NVectorContent(const VectorType *vector);
// compute values and
// uni-directional derivatives at
// the given point in each
- // co-ordinate direction
+ // coordinate direction
ndarray<double, dim, 2> v;
{
std::vector<double> tmp(2);
// compute values and
// uni-directional derivatives at
// the given point in each
- // co-ordinate direction
+ // coordinate direction
ndarray<double, dim, 2> v;
for (unsigned int d = 0; d < dim; ++d)
polynomials[d][indices[d]].value(p(d), 1, v[d].data());
spacedim>
&output_data) const
{
- // base class version, implement overriden function in derived classes
+ // base class version, implement overridden function in derived classes
AssertDimension(quadrature.size(), 1);
fill_fe_face_values(cell,
face_no,
++target_row;
}
- // We need to initialize the dof permuation table and the one for the sign
+ // We need to initialize the dof permutation table and the one for the sign
// change.
initialize_quad_dof_index_permutation_and_sign_change();
}
++target_row;
}
- // We need to initialize the dof permuation table and the one for the sign
+ // We need to initialize the dof permutation table and the one for the sign
// change.
initialize_quad_dof_index_permutation_and_sign_change();
}
// points
initialize_support_points();
- // We need to initialize the dof permuation table and the one for the sign
+ // We need to initialize the dof permutation table and the one for the sign
// change.
initialize_quad_dof_index_permutation_and_sign_change();
}
Assert(false, ExcNotImplemented());
}
- // We need to initialize the dof permuation table and the one for the sign
+ // We need to initialize the dof permutation table and the one for the sign
// change.
initialize_quad_dof_index_permutation_and_sign_change();
}
const unsigned int n_line_dofs = this->n_dofs_per_line() * lines_per_cell;
- // we assume that all quads have the same numer of dofs
+ // we assume that all quads have the same number of dofs
const unsigned int n_face_dofs = this->n_dofs_per_quad(0) * faces_per_cell;
const UpdateFlags flags(data.update_each);
// point (x,y): polyx = L_{i+2}(2x-1), polyy = L_{j+2}(2y-1),
//
// for each polyc[d], c=x,y, contains the d-th derivative with
- // respect to the co-ordinate c.
+ // respect to the coordinate c.
// We only need poly values and 1st derivative for
// update_values, but need the 2nd derivative too for
// L_{j+2}(2y-1), polyz = L_{k+2}(2z-1).
//
// for each polyc[d], c=x,y,z, contains the d-th
- // derivative with respect to the co-ordinate c.
+ // derivative with respect to the coordinate c.
std::vector<std::vector<double>> polyx(
degree, std::vector<double>(poly_length));
std::vector<std::vector<double>> polyy(
// Loop through quad points:
for (unsigned int m = 0; m < faces_per_cell; ++m)
{
- // we assume that all quads have the same numer of dofs
+ // we assume that all quads have the same number of dofs
const unsigned int shift_m(m * this->n_dofs_per_quad(0));
// Calculate the offsets for each face-based shape function:
//
++target_row;
}
- // We need to initialize the dof permuation table and the one for the sign
+ // We need to initialize the dof permutation table and the one for the sign
// change.
initialize_quad_dof_index_permutation_and_sign_change();
}
++target_row;
}
- // We need to initialize the dof permuation table and the one for the sign
+ // We need to initialize the dof permutation table and the one for the sign
// change.
initialize_quad_dof_index_permutation_and_sign_change();
}
++target_row;
}
- // We need to initialize the dof permuation table and the one for the sign
+ // We need to initialize the dof permutation table and the one for the sign
// change.
initialize_quad_dof_index_permutation_and_sign_change();
}
dealii::internal::FEValuesImplementation::MappingRelatedData<dim, spacedim>
&output_data) const
{
- // base class version, implement overriden function in derived classes
+ // base class version, implement overridden function in derived classes
AssertDimension(quadrature.size(), 1);
fill_fe_face_values(cell, face_no, quadrature[0], internal_data, output_data);
}
const UpdateFlags update_flags,
const hp::QCollection<dim - 1> &quadrature) const
{
- // base class version, implement overriden function in derived classes
+ // base class version, implement overridden function in derived classes
return get_face_data(update_flags, quadrature[0]);
}
std::vector<Point<spacedim>> result;
// Step 2b) read of quadrature points in the relative displacement case
- // note: we also take this path for non-active or artifical cells so that
+ // note: we also take this path for non-active or artificial cells so that
// these cells are filled with some useful data
if (vector_describes_relative_displacement ||
is_active_non_artificial_cell == false)
std::vector<Point<spacedim>> result;
// Step 2b) read of quadrature points in the relative displacement case
- // note: we also take this path for non-active or artifical cells so that
+ // note: we also take this path for non-active or artificial cells so that
// these cells are filled with some useful data
if (vector_describes_relative_displacement ||
(is_non_artificial_cell == false))
std::vector<std::vector<std::vector<std::size_t>>> element_nodes(
n_entity_tags, std::vector<std::vector<std::size_t>>(8));
- // One elment id counter for all dimensions.
+ // One element id counter for all dimensions.
std::size_t element_id = 1;
const auto add_element = [&](const auto &element, const int &entity_tag) {
public:
/**
* alias to select the DerivativeDescription corresponding to the
- * <tt>order</tt>th derivative. In this general template we set an unvalid
+ * <tt>order</tt>th derivative. In this general template we set an invalid
* alias to void, the real alias have to be specialized.
*/
using DerivDescr = void;