From: Daniel Arndt Date: Sun, 14 Jan 2018 22:59:01 +0000 (+0100) Subject: Add comments X-Git-Tag: v9.0.0-rc1~539^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c11043f228ee0cb51fa9a5c409d2dce482ba5c6;p=dealii.git Add comments --- diff --git a/include/deal.II/base/time_stepping.templates.h b/include/deal.II/base/time_stepping.templates.h index f2744ab35b..bb29c7bdd2 100644 --- a/include/deal.II/base/time_stepping.templates.h +++ b/include/deal.II/base/time_stepping.templates.h @@ -55,6 +55,9 @@ namespace TimeStepping template ExplicitRungeKutta::ExplicitRungeKutta(const runge_kutta_method method) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called ExplicitRungeKutta::initialize(method); } @@ -211,6 +214,9 @@ namespace TimeStepping max_it(max_it), tolerance(tolerance) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called ImplicitRungeKutta::initialize(method); } @@ -417,6 +423,9 @@ namespace TimeStepping last_same_as_first(false), last_stage(nullptr) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called EmbeddedExplicitRungeKutta::initialize(method); } diff --git a/include/deal.II/lac/block_sparse_matrix.templates.h b/include/deal.II/lac/block_sparse_matrix.templates.h index 8a0d2e6eaa..33b86621eb 100644 --- a/include/deal.II/lac/block_sparse_matrix.templates.h +++ b/include/deal.II/lac/block_sparse_matrix.templates.h @@ -27,6 +27,9 @@ template BlockSparseMatrix:: BlockSparseMatrix (const BlockSparsityPattern &sparsity) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called BlockSparseMatrix::reinit (sparsity); } diff --git a/include/deal.II/lac/chunk_sparse_matrix.templates.h b/include/deal.II/lac/chunk_sparse_matrix.templates.h index 99d78af949..d90363c932 100644 --- a/include/deal.II/lac/chunk_sparse_matrix.templates.h +++ b/include/deal.II/lac/chunk_sparse_matrix.templates.h @@ -332,6 +332,9 @@ ChunkSparseMatrix::ChunkSparseMatrix (const ChunkSparsityPattern &c) val(nullptr), max_len(0) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called ChunkSparseMatrix::reinit (c); } @@ -349,6 +352,9 @@ ChunkSparseMatrix::ChunkSparseMatrix (const ChunkSparsityPattern &c, Assert (c.n_rows() == id.m(), ExcDimensionMismatch (c.n_rows(), id.m())); Assert (c.n_cols() == id.n(), ExcDimensionMismatch (c.n_cols(), id.n())); + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called ChunkSparseMatrix::reinit (c); for (size_type i=0; iset(i,i,1.); diff --git a/include/deal.II/lac/read_write_vector.h b/include/deal.II/lac/read_write_vector.h index 9b959c9920..6d0f8d1109 100644 --- a/include/deal.II/lac/read_write_vector.h +++ b/include/deal.II/lac/read_write_vector.h @@ -673,6 +673,9 @@ namespace LinearAlgebra : val(nullptr) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called ReadWriteVector::reinit(0, true); } @@ -696,6 +699,9 @@ namespace LinearAlgebra : val(nullptr) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called ReadWriteVector::reinit (size, false); } @@ -707,6 +713,9 @@ namespace LinearAlgebra : val(nullptr) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called ReadWriteVector::reinit (locally_stored_indices); } diff --git a/include/deal.II/lac/sparse_decomposition.templates.h b/include/deal.II/lac/sparse_decomposition.templates.h index d5d373302b..79d912c617 100644 --- a/include/deal.II/lac/sparse_decomposition.templates.h +++ b/include/deal.II/lac/sparse_decomposition.templates.h @@ -40,6 +40,9 @@ SparseLUDecomposition::SparseLUDecomposition() template SparseLUDecomposition::~SparseLUDecomposition() { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called SparseLUDecomposition::clear(); } diff --git a/include/deal.II/lac/sparse_matrix.templates.h b/include/deal.II/lac/sparse_matrix.templates.h index 1fe0e27462..6dc48ca354 100644 --- a/include/deal.II/lac/sparse_matrix.templates.h +++ b/include/deal.II/lac/sparse_matrix.templates.h @@ -126,6 +126,9 @@ SparseMatrix::SparseMatrix (const SparsityPattern &c) val(nullptr), max_len(0) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called SparseMatrix::reinit (c); } @@ -143,6 +146,9 @@ SparseMatrix::SparseMatrix (const SparsityPattern &c, Assert (c.n_rows() == id.m(), ExcDimensionMismatch (c.n_rows(), id.m())); Assert (c.n_cols() == id.n(), ExcDimensionMismatch (c.n_cols(), id.n())); + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called SparseMatrix::reinit (c); for (size_type i=0; iset(i,i,1.); diff --git a/include/deal.II/lac/sparse_mic.templates.h b/include/deal.II/lac/sparse_mic.templates.h index 3aaa7cc0c5..c79dc76155 100644 --- a/include/deal.II/lac/sparse_mic.templates.h +++ b/include/deal.II/lac/sparse_mic.templates.h @@ -36,6 +36,9 @@ SparseMIC::SparseMIC () template SparseMIC::~SparseMIC() { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called SparseMIC::clear(); } diff --git a/include/deal.II/lac/vector.h b/include/deal.II/lac/vector.h index 410f72ce74..59ba4b2113 100644 --- a/include/deal.II/lac/vector.h +++ b/include/deal.II/lac/vector.h @@ -978,6 +978,9 @@ Vector::Vector () max_vec_size(0), values(nullptr, &free) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called Vector::reinit(0); } @@ -1007,6 +1010,9 @@ Vector::Vector (const size_type n) max_vec_size(0), values(nullptr, &free) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called Vector::reinit (n, false); } diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index 1ce80a4c8a..d766c4dcf1 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -897,6 +897,9 @@ DataOut_DoFData::DataOut_DoFData () template DataOut_DoFData::~DataOut_DoFData () { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called DataOut_DoFData::clear (); } diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index a7c9f0e7db..ea0dc29f9f 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -1304,6 +1304,9 @@ namespace parallel template Triangulation::~Triangulation () { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called Triangulation::clear (); Assert (triangulation_has_content == false, diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 459c28a666..72515d28c2 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -683,6 +683,9 @@ template DoFHandler::~DoFHandler () { // release allocated memory + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called DoFHandler::clear (); // also release the policy. this needs to happen before the diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 9bf68c62cf..594299fdd5 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1009,6 +1009,9 @@ namespace hp tria_listeners.clear (); // ...and release allocated memory + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called DoFHandler::clear (); } diff --git a/source/lac/petsc_parallel_vector.cc b/source/lac/petsc_parallel_vector.cc index 81187f91b9..1bb64cecd3 100644 --- a/source/lac/petsc_parallel_vector.cc +++ b/source/lac/petsc_parallel_vector.cc @@ -31,6 +31,9 @@ namespace PETScWrappers Vector::Vector () : communicator (MPI_COMM_SELF) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called Vector::create_vector(0, 0); } diff --git a/source/lac/trilinos_epetra_communication_pattern.cc b/source/lac/trilinos_epetra_communication_pattern.cc index c652bfda91..a23def7564 100644 --- a/source/lac/trilinos_epetra_communication_pattern.cc +++ b/source/lac/trilinos_epetra_communication_pattern.cc @@ -37,6 +37,9 @@ namespace LinearAlgebra const IndexSet &read_write_vector_index_set, const MPI_Comm &communicator) { + // virtual functions called in constructors and destructors never use the + // override in a derived class + // for clarity be explicit on which function is called CommunicationPattern::reinit(vector_space_vector_index_set, read_write_vector_index_set, communicator); }