// center of the ring shall be the
// point (1,0), and inner and outer
// radius shall be 0.5 and 1. The
- // number of circumferentical cells
+ // number of circumferential cells
// could be adjusted automatically
// by this function, but we choose
// to set it explicitely as the
// of the coarse grid (which we
// just created). Here, however, we
// would like to have a curved
- // boundary. Furtunately, some good
+ // boundary. Fortunately, some good
// soul implemented an object which
// describes the boundary of a ring
// domain; it only needs the center
// the mesh refinement in the loop
// header, which might be uncommon
// but nevertheless works. Also it
- // is strangly consistent with
+ // is strangely consistent with
// incrementing the loop index
// denoting the refinement level.
for (unsigned int refinement=0; refinement<2;
// does so significantly
// faster. ``MappingQ1'' is
// also the class that is
- // implicitely used
+ // implicitly used
// throughout the library
// in many functions and
// classes if you do not
const FE_Q<dim> dummy_fe (1);
// Likewise, we need to create
- // a DofHandler object. We do
+ // a DoFHandler object. We do
// not actually use it, but it
// will provide us with
// `active_cell_iterators' that
- // are needed to reinit the
- // FEValues object on each cell
- // of the triangulation.
+ // are needed to reinitialize
+ // the FEValues object on each
+ // cell of the triangulation.
DoFHandler<dim> dof_handler (triangulation);
// Now we set up the FEValues
// the ``MatrixCreator'' and
// ``MatrixTools''
// classes. Whenever you need a
- // slighly different version of
+ // slightly different version of
// these functions than the ones
// called above, it is certainly
// worthwhile to take a look at the
// fixed R, but it also provides
// quadrature rules of higher
// degree which are no longer
- // hardcoded in the library.
+ // hard-coded in the library.
// Since the generation of the body
// force contributions to the right
// Finally, evaluate what we got as
// solution. As stated in the
// introduction, we are interested
- // in the H1 seminorm of the
+ // in the H1 semi-norm of the
// solution. Here, as well, we have
// a function in the library that
// does this, although in a
// (which we make us of here), and
// the one which we have used in
// previous examples which
- // implicitely uses ``MappingQ1''.
+ // implicitly uses ``MappingQ1''.
// Also note that we take a
// quadrature formula of one degree
// higher, in order to avoid
center, inner_radius, outer_radius, 10);
// This is the single difference to
- // the respetive function in the
+ // the respective function in the
// previous program: since we want
// to export the triangulation
// through this function's
// usually abort upon the attempt to
// destroy the finite element.
//
- // As a sidenote, we remark that
- // these exception are not
- // particularly popular among
- // programmers, since they only tell
- // us that some other object is still
+ // As a side-note, we remark that
+ // this exception about still used
+ // objects are not particularly
+ // popular among programmers using
+ // deal.II, since they only tell us
+ // that something is wrong, namely
+ // that some other object is still
// using the object that is presently
// destructed, but not which one. It
// is therefore often rather
// situation, if we did not write
// this destructor, the compiler will
// generate code that triggers
- // exactly the behaviour sketched
+ // exactly the behavior sketched
// above. The reason is that member
// variables of the
// ``LaplaceProblem'' class are
preconditioner);
// To set the constrained nodes to
- // resonable values, you have to
+ // reasonable values, you have to
// use the following function. It
// computes the values of these
// nodes from the values of the
// class that implements
// several different algorithms to
// refine a triangulation based on
- // cellwise error indicators.
+ // cell-wise error indicators.
GridRefinement::refine_and_coarsen_fixed_number (triangulation,
estimated_error_per_cell,
0.3, 0.03);
// switched off in optimized mode, in
// contrast to the ``Assert'' macro
// which we have used to test against
- // programming errors. If uncought,
+ // programming errors. If uncaught,
// these exceptions propagate the
// call tree up to the ``main''
// function, and if they are not
// If we got to this point, there
// was no exception which
// propagated up to the main
- // functino (maybe there were some,
+ // function (maybe there were some,
// but they were caught somewhere
// in the program or the
// library). Therefore, the program
// The following two files provide
// classes and information for
- // multithreaded programs. In the
+ // multi-threaded programs. In the
// first one, the classes and
// functions are declared which we
// need to start new threads and to
// When assembling the matrix in
// parallel, we have to
- // synchronise when several
+ // synchronize when several
// threads attempt to write the
// local contributions of a cell
// to the global matrix at the
// course, since if only one
// thread is running at a time,
// there is no need to
- // synchronise with other
+ // synchronize with other
// threads.
Threads::ThreadMutex assembler_lock;
};
// multi-threading, then there
// can't be parallel threads
// and there is no need to
- // synchronise. Thus, the
+ // synchronize. Thus, the
// ``lock'' and ``release''
// functions are no-ops,
// i.e. they return without
// principle, an optimized
// implementation would find
// neighbors and the quantities
- // dependening on them in one step,
+ // depending on them in one step,
// rather than first building a list
// of neighbors and in a second step
// their contributions.
// cell and advancing them using
// the given start and end
// index. Note that we can use the
- // ``advance'' functino of the
+ // ``advance'' function of the
// standard C++ library, but that
// we have to cast the distance by
// which the iterator is to be
// computation on each of
// them. First we do some
// preliminaries: find out
- // about the center iof the
+ // about the center of the
// present cell and the
// solution at this point. The
// latter is obtained as a