PointWrapper(boost::python::list list);
/**
- * Constructor. Intialize PointWrapper using a Point.
+ * Constructor. Initialize PointWrapper using a Point.
*/
template <int dim>
PointWrapper(const Point<dim> &p);
/**
* A subdivided parallelepided, i.e., the same as above, but where the
- * number of subdivisions in each ot the @tparam dim directsions may vary.
+ * number of subdivisions in each of the @tparam dim directions may vary.
* Colorizing is done according to hyper_rectangle().
*/
void generate_varying_subdivided_parallelepiped(boost::python::list &n_subdivisions,
* Generate a hyper-ball intersected with the positive orthant relate to @p
* center, which contains three elements in 2d and four in 3d. The boundary
* indicators for the final triangulations are 0 for the curved boundary
- * and 1 for the cut plane. The appropiate boundary class is
+ * and 1 for the cut plane. The appropriate boundary class is
* HyperBallBoundary.
*/
void generate_quarter_hyper_ball(PointWrapper ¢er,
private:
/**
- * Helper function for the contructors.
+ * Helper function for the constructors.
*/
void setup(const std::string &dimension, const std::string &spacedimension);
"cell_type": "markdown",
"metadata": {},
"source": [
- "We start by creating a 2D **Triangulation** of an hyper cube and we globally refine it twice. You can read the documention of **Triangulation** by typing:\n",
+ "We start by creating a 2D **Triangulation** of an hyper cube and we globally refine it twice. You can read the documentation of **Triangulation** by typing:\n",
"```python\n",
"help(dealii.Triangulation)\n",
"```\n",
const char generate_varying_subdivided_parallelepiped_docstring [] =
"A subdivided parallelepided, i.e., the same as above, but where the \n"
- "number of subdivisions in each ot the dim directsions may vary. \n"
+ "number of subdivisions in each of the dim directions may vary. \n"
"Colorizing is done according to hyper_rectangle(). \n"
;
"Generate a hyper-ball intersected with the positive orthant relate to \n"
"center, which contains three elements in 2d and four in 3d. The \n"
"boundary indicators for the final triangulations are 0 for the curved \n"
- "boundary and 1 for the cut plane. The appropiate boundary class is \n"
+ "boundary and 1 for the cut plane. The appropriate boundary class is \n"
"HyperBallBoundary. \n"
;
# As of python 2.6 we can tell the text wrapper to not break on hyphens. This is
# usually what we want to do: we don't want to split URLs with hyphens and
# doxygen will format 'non-primitive' as 'non- primitive' if it is
-# (inadvertantly) split across two lines.
+# (inadvertently) split across two lines.
wrapper = textwrap.TextWrapper(break_on_hyphens=False)
# take an array of lines and wrap them to 78 columns and let each line start
// good number of more member functions now, which we will explain below.
//
// The external interface of the class, however, is unchanged: it has a
- // public constructor and desctructor, and it has a <code>run</code>
+ // public constructor and destructor, and it has a <code>run</code>
// function that initiated all the work.
template <int dim>
class TopLevel
// Finally, we write the paraview record, that references all .pvtu files and
// their respective time. Note that the variable times_and_names is declared
- // static, so it will retain the entries from the pervious timesteps.
+ // static, so it will retain the entries from the previous timesteps.
static std::vector<std::pair<double,std::string> > times_and_names;
times_and_names.push_back (std::pair<double,std::string> (present_time, pvtu_master_filename));
std::ofstream pvd_output ("solution.pvd");
\end{array}
\right.
@f}
-In other words, in every period of lenght $\tau$, the right hand side first
+In other words, in every period of length $\tau$, the right hand side first
flashes on in domain 1, then off completely, then on in domain 2, then off
completely again. This pattern is probably best observed via the little
animation of the solution shown in the <a href="#Results">results
temperature_solution = tmp[0];
old_temperature_solution = tmp[1];
- // After the solution has been transfered we then enforce the constraints
- // on the transfered solution.
+ // After the solution has been transferred we then enforce the constraints
+ // on the transferred solution.
temperature_constraints.distribute(temperature_solution);
temperature_constraints.distribute(old_temperature_solution);
// The constructor of the problem is very similar to the constructor in
// step-31. What is different is the %parallel communication: Trilinos uses
// a message passing interface (MPI) for data distribution. When entering
- // the BoussinesqFlowProblem class, we have to decide how the parallization
+ // the BoussinesqFlowProblem class, we have to decide how the parallelization
// is to be done. We choose a rather simple strategy and let all processors
// that are running the program work together, specified by the communicator
// <code>MPI_COMM_WORLD</code>. Next, we create the output stream (as we
// concept). Here we chose to keep things simple (keeping in mind that this
// function is also only called once at the beginning of the program, not in
// every time step), and generating the right hand side is cheap anyway so
- // we won't even notice that this part is not parallized by threads.
+ // we won't even notice that this part is not parallelized by threads.
//
// Regarding the implementation of inhomogeneous Dirichlet boundary
// conditions: Since we use the temperature ConstraintMatrix, we could apply
<h4>Stabilization</h4>
The numerical scheme we have chosen is not particularly
-stable when the artificial viscosity is samll while is too diffusive when
+stable when the artificial viscosity is small while is too diffusive when
the artificial viscosity is large. Furthermore, it is known there are more
advanced techniques to stabilize the solution, for example streamline
diffusion, least-squares stabilization terms, entropy viscosity.
<h4>Cache the explicit part of residual</h4>
-The residual calulated in ConservationLaw::assemble_cell_term function
+The residual calculated in ConservationLaw::assemble_cell_term function
reads
$R_i = \left(\frac{\mathbf{w}^{k}_{n+1} - \mathbf{w}_n}{\delta t}
, \mathbf{z}_i \right)_K +
In our matrix-free code, the right hand side computation where the
contribution of inhomogeneous conditions ends up is completely decoupled from
the matrix operator and handled by a different function above. Thus, we need
-to explicity generate the data that enters the right hand side rather than
+to explicitly generate the data that enters the right hand side rather than
using a byproduct of the matrix assembly. Since we already know how to apply
the operator on a vector, we could try to use those facilities for a vector
where we only set the Dirichlet values:
// @sect4{Threading-building-blocks structures}
-// The first group of private member functions is related to parallization.
+// The first group of private member functions is related to parallelization.
// We use the Threading Building Blocks library (TBB) to perform as many
// computationally intensive distributed tasks as possible. In particular, we
// assemble the tangent matrix and right hand side vector, the static
BlockVector<double> tmp (dofs_per_block);
// Transfer solution from coarse to fine mesh and apply boundary value
- // constraints to the new transfered solution. Note that present_solution
+ // constraints to the new transferred solution. Note that present_solution
// is still a vector corresponding to the old mesh.
solution_transfer.interpolate(present_solution, tmp);
nonzero_constraints.distribute(tmp);
// seen that assembling in parallel does not take an incredible
// amount of extra code as long as you diligently describe what the
// scratch and copy data objects are, and if you define suitable
- // functios for the local assembly and the copy operation from local
+ // functions for the local assembly and the copy operation from local
// contributions to global objects. This done, the following will do
// all the heavy lifting to get these operations done on multiple
// threads on as many cores as you have in your system:
/**
* Solve the linear system <tt>Ax=b</tt> based on the
- * package set in intialize(). Note the matrix is not refactorized during
+ * package set in initialize(). Note the matrix is not refactorized during
* this call.
*/
void solve (MPI::Vector &x, const MPI::Vector &b);
/**
* Solve the linear system <tt>Ax=b</tt> based on the package set in
- * intialize() for deal.II's own parallel vectors. Note the matrix is not
+ * initialize() for deal.II's own parallel vectors. Note the matrix is not
* refactorized during this call.
*/
void
inline
void VectorView<Number>::swap(Vector<Number> &)
{
- AssertThrow(false, ExcMessage("Cant' swap a VectorView with a Vector!"));
+ AssertThrow(false, ExcMessage("Can't swap a VectorView with a Vector!"));
}
#endif
}
}
- // max. and min. heigth of solution
+ // max. and min. height of solution
Assert(patches.size()>0, ExcInternalError());
double hmin=patches[0].data(0,0);
double hmax=patches[0].data(0,0);
Utilities::split_string_list(my_section_name, sep);
// Split string list removes trailing empty strings, but not
- // preceeding ones. Make sure that if we had an absolute path,
+ // preceding ones. Make sure that if we had an absolute path,
// we don't store as first section the empty string.
if (is_absolute)
sections.erase(sections.begin());
{
// no, this child is locally not available in the p4est.
// delete all its children but, because this may not be
- // successfull, make sure to mark all children recursively
+ // successful, make sure to mark all children recursively
// as not local.
delete_all_children<dim,spacedim> (dealii_cell->child(c));
dealii_cell->child(c)
Assert(dof_handler.n_dofs() > 0, ExcInternalError());
// In case this function is executed with parallel::shared::Triangulation
- // with possibly artifical cells, we need to take "true" subdomain IDs (i.e. without
+ // with possibly artificial cells, we need to take "true" subdomain IDs (i.e. without
// artificial cells). Otherwise we are good to use subdomain_id as stored
// in cell->subdomain_id().
std::vector<types::subdomain_id> cell_owners (dof_handler.get_triangulation().n_active_cells());
// Data field initialization
//---------------------------------------------------------------------------
-// Chech wheter a given shape
+// Check whether a given shape
// function has support on a
// given face.
Assert(spacedim == 2, ExcInternalError());
// For accuracy reasons, we do all arithmetics in extended precision
- // (long double). This has a noticable effect on the hit rate for
+ // (long double). This has a noticeable effect on the hit rate for
// borderline cases and thus makes the algorithm more robust.
const long double x = p(0);
const long double y = p(1);
for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
in >> cells.back().vertices[i];
- // to make sure that the cast wont fail
+ // to make sure that the cast won't fail
Assert(material_id<= std::numeric_limits<types::material_id>::max(),
ExcIndexRange(material_id,0,std::numeric_limits<types::material_id>::max()));
// we use only material_ids in the range from 0 to numbers::invalid_material_id-1
in >> subcelldata.boundary_lines.back().vertices[0]
>> subcelldata.boundary_lines.back().vertices[1];
- // to make sure that the cast wont fail
+ // to make sure that the cast won't fail
Assert(material_id<= std::numeric_limits<types::boundary_id>::max(),
ExcIndexRange(material_id,0,std::numeric_limits<types::boundary_id>::max()));
// we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1
>> subcelldata.boundary_quads.back().vertices[2]
>> subcelldata.boundary_quads.back().vertices[3];
- // to make sure that the cast wont fail
+ // to make sure that the cast won't fail
Assert(material_id<= std::numeric_limits<types::boundary_id>::max(),
ExcIndexRange(material_id,0,std::numeric_limits<types::boundary_id>::max()));
// we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1
for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
in >> cells.back().vertices[i];
- // to make sure that the cast wont fail
+ // to make sure that the cast won't fail
Assert(material_id<= std::numeric_limits<types::material_id>::max(),
ExcIndexRange(material_id,0,std::numeric_limits<types::material_id>::max()));
// we use only material_ids in the range from 0 to numbers::invalid_material_id-1
in >> subcelldata.boundary_lines.back().vertices[0]
>> subcelldata.boundary_lines.back().vertices[1];
- // to make sure that the cast wont fail
+ // to make sure that the cast won't fail
Assert(material_id<= std::numeric_limits<types::boundary_id>::max(),
ExcIndexRange(material_id,0,std::numeric_limits<types::boundary_id>::max()));
// we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1
>> subcelldata.boundary_quads.back().vertices[2]
>> subcelldata.boundary_quads.back().vertices[3];
- // to make sure that the cast wont fail
+ // to make sure that the cast won't fail
Assert(material_id<= std::numeric_limits<types::boundary_id>::max(),
ExcIndexRange(material_id,0,std::numeric_limits<types::boundary_id>::max()));
// we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1
#ifndef DEAL_II_WITH_MPI
// without MPI, this function doesn't make sense because on cannot
- // use parallel::distributed::Triangulation in any meaninful
+ // use parallel::distributed::Triangulation in any meaningful
// way
(void)triangulation;
Assert (false, ExcMessage ("This function does not make any sense "
// to the next
}
}
- //udpate the number of cells searched
+ //update the number of cells searched
cells_searched += adjacent_cells.size();
// if we have not found the cell in
// question and have not yet searched every
// uniqueness of cell iterators. std::set does this
// automatically for us. Later after it is all
// constructed, we will copy to a map of vectors
- // since that is the prefered output for other
+ // since that is the preferred output for other
// functions.
std::map< types::global_dof_index,std::set<typename DoFHandlerType::active_cell_iterator> > dof_to_set_of_cells_map;
// if we are here, it means that we want to assign a boundary indicator
// different from numbers::internal_face_boundary_id to an internal line.
// As said, this would be not allowed, and an exception should be immediately
- // thrown. Still, there is the possibility that one only wants to specifiy a
+ // thrown. Still, there is the possibility that one only wants to specify a
// manifold_id here. If that is the case (manifold_id != numbers::flat_manifold_id)
// the operation is allowed. Otherwise, we really tried to specify a boundary_id
// (and not a manifold_id) to an internal face. The exception must be thrown.
// are not consecutive, we cannot do so and have to
// replace them by two lines that are consecutive. we
// try to avoid that situation, but it may happen
- // nevertheless throug repeated refinement and
+ // nevertheless through repeated refinement and
// coarsening. thus we have to check here, as we will
// need some additional space to store those new lines
// in case we need them...
/*
When the triangulation is a manifold (dim < spacedim), the normal field
provided from the map class depends on the order of the vertices.
- It may happen that this normal field is discontinous.
+ It may happen that this normal field is discontinuous.
The following code takes care that this is not the case by setting the
cell direction flag on those cell that produce the wrong orientation.
To determine if 2 neighbours have the same or opposite orientation
we use a table of truth.
- Its entries are indexes by the local indeces of the common face.
+ Its entries are indexes by the local indices of the common face.
For example if two elements share a face, and this face is
face 0 for element 0 and face 1 for element 1, then
table(0,1) will tell whether the orientation are the same (true) or
offset[1]=0;
//Take care for periodic conditions & negative angles, see
- //get_new_point_on_line() above. Because we dont have a symmetric
+ //get_new_point_on_line() above. Because we don't have a symmetric
//interpolation (just the middle) we need to add 2*Pi to each almost zero
//and negative angles.
for (unsigned int i=0; i<2; i++)
offset[1]=0;
//Take care for periodic conditions & negative angles, see
- //get_new_point_on_line() above. Because we dont have a symmetric
+ //get_new_point_on_line() above. Because we don't have a symmetric
//interpolation (just the middle) we need to add 2*Pi to each almost zero
//and negative angles.
for (unsigned int i=0; i<2; i++)
// have to count how many of the
// entries in the sparsity pattern lie
// in the column area we have locally,
- // and how many arent. for this, we
+ // and how many aren't. for this, we
// first have to know which areas are
// ours
size_type local_row_start = 0;
/**
* get the factored matrix F from the preconditioner context. This
- * routine is valid only for LU, ILU, Cholesky, and imcomplete
+ * routine is valid only for LU, ILU, Cholesky, and incomplete
* Cholesky
*/
ierr = PCFactorGetMatrix(solver_data->pc, &F);
// What follows just configures a dummy preconditioner that
// sets up the domain and range maps, as well as the communicator.
// It is never used as the vmult, Tvmult operations are
- // given a custom defintion.
+ // given a custom definition.
// Note: This is only required in order to wrap this
// preconditioner in a LinearOperator without an exemplar
// matrix.
// As of now, no particularly neat
- // ouput is generated in case of
+ // output is generated in case of
// multiple processors.
void
SparseMatrix::print (std::ostream &out,
// As of now, no particularly neat
- // ouput is generated in case of
+ // output is generated in case of
// multiple processors.
void
SparsityPattern::print (std::ostream &out,
// We loop over cells and go from
// cells to lower dimensional
// objects. This is the only way to
- // cope withthe fact, that an
+ // cope with the fact, that an
// unknown number of cells may
// share an object of dimension
// smaller than dim-1.
n_vert = (2 + nlay) * vlayer + 1,
n_cell = 3 + (1 + nlay) * lcells + 1; // 19
- int fc = 4; // fv = 1, f: fixed, displacement of index on the vertexes and
+ int fc = 4; // fv = 1, f: fixed, displacement of index on the vertices and
// cells ... inner objects
// geometric information-----------------------