]> https://gitweb.dealii.org/ - dealii.git/commit
Remove double word typos. 6164/head
authorDavid Wells <wellsd2@rpi.edu>
Thu, 5 Apr 2018 14:30:38 +0000 (10:30 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Thu, 5 Apr 2018 14:30:38 +0000 (10:30 -0400)
commit992904f5cdc93dca0d548b7bbca953de4009ac7d
tree8d1797c792d643a1f31fb5a86dd9aa563718166d
parent21b1cf10df73b52d2923c80b3b4670fe210a056a
Remove double word typos.

This commit removes typos consisting of an accidentally repeated
word. Attached below is the python script I used to find them.

It is worth noting that there is a large false positive rate here, for
example, in tria_accessor.h we have the sentence

/**
 * [...] As a
 * consequence, it exists in the mesh to ensure that each processor has all
 * coarse mesh cells and that the 2:1 ratio of neighboring cells is
 * maintained, but it is not one of the cells we should work on on the
 * current processor. [...]
 */

Here 'on on' is correct.

script:

import sys

SKIP = ["//", "*", "}", "|", "};", ">", "\"", "|", "/", "numbers::invalid_unsigned_int,", "std::string,", "int,"]

with open(sys.argv[1], 'r') as handle:
    previous_line = ""
    for line_n, line in enumerate(handle):
        line = line.strip()
        previous_words = previous_line.split()
        words = line.split()
        # ignore comment blocks '*' and comment starts '//' at the beginning of
        # each line.
        if len(words) == 0:
            continue
        if words[0] in ["*", "//"]:
            words = words[1:]

        # See if the last word on the previous line is equal to the first word
        # on the current line.
        if len(previous_words) != 0:
            if words[0] not in SKIP and previous_words[-1] == words[0]:
                print(sys.argv[1] + ":{}: {}".format(line_n + 1, previous_line))
                print(sys.argv[1] + ":{}: {}".format(line_n + 2, line))
        previous_line = line

        for left_word, right_word in zip(words[:-1], words[1:]):
            if left_word == right_word and left_word not in SKIP:
                print(sys.argv[1] + ":{}: {}".format(line_n + 1, line))
38 files changed:
examples/step-16/step-16.cc
examples/step-22/step-22.cc
examples/step-31/doc/results.dox
examples/step-50/step-50.cc
examples/step-54/doc/intro.dox
include/deal.II/base/mpi.h
include/deal.II/base/quadrature.h
include/deal.II/base/tensor.h
include/deal.II/base/timer.h
include/deal.II/base/utilities.h
include/deal.II/dofs/dof_renumbering.h
include/deal.II/fe/fe.h
include/deal.II/fe/fe_dgp.h
include/deal.II/fe/fe_dgp_monomial.h
include/deal.II/fe/fe_dgp_nonparametric.h
include/deal.II/fe/fe_dgq.h
include/deal.II/fe/fe_enriched.h
include/deal.II/fe/fe_face.h
include/deal.II/fe/fe_nedelec.h
include/deal.II/fe/fe_nothing.h
include/deal.II/fe/fe_q_base.h
include/deal.II/fe/fe_system.h
include/deal.II/fe/fe_tools_extrapolate.templates.h
include/deal.II/fe/fe_trace.h
include/deal.II/fe/fe_values.h
include/deal.II/fe/mapping_q_generic.h
include/deal.II/grid/grid_refinement.h
include/deal.II/grid/grid_reordering.h
include/deal.II/grid/grid_tools.h
include/deal.II/grid/manifold_lib.h
include/deal.II/grid/tria.h
include/deal.II/grid/tria_accessor.h
include/deal.II/lac/cuda_sparse_matrix.h
include/deal.II/lac/scalapack.h
include/deal.II/matrix_free/cuda_fe_evaluation.h
include/deal.II/numerics/data_postprocessor.h
include/deal.II/numerics/vector_tools.h
include/deal.II/sundials/arkode.h

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.