From: wolf Date: Thu, 29 Mar 2001 15:46:35 +0000 (+0000) Subject: Move contents of TODO file into .h and .cc files. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=984dacb3e32945aa20d678e7a67e293b8ae1c6db;p=dealii-svn.git Move contents of TODO file into .h and .cc files. git-svn-id: https://svn.dealii.org/trunk@4336 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/Todo b/deal.II/deal.II/Todo deleted file mode 100644 index 1b1c043a67..0000000000 --- a/deal.II/deal.II/Todo +++ /dev/null @@ -1,106 +0,0 @@ -================================================================= -====== Things to be done for the deal.II library ================ -================================================================= - -Reorganize GridOut class. Either templatize GridOut or remove template - from EpsFlags - - -Remove the comment signs in the monitor_* functions in tria.cc - as early as possible. These were inserted, since at home the - program did some strange things in the reserve_memory - functions (allocated more memory than told), such that the - memory checks failed. - - -Write monitors to control whether enough memory was allocated for - the vectors (i.e. after a process, whether size()==capacity()). - (for DoF) - - -Check usage of vector<>s: functions should assume that the objects have - the right size already. - - -Remove FiniteElementData<>::operator == and let it be generated - implicitely. - - -Look at the fill_fe_values functions for possible optimizations - since this is one of the most often called functions. - - -In VectorTools::project_boundary_values, no condensation of sparsity - structures, matrices and right hand sides or distribution of - solution vectors is performed. This is ok for dim<3 because then - there are no constrained nodes on the boundary, but is not - acceptable for higher dimensions. Fix this. - - -Implement the random distortion in Triangulation for hanging nodes - also. Hanging nodes need to be reset to the correct mean value - at the end, which is simple for 2D but difficult for 3D. Maybe take - a look at how we get to the original location of the point in the - execute_refinement function and copy the relevant lines. - - -Review DoFCellAccessor::get_interpolated_dof_values: it may be - necessary to write not the non-zero values, but those for which - the corresponding row of the transfer (restriction) matrix - has nonzero entries. This also catches those zeroes which should - really be written but are not because the nodal value was zero. - - -Add tests in Triangulation<3>::create_triangulation for faces (quads) - which are entered twice: once and once again in a rotated or - mirrored direction. - - -Better estimates for DoFHandler<3>::max_couplings_between_dofs - - -Check optimized code with -Winline and act accordingly. Unfortunately, - most warnings are from the STL. - - -Unify lots of code of the two Cuthill-McKee dof renumbering functions - in numerics/dof_renumbering.cc. This should be rather - straightforward, since all the unified code needs to get is a - sparsity structure, possibly compressed and return a vector - of numbers. Simple task. - - -Add support for MGTransferPrebuilt and MGSmoother if a user wants - to solve exactly on another than the coarsest grid. In this case, - some matrices and other arrays need not be computed. - - -Fix MGTransferPrebuilt::build_matrices, think about diagonals in - square sparse matrices. - - -In GridOut::write_ucd, a vector of vertices is built along with - another vector stating which of these are used. These are actually - the same arrays as exist already in the triangulation, but I did not - want to write just another access function. However, someone should - take a look whether re-building these arrays is a large wast of - computing time and memory, or whether it is justifiable. - - -Fix a potential problem with viewing angles in 3d Eps GridOut (see - comment) - - -Move the TriaNumberCache into the Triangulation class once the - compiler supports this (gcc2.95 does not allow this at present) - - -Why is dof_renumbering.h in include/numerics, but dof_renumbering.cc - in source/dofs?? - - -DataOut determines whether something is a DoF or cell vector by the - size of the vector. This will fail if someone is using DG0 elements, - since there the number of elements of both types of vectors is the - same, but the ordering will usually differ. Errors cannot be plotted - anyway, since they are float vectors. diff --git a/deal.II/deal.II/include/fe/fe_base.h b/deal.II/deal.II/include/fe/fe_base.h index 38249308b5..056da7fa01 100644 --- a/deal.II/deal.II/include/fe/fe_base.h +++ b/deal.II/deal.II/include/fe/fe_base.h @@ -182,6 +182,7 @@ class FiniteElementData * me (WB) why we have to declare and implement * this one explicitely. */ +//TODO:[WB] remove operator and let the compiler generate it as soon as it is willing to do so bool operator == (const FiniteElementData &) const; /** diff --git a/deal.II/deal.II/include/grid/grid_out.h b/deal.II/deal.II/include/grid/grid_out.h index f42be24657..eb16309f63 100644 --- a/deal.II/deal.II/include/grid/grid_out.h +++ b/deal.II/deal.II/include/grid/grid_out.h @@ -14,6 +14,9 @@ #define __deal2__grid_out_h +//TODO:[WB]Reorganize GridOut class. Either templatize GridOut or remove template from EpsFlags + + #include #include diff --git a/deal.II/deal.II/include/grid/tria.h b/deal.II/deal.II/include/grid/tria.h index 7d3b39841d..59ed117f7e 100644 --- a/deal.II/deal.II/include/grid/tria.h +++ b/deal.II/deal.II/include/grid/tria.h @@ -324,6 +324,11 @@ class TriaDimensionInfo<3> /*------------------------------------------------------------------------*/ +//TODO:[WB] Move the TriaNumberCache into the Triangulation class +// once the compiler supports this (gcc2.95 does not allow this at present) + + + /** * Cache class used to store the number of used and active elements * (lines or quads etc) within the levels of a triangulation. This diff --git a/deal.II/deal.II/include/grid/tria_iterator.h b/deal.II/deal.II/include/grid/tria_iterator.h index 4df089a508..3ed59972eb 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.h +++ b/deal.II/deal.II/include/grid/tria_iterator.h @@ -13,6 +13,7 @@ /*---------------------------- tria-iterator.h ---------------------------*/ +//TODO:[WB] Change to when that becomes available #include #include #include diff --git a/deal.II/deal.II/include/numerics/data_out.h b/deal.II/deal.II/include/numerics/data_out.h index ab5cca8107..e6dadb5fdc 100644 --- a/deal.II/deal.II/include/numerics/data_out.h +++ b/deal.II/deal.II/include/numerics/data_out.h @@ -10,6 +10,14 @@ #define __deal2__data_out_h +//TODO:[?] DataOut determines whether something is a DoF or cell vector by the size of the vector. +// This will fail if someone is using DG0 elements, +// since there the number of elements of both types of vectors is the +// same, but the ordering will usually differ. Errors cannot be plotted +// anyway, since they are float vectors. + + + #include #include #include diff --git a/deal.II/deal.II/source/dofs/dof_handler.cc b/deal.II/deal.II/source/dofs/dof_handler.cc index 635b550ac4..31c0d1a34e 100644 --- a/deal.II/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/deal.II/source/dofs/dof_handler.cc @@ -1646,15 +1646,18 @@ void DoFHandler<3>::renumber_dofs (const std::vector &new_numbers) #if deal_II_dimension == 1 template <> -unsigned int DoFHandler<1>::max_couplings_between_dofs () const { +unsigned int DoFHandler<1>::max_couplings_between_dofs () const +{ Assert (selected_fe != 0, ExcNoFESelected()); return std::min(3*selected_fe->dofs_per_vertex + 2*selected_fe->dofs_per_line, n_dofs()); }; + template <> -unsigned int DoFHandler<1>::max_couplings_between_boundary_dofs () const { +unsigned int DoFHandler<1>::max_couplings_between_boundary_dofs () const +{ Assert (selected_fe != 0, ExcNoFESelected()); Assert (false, ExcInternalError()); return 0; @@ -1666,7 +1669,8 @@ unsigned int DoFHandler<1>::max_couplings_between_boundary_dofs () const { #if deal_II_dimension == 2 template <> -unsigned int DoFHandler<2>::max_couplings_between_dofs () const { +unsigned int DoFHandler<2>::max_couplings_between_dofs () const +{ Assert (selected_fe != 0, ExcNoFESelected()); // get these numbers by drawing pictures @@ -1726,8 +1730,10 @@ unsigned int DoFHandler<2>::max_couplings_between_dofs () const { }; + template <> -unsigned int DoFHandler<2>::max_couplings_between_boundary_dofs () const { +unsigned int DoFHandler<2>::max_couplings_between_boundary_dofs () const +{ Assert (selected_fe != 0, ExcNoFESelected()); return 3*selected_fe->dofs_per_vertex + 2*selected_fe->dofs_per_line; }; @@ -1738,7 +1744,9 @@ unsigned int DoFHandler<2>::max_couplings_between_boundary_dofs () const { #if deal_II_dimension == 3 template <> -unsigned int DoFHandler<3>::max_couplings_between_dofs () const { +unsigned int DoFHandler<3>::max_couplings_between_dofs () const +{ +//TODO:[?] Invent significantly better estimates than the ones in this function Assert (selected_fe != 0, ExcNoFESelected()); // doing the same thing here is a rather diff --git a/deal.II/deal.II/source/dofs/dof_renumbering.cc b/deal.II/deal.II/source/dofs/dof_renumbering.cc index 2b04721b09..f6d155ede6 100644 --- a/deal.II/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/deal.II/source/dofs/dof_renumbering.cc @@ -12,6 +12,12 @@ //---------------------------- dof_renumbering.cc --------------------------- +//TODO:[WB] Unify lots of code of the two Cuthill-McKee dof renumbering functions +// This should be rather +// straightforward, since all the unified code needs to get is a +// sparsity structure, possibly compressed and return a vector +// of numbers. Simple task. + #include #include #include diff --git a/deal.II/deal.II/source/grid/grid_out.cc b/deal.II/deal.II/source/grid/grid_out.cc index f77011673e..023d020e37 100644 --- a/deal.II/deal.II/source/grid/grid_out.cc +++ b/deal.II/deal.II/source/grid/grid_out.cc @@ -31,6 +31,13 @@ template void GridOut::write_ucd (const Triangulation &tria, std::ostream &out) { +//TODO:[WB] In GridOut::write_ucd, a vector of vertices is built along with +// another vector stating which of these are used. These are actually +// the same arrays as exist already in the triangulation, but I did not +// want to write just another access function. However, someone should +// take a look whether re-building these arrays is a large waste of +// computing time and memory, or whether it is justifiable. + AssertThrow (out, ExcIO()); typename Triangulation::active_cell_iterator cell=tria.begin_active(); @@ -666,6 +673,7 @@ void GridOut::write_eps (const Triangulation &tria, // we chose here the viewpoint as in // gnuplot as default. // +//TODO:[WB] Fix a potential problem with viewing angles in 3d Eps GridOut // note: the following might be wrong // if one of the base vectors below // is in direction of the viewer, but diff --git a/deal.II/deal.II/source/grid/tria.all_dimensions.cc b/deal.II/deal.II/source/grid/tria.all_dimensions.cc index f46d0393bb..bebe934cef 100644 --- a/deal.II/deal.II/source/grid/tria.all_dimensions.cc +++ b/deal.II/deal.II/source/grid/tria.all_dimensions.cc @@ -12,6 +12,13 @@ //---------------------------- tria.all_dimensions.cc --------------------------- +//TODO:[WB]Remove the comment signs in the monitor_* functions +// as early as possible. These were inserted, since at home the +// program did some strange things in the reserve_memory +// functions (allocated more memory than told), such that the +// memory checks failed. + + #include #include #include diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 1140817c4b..d368203b64 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -821,6 +821,10 @@ void Triangulation<3>::create_triangulation (const std::vector > &v, const std::vector > &c, const SubCellData &subcelldata) { +//TODO:[?]Add tests in Triangulation<3>::create_triangulation for faces (quads) +// which are entered twice: once and once again in a rotated or +// mirrored direction. + const unsigned int dim=3; Assert (vertices.size() == 0, ExcTriangulationNotEmpty()); @@ -1614,11 +1618,18 @@ template void Triangulation::distort_random (const double factor, const bool keep_boundary) { - // this function is mostly equivalent to - // that for the general dimensional case - // the only difference being the correction - // for split faces which is not necessary - // in 1D +//TODO:[?]Implement the random distortion in Triangulation for hanging nodes as well +// Hanging nodes need to be reset to the correct mean value +// at the end, which is simple for 2D but difficult for 3D. Maybe take +// a look at how we get to the original location of the point in the +// execute_refinement function and copy the relevant lines. + + // this function is mostly + // equivalent to that for the + // general dimensional case the + // only difference being the + // correction for split faces which + // is not necessary in 1D // // if you change something here, don't // forget to do so there as well diff --git a/deal.II/deal.II/source/numerics/vectors.cc b/deal.II/deal.II/source/numerics/vectors.cc index 77f125b6a7..c9066fa9b1 100644 --- a/deal.II/deal.II/source/numerics/vectors.cc +++ b/deal.II/deal.II/source/numerics/vectors.cc @@ -299,7 +299,8 @@ void VectorTools::project (const DoFHandler<1> &, Vector &, const bool , const Quadrature<0> &, - const bool ) { + const bool ) +{ // this function should easily be implemented // using the template below. However some // changes have to be made since faces don't @@ -735,6 +736,12 @@ VectorTools::project_boundary_values (const DoFHandler &dof, const Quadrature &q, std::map &boundary_values) { +//TODO:[?] In VectorTools::project_boundary_values, no condensation of sparsity +// structures, matrices and right hand sides or distribution of +// solution vectors is performed. This is ok for dim<3 because then +// there are no constrained nodes on the boundary, but is not +// acceptable for higher dimensions. Fix this. + Assert (dof.get_fe().n_components() == boundary_functions.begin()->second->n_components, ExcComponentMismatch());