]> https://gitweb.dealii.org/ - dealii.git/log
dealii.git
7 years agoMerge pull request #4575 from tjhei/disable_petsc_handler
Luca Heltai [Thu, 6 Jul 2017 11:37:14 +0000 (13:37 +0200)]
Merge pull request #4575 from tjhei/disable_petsc_handler

Disable PETSc exception handling

7 years agoDisable PETSc exception handling 4575/head
Timo Heister [Thu, 6 Jul 2017 08:35:32 +0000 (10:35 +0200)]
Disable PETSc exception handling

Disable PETSc exception handling. This just prints a large wall
of text that is not particularly helpful for what we do.

7 years agoMerge pull request #4571 from bangerth/doc-update
Bruno Turcksin [Wed, 5 Jul 2017 17:52:02 +0000 (13:52 -0400)]
Merge pull request #4571 from bangerth/doc-update

Better document VectorTools::create_point_source_vector().

7 years agoBetter document VectorTools::create_point_source_vector(). 4571/head
Wolfgang Bangerth [Mon, 3 Jul 2017 21:56:24 +0000 (15:56 -0600)]
Better document VectorTools::create_point_source_vector().

7 years agoMerge pull request #4570 from jppelteret/fullmatrix_left_right_invert_01
Denis Davydov [Wed, 5 Jul 2017 08:29:06 +0000 (10:29 +0200)]
Merge pull request #4570 from jppelteret/fullmatrix_left_right_invert_01

Fix FullMatrix left/right inversion

7 years agoFix FullMatrix left_ and right_invert for square matrices 4570/head
Jean-Paul Pelteret [Mon, 3 Jul 2017 08:12:30 +0000 (10:12 +0200)]
Fix FullMatrix left_ and right_invert for square matrices

7 years agoAdd determinant calculation for FullMatrix and LAPACKMatrix
Jean-Paul Pelteret [Mon, 3 Jul 2017 06:20:38 +0000 (08:20 +0200)]
Add determinant calculation for FullMatrix and LAPACKMatrix

7 years agoMerge pull request #4566 from bangerth/dofhandler-cleanup
Denis Davydov [Tue, 4 Jul 2017 11:05:12 +0000 (13:05 +0200)]
Merge pull request #4566 from bangerth/dofhandler-cleanup

Move hp::DoFHandler::renumber_dofs() functionality to the policy class.

7 years agoMerge pull request #4573 from tjhei/trilinos_block_jacobi_no_rows
Denis Davydov [Tue, 4 Jul 2017 11:04:12 +0000 (13:04 +0200)]
Merge pull request #4573 from tjhei/trilinos_block_jacobi_no_rows

Fix TrilinosWrappers::PreconditionBlock* with no local rows

7 years agoFix TrilinosWrappers::PreconditionBlock* with no local rows 4573/head
Timo Heister [Tue, 4 Jul 2017 07:53:40 +0000 (09:53 +0200)]
Fix TrilinosWrappers::PreconditionBlock* with no local rows

work around the ifpack error by pretending to use a point smoother on
processors without any local rows.

7 years agoMerge pull request #4572 from bangerth/remove-todo
Denis Davydov [Tue, 4 Jul 2017 07:28:03 +0000 (09:28 +0200)]
Merge pull request #4572 from bangerth/remove-todo

Remove a TODO.

7 years agoRemove a TODO. 4572/head
Wolfgang Bangerth [Mon, 3 Jul 2017 21:58:45 +0000 (15:58 -0600)]
Remove a TODO.

The TODO isn't really addressed, but previous to #4560, the functions
in question simply did the wrong thing, whereas since #4560, we at
least get an ExcNotImplemented().

7 years agoMerge pull request #4569 from tamiko/deprecate_parpack_shift
Matthias Maier [Mon, 3 Jul 2017 10:03:26 +0000 (05:03 -0500)]
Merge pull request #4569 from tamiko/deprecate_parpack_shift

Deprecate ParpackSolver::Shift

7 years agoadd a news/changes entry 4569/head
Matthias Maier [Mon, 3 Jul 2017 10:01:52 +0000 (05:01 -0500)]
add a news/changes entry

7 years agoDeprecate ParpackSolver::Shift
Matthias Maier [Sun, 2 Jul 2017 17:48:17 +0000 (12:48 -0500)]
Deprecate ParpackSolver::Shift

7 years agoSimplify two exceptions. 4566/head
Wolfgang Bangerth [Sun, 2 Jul 2017 17:04:16 +0000 (11:04 -0600)]
Simplify two exceptions.

7 years agoMove the DoF renumbering functionality.
Wolfgang Bangerth [Sat, 1 Jul 2017 07:20:12 +0000 (01:20 -0600)]
Move the DoF renumbering functionality.

Specifically, move it out of the DoFHandler class and into the policy class
where it can use shared infrastructure.

7 years agoMake a class a friend.
Wolfgang Bangerth [Wed, 28 Jun 2017 01:17:30 +0000 (19:17 -0600)]
Make a class a friend.

7 years agoProvide the hp::DoFHandler class with a policy object.
Wolfgang Bangerth [Tue, 27 Jun 2017 14:23:05 +0000 (08:23 -0600)]
Provide the hp::DoFHandler class with a policy object.

7 years agoMerge pull request #4560 from bangerth/more-dofhandler-work
Martin Kronbichler [Sat, 1 Jul 2017 20:46:41 +0000 (22:46 +0200)]
Merge pull request #4560 from bangerth/more-dofhandler-work

More DoFHandler work

7 years agoMerge pull request #4564 from bangerth/improve-mg-vertex-dof-storage
Martin Kronbichler [Sat, 1 Jul 2017 15:12:38 +0000 (17:12 +0200)]
Merge pull request #4564 from bangerth/improve-mg-vertex-dof-storage

Improve the storage of MG vertex dofs.

7 years agoUse a smart pointer instead of a raw pointer. 4564/head
Wolfgang Bangerth [Sat, 1 Jul 2017 05:28:12 +0000 (23:28 -0600)]
Use a smart pointer instead of a raw pointer.

Note that std::unique_ptr<T[]> automatically calls operator delete[]
upon destruction.

7 years agoImprove the storage of MG vertex dofs.
Wolfgang Bangerth [Sat, 1 Jul 2017 05:23:04 +0000 (23:23 -0600)]
Improve the storage of MG vertex dofs.

The DoF indices for a vertex are stored in an array where we just
collate the indices for each level. There is currently another
array that stors the offset within this array where the DoFs
for a given level start. This array is dynamically allocated,
but it is altogether unnecessary because the offsets are computable:
they are simply the number of the multigrid level times
dofs_per_vertex.

Consequently, get rid of the array and replace it by storing dofs_per_vertex.
We can then easily compute the starting offset wherever necessary, rather than
having to look it up.

7 years agoMerge pull request #4561 from bangerth/simplify-code
David Wells [Sat, 1 Jul 2017 04:24:27 +0000 (00:24 -0400)]
Merge pull request #4561 from bangerth/simplify-code

Simplify a function.

7 years agoSimplify a function. 4561/head
Wolfgang Bangerth [Fri, 30 Jun 2017 20:01:32 +0000 (14:01 -0600)]
Simplify a function.

The hp DoF renumbering function for the <3,3> case was unnecessarily
convoluted because it tried to look just like the functions that
deal with faces of higher dimensional cells. But we know that in <3,3>,
a hex is a cell, and so there can only be one finite element associated
with the cell. This allows simplifying a fair share of code.

7 years agoMerge pull request #4562 from bangerth/improve-error
David Wells [Fri, 30 Jun 2017 23:23:30 +0000 (19:23 -0400)]
Merge pull request #4562 from bangerth/improve-error

Improve an error message.

7 years agoUpdate fe_values.cc 4562/head
Wolfgang Bangerth [Fri, 30 Jun 2017 20:23:13 +0000 (14:23 -0600)]
Update fe_values.cc

7 years agoMerge pull request #4563 from bangerth/fix-grammar
David Wells [Fri, 30 Jun 2017 20:17:42 +0000 (16:17 -0400)]
Merge pull request #4563 from bangerth/fix-grammar

Fix the grammar of a comment.

7 years agoFix the grammar of a comment. 4563/head
Wolfgang Bangerth [Fri, 30 Jun 2017 20:05:05 +0000 (14:05 -0600)]
Fix the grammar of a comment.

7 years agoImprove an error message.
Wolfgang Bangerth [Fri, 30 Jun 2017 20:03:44 +0000 (14:03 -0600)]
Improve an error message.

7 years agoLet DoFHandler mg renumbering call the policy. 4560/head
Wolfgang Bangerth [Fri, 30 Jun 2017 17:45:05 +0000 (11:45 -0600)]
Let DoFHandler mg renumbering call the policy.

Currently, the code is duplicated between the DoFHandler and the policy
class. This makes no sense, and indeed the policy class code is more
evolved, so let the former call the latter following exposing the
interface in the previous patch.

The existing code in DoFHandler looks like it did not actually support
parallel triangulations (either shared or distributed). This was
probably a bug, and consequently the implementation of the functionality
in the ParallelDistributed policy class now just throws an error.
This relates to the discussion in #4559.

7 years agoExpose the ability to renumber MG dofs in the DoFHandlerPolicy interface.
Wolfgang Bangerth [Fri, 30 Jun 2017 17:39:37 +0000 (11:39 -0600)]
Expose the ability to renumber MG dofs in the DoFHandlerPolicy interface.

7 years agoRefactor DoFHandlerPolicy::Implementation::renumber_mg_dofs().
Wolfgang Bangerth [Fri, 30 Jun 2017 16:02:36 +0000 (10:02 -0600)]
Refactor DoFHandlerPolicy::Implementation::renumber_mg_dofs().

This works in exactly the same way as the commit two up in the chain for
the renumber_dofs() function.

While there, also parallelize the function the same way as done for
renumber_dofs().

7 years agoParallelize some operations.
Wolfgang Bangerth [Fri, 30 Jun 2017 15:42:45 +0000 (09:42 -0600)]
Parallelize some operations.

The previous refactoring allows parallelizing renumbering for vertices,
cells, and faces, since these all work on mutually independent data
structures.

7 years agoRefactor DoFHandlerPolicy::Implementation::renumber_dofs().
Wolfgang Bangerth [Fri, 30 Jun 2017 15:32:39 +0000 (09:32 -0600)]
Refactor DoFHandlerPolicy::Implementation::renumber_dofs().

The 1d, 2d, and 3d implementations of these functions had most of their code
duplicated. This can be done more elegantly by instead splitting the code into
vertices, cells, and faces. The main function then becomes dimension independent,
as are the functions dealing with vertices and cells, and only the face function
requires dimensional specialization.

7 years agoMerge pull request #4558 from tamiko/cmake_fixes
Wolfgang Bangerth [Fri, 30 Jun 2017 15:24:31 +0000 (09:24 -0600)]
Merge pull request #4558 from tamiko/cmake_fixes

CMake: Two small cosmetic bugfixes

7 years agoCMake: Also remove ninja file during "make distclean" (autopilot macro) 4558/head
Matthias Maier [Fri, 30 Jun 2017 13:22:13 +0000 (08:22 -0500)]
CMake: Also remove ninja file during "make distclean" (autopilot macro)

7 years agoCMake: Concatenate subsequent compiler flag strings with a space
Matthias Maier [Fri, 30 Jun 2017 13:10:39 +0000 (08:10 -0500)]
CMake: Concatenate subsequent compiler flag strings with a space

Otherwise compilation of a target that already has compile flags and is
set up with DEAL_II_SETUP_TARGET will fail.

7 years agoMerge pull request #4549 from masterleinad/fix_timer
Martin Kronbichler [Fri, 30 Jun 2017 12:46:29 +0000 (14:46 +0200)]
Merge pull request #4549 from masterleinad/fix_timer

Fix inconsistent Timer interface

7 years agoMerge pull request #4557 from masterleinad/fix_documentation
Bruno Turcksin [Thu, 29 Jun 2017 12:27:39 +0000 (08:27 -0400)]
Merge pull request #4557 from masterleinad/fix_documentation

Fix generating doxygen output from changes.h

7 years agoFix generating doxygen output from changes.h 4557/head
Daniel Arndt [Thu, 29 Jun 2017 09:45:32 +0000 (11:45 +0200)]
Fix generating doxygen output from changes.h

7 years agoMake the sequential policy class compile for hp::DoFHandler.
Wolfgang Bangerth [Tue, 27 Jun 2017 14:22:39 +0000 (08:22 -0600)]
Make the sequential policy class compile for hp::DoFHandler.

Do so by making some code generic, and providing stubs for functions
that will be moved from the hp::DoFHandler class properly.

7 years agoMake the DoFHandler a template type of the Sequential policy.
Wolfgang Bangerth [Tue, 27 Jun 2017 14:14:53 +0000 (08:14 -0600)]
Make the DoFHandler a template type of the Sequential policy.

Also adjust all of the places where the class is used.

This change by itself is not useful, but will become useful when also
using the policy class from hp::DoFHandler. Similar changes will at a
later time be made for the ParallelShared and ParallelDistributed
policies.

7 years agoFix documentation 4549/head
Daniel Arndt [Wed, 28 Jun 2017 15:28:18 +0000 (17:28 +0200)]
Fix documentation

7 years agoUse signaling_nan's again for initialization
Daniel Arndt [Wed, 28 Jun 2017 14:59:10 +0000 (16:59 +0200)]
Use signaling_nan's again for initialization

7 years agoMerge pull request #4556 from bangerth/dofhandler-cleanup-3
Matthias Maier [Wed, 28 Jun 2017 11:17:25 +0000 (06:17 -0500)]
Merge pull request #4556 from bangerth/dofhandler-cleanup-3

Fix a wrong data type.

7 years agoMerge pull request #4555 from bangerth/style-fixes
Daniel Arndt [Wed, 28 Jun 2017 09:53:27 +0000 (11:53 +0200)]
Merge pull request #4555 from bangerth/style-fixes

Make coding style more uniform.

7 years agoMerge pull request #4554 from bangerth/dofhandler-cleanup-2
Daniel Arndt [Wed, 28 Jun 2017 08:49:45 +0000 (10:49 +0200)]
Merge pull request #4554 from bangerth/dofhandler-cleanup-2

Clean up one more DoFHandlerPolicy thing.

7 years agoFix a wrong data type. 4556/head
Wolfgang Bangerth [Wed, 28 Jun 2017 02:14:41 +0000 (20:14 -0600)]
Fix a wrong data type.

When distributing MG DoF indices, we accidentally used 'unsigned int'
instead of 'types::global_dof_index'. That's a bug. We didn't notice
this because we never have more than 4B unknowns on one processor,
and the function was only called in the parallel context to enumerate
the DoFs on the *local* portion of the mesh, before indices were
shifted after communication with other processors. Regardless, it's
worth fixing.

7 years agoMake coding style more uniform. 4555/head
Wolfgang Bangerth [Wed, 28 Jun 2017 01:38:45 +0000 (19:38 -0600)]
Make coding style more uniform.

7 years agoClean up one more DoFHandlerPolicy thing. 4554/head
Wolfgang Bangerth [Tue, 27 Jun 2017 14:48:39 +0000 (08:48 -0600)]
Clean up one more DoFHandlerPolicy thing.

We had a function with a funny comment suggesting that a compiler did not
correctly understand the code. But the comment is wrong: when the only
argument to a function that references a 'dim' or 'spacedim' template
argument is of the form
  onst typename DoFHandler<dim,spacedim>::level_cell_iterator &
then 'dim' and 'spacedim' are simply not deducible. That's how C++ works.

The function therefore had a dummy argument of type DoFHandler<dim,spacedim>
that isn't used. That's awkward, but works. But we have a way to deal
with the lack of deducibility that's used elsewhere in the library
namely internal::int2type. Use this approach here as well, and remove
the misleading comment.

7 years agoMerge pull request #4553 from bangerth/style-updates
Bruno Turcksin [Tue, 27 Jun 2017 14:36:53 +0000 (10:36 -0400)]
Merge pull request #4553 from bangerth/style-updates

Update for style.

7 years agoUpdate for style. 4553/head
Wolfgang Bangerth [Tue, 27 Jun 2017 12:55:07 +0000 (06:55 -0600)]
Update for style.

7 years agoMerge pull request #4550 from jppelteret/tw_solver_ad_01
Bruno Turcksin [Tue, 27 Jun 2017 12:39:10 +0000 (08:39 -0400)]
Merge pull request #4550 from jppelteret/tw_solver_ad_01

Use inheritance for TrilinosWrappers iterative solver AdditionalData.

7 years agoAdd change log entry for the incompatibilities
Daniel Arndt [Tue, 27 Jun 2017 12:28:57 +0000 (14:28 +0200)]
Add change log entry for the incompatibilities

7 years agoFixup timer
Daniel Arndt [Fri, 23 Jun 2017 22:55:34 +0000 (00:55 +0200)]
Fixup timer

7 years agoMerge pull request #4551 from bangerth/dofhandler-cleanup-3
Wolfgang Bangerth [Tue, 27 Jun 2017 03:45:49 +0000 (21:45 -0600)]
Merge pull request #4551 from bangerth/dofhandler-cleanup-3

hp::DoFHandler cleanups.

7 years agoUse std::unique_ptr in hp::DoFHandler. 4551/head
Wolfgang Bangerth [Mon, 26 Jun 2017 23:43:47 +0000 (17:43 -0600)]
Use std::unique_ptr in hp::DoFHandler.

This replaces raw pointers. A similar change was made last week to the ::DoFHandler
class already.

7 years agoProbably the smallest cleanups ever.
Wolfgang Bangerth [Mon, 26 Jun 2017 23:42:56 +0000 (17:42 -0600)]
Probably the smallest cleanups ever.

7 years agoMerge pull request #4548 from kronbichler/fix_compiler_warning
Denis Davydov [Mon, 26 Jun 2017 20:46:01 +0000 (22:46 +0200)]
Merge pull request #4548 from kronbichler/fix_compiler_warning

Avoid warning about uninitialized variable.

7 years agoUse inheritance for TrilinosWrappers iterative solver AdditionalData. 4550/head
Jean-Paul Pelteret [Mon, 26 Jun 2017 20:40:28 +0000 (22:40 +0200)]
Use inheritance for TrilinosWrappers iterative solver AdditionalData.

The AdditionalData structures for the various TrilinosWrappers solver
classes are now derived from that of SolverBase.

7 years agoMerge pull request #4547 from bangerth/dofhandler-cleanup-2
Martin Kronbichler [Mon, 26 Jun 2017 19:38:24 +0000 (21:38 +0200)]
Merge pull request #4547 from bangerth/dofhandler-cleanup-2

Last DoFHandlerPolicy updates for now.

7 years agoAvoid warning about uninitialized variable. 4548/head
Martin Kronbichler [Mon, 26 Jun 2017 19:32:55 +0000 (21:32 +0200)]
Avoid warning about uninitialized variable.

7 years agoDo not derive the ParallelShared policy from the Sequential one. 4547/head
Wolfgang Bangerth [Mon, 26 Jun 2017 07:34:02 +0000 (01:34 -0600)]
Do not derive the ParallelShared policy from the Sequential one.

The derivation was slightly contrived, but is not in fact useful any more since
the code has been refactored in ways that allow breaking the derivation and
just calling in ParallelShared what is also called in Sequential. In fact, the
code may have even become a bit shorter that way.

7 years agoParallelize the action of the update_all_*_cell_dof_indices_caches() functions.
Wolfgang Bangerth [Mon, 26 Jun 2017 12:44:57 +0000 (06:44 -0600)]
Parallelize the action of the update_all_*_cell_dof_indices_caches() functions.

7 years agoRefactor some code.
Wolfgang Bangerth [Mon, 26 Jun 2017 07:04:49 +0000 (01:04 -0600)]
Refactor some code.

Specifically, break out those places where we update the cell DoF index
caches into two separate functions.

7 years agoMerge pull request #4546 from bangerth/dofhandler-cleanup-2
Martin Kronbichler [Mon, 26 Jun 2017 08:20:13 +0000 (10:20 +0200)]
Merge pull request #4546 from bangerth/dofhandler-cleanup-2

More DoFHandlerPolicy cleanups.

7 years agoMerge pull request #4545 from bangerth/index-set-cleanup
Denis Davydov [Mon, 26 Jun 2017 07:10:45 +0000 (09:10 +0200)]
Merge pull request #4545 from bangerth/index-set-cleanup

Reindent and reformat parts of index_set.h.

7 years agoRemove an argument to a function that was no longer used. 4546/head
Wolfgang Bangerth [Mon, 26 Jun 2017 05:43:34 +0000 (23:43 -0600)]
Remove an argument to a function that was no longer used.

Specifically, it allowed to start enumerating DoFs at something other than zero.
There was a time when we allowed that, but that possibility was removed
several years ago.

The corresponding argument to distribute_mg_dofs() was removed a few days ago,
but it was accidently left on distribute_dofs().

7 years agoSimplify code by using new NumberCache constructors.
Wolfgang Bangerth [Sat, 24 Jun 2017 08:22:40 +0000 (02:22 -0600)]
Simplify code by using new NumberCache constructors.

7 years agoIntroduce new constructors for NumberCache.
Wolfgang Bangerth [Sat, 24 Jun 2017 08:22:25 +0000 (02:22 -0600)]
Introduce new constructors for NumberCache.

7 years agoReindent and reformat parts of index_set.h. 4545/head
Wolfgang Bangerth [Sun, 25 Jun 2017 02:17:26 +0000 (20:17 -0600)]
Reindent and reformat parts of index_set.h.

No functional changes, just beautify the contents of this file somewhat.

7 years agoMerge pull request #4543 from bangerth/complete-index-set
Martin Kronbichler [Sun, 25 Jun 2017 12:42:10 +0000 (14:42 +0200)]
Merge pull request #4543 from bangerth/complete-index-set

Compress the result of complete_index_set().

7 years agoMerge pull request #4538 from bangerth/dofhandler-cleanup
Martin Kronbichler [Sun, 25 Jun 2017 12:41:11 +0000 (14:41 +0200)]
Merge pull request #4538 from bangerth/dofhandler-cleanup

Further DoFHandlerPolicy cleanups.

7 years agoMerge pull request #4544 from bangerth/suppress-warning
Denis Davydov [Sun, 25 Jun 2017 07:22:12 +0000 (09:22 +0200)]
Merge pull request #4544 from bangerth/suppress-warning

Suppress a warning.

7 years agoSuppress a warning. 4544/head
Wolfgang Bangerth [Sun, 25 Jun 2017 01:42:37 +0000 (19:42 -0600)]
Suppress a warning.

The compiler warns about the line
  header_ += gzip::magic::id2;                   // ID2.
deep in BOOST when writing the header for a gzip-compressed block of data. This
is because (i) gzip::magic::id2 is declared as an int, and (ii) has a value
greater than what a *signed char* can store, i.e., greater than 127. Furthermore,
std::string::operator+ takes a 'char', which may or may not be unsigned but
apparently on my system is signed. So we get a warning about overflow.

The only reasonable way to deal with this is to do the casting explicitly.

7 years agoAdd a changelog entry. 4543/head
Wolfgang Bangerth [Sun, 25 Jun 2017 01:32:18 +0000 (19:32 -0600)]
Add a changelog entry.

7 years agoCompress the result of complete_index_set().
Wolfgang Bangerth [Sun, 25 Jun 2017 01:32:02 +0000 (19:32 -0600)]
Compress the result of complete_index_set().

7 years agoMerge pull request #4542 from drwells/attain-vs-obtain
Bruno Turcksin [Sat, 24 Jun 2017 21:40:56 +0000 (17:40 -0400)]
Merge pull request #4542 from drwells/attain-vs-obtain

Grammar: clarify obtain vs. attain.

7 years agoGrammar: clarify obtain vs. attain. 4542/head
David Wells [Sat, 24 Jun 2017 14:35:27 +0000 (10:35 -0400)]
Grammar: clarify obtain vs. attain.

Attain and obtain are nearly, but not quite, synonyms: 'attain' implies
achievement or accomplishment while 'obtain' just implies
ownership. This patch fixes our errant usage of 'attain' (one comment
also had a logic error, which I fixed).

7 years agoMerge pull request #4541 from kronbichler/fix_tests
Bruno Turcksin [Fri, 23 Jun 2017 19:48:43 +0000 (15:48 -0400)]
Merge pull request #4541 from kronbichler/fix_tests

Fix test output for two tests

7 years agoAdd another output file for Trilinos 12.10. 4541/head
Martin Kronbichler [Fri, 23 Jun 2017 17:51:13 +0000 (19:51 +0200)]
Add another output file for Trilinos 12.10.

7 years agoAdjust test output.
Martin Kronbichler [Fri, 23 Jun 2017 17:50:30 +0000 (19:50 +0200)]
Adjust test output.

7 years agoConvert the final policy function. 4538/head
Wolfgang Bangerth [Fri, 23 Jun 2017 15:52:20 +0000 (09:52 -0600)]
Convert the final policy function.

Also let the renumber_dofs() functions return the NumberCache, rather than
doing so via a reference argument. No drama this time.

7 years agoRemove an argument to a function that was no longer used.
Wolfgang Bangerth [Fri, 23 Jun 2017 15:05:42 +0000 (09:05 -0600)]
Remove an argument to a function that was no longer used.

Specifically, it allowed to start enumerating DoFs at something other than zero.
There was a time when we allowed that, but that possibility was removed
several years ago.

7 years agoMerge pull request #4458 from nfehn/master
Martin Kronbichler [Fri, 23 Jun 2017 14:59:37 +0000 (16:59 +0200)]
Merge pull request #4458 from nfehn/master

Initialization of Chebyshev smoother

7 years agoLet DoFHandler policy classes return the NumberCache also in distribute_mg_dofs().
Wolfgang Bangerth [Fri, 23 Jun 2017 14:58:16 +0000 (08:58 -0600)]
Let DoFHandler policy classes return the NumberCache also in distribute_mg_dofs().

This follows the same pattern as a previous commit. However, it involves less
drama, with the exception of an innocent assertion that had to be removed
(see the last commit). Other than that, everything seems to work.

7 years agoRemove an assertion in 3 related functions.
Wolfgang Bangerth [Fri, 23 Jun 2017 14:56:10 +0000 (08:56 -0600)]
Remove an assertion in 3 related functions.

The assertion gets in the way of the following commit because it tests
a condition that at the time when we want to call this function is not
yet satisfied. However, I've convinced myself that if the DoFHandler
is truly not set up at all (as the assertion wants to check), that
the calls further down in the function will fail to work as well. In
other words, one will get *some* kind of error.

7 years agooutput of tests adjusted 4458/head
Niklas Fehn [Fri, 23 Jun 2017 13:36:56 +0000 (15:36 +0200)]
output of tests adjusted

7 years agoLet the DoFHandler policy classes' distribute_dofs() return the NumberCache.
Wolfgang Bangerth [Fri, 23 Jun 2017 13:09:53 +0000 (07:09 -0600)]
Let the DoFHandler policy classes' distribute_dofs() return the NumberCache.

In times of move operators, there is really no reason why these functions should
return the NumberCache object by reference, rather than by value. We make this
slightly more efficient by providing (defaulted) move operations to
NumberCache.

However, this change uncovered a subtle problem that sooner or later would
certainly have tripped someone up: If any of the policy classes call
any function that relies on the correctness of the number cache of the
DoFHandler object being worked on, then this is likely going to fail.
Indeed, the implementation of distribute_dofs() for shared triangulations
has this problem by calling some of the DoFTools functions that query
properties of the DoFHandler that aren't all completely consistent
yet internally.

This happened to work -- more or less by design -- because the
NumberCache object that the DoFHandler passes to distribute_dofs()
by reference is the one that belongs to the DoFHandler, and
distribute_dofs() makes sure that it sets the one member that is
necessary to the correct value before calling the DoFTools function.
This can only properly be described as 'brittle': small changes to
the code will make this fail, and it is not obvious why this works
or doesn't.

The only proper solution, obviously, is to not call external functions
from inside distribute_dofs() until all data structures have been set
up completely and are internally consistent. I work around this
by duplicating a small amount of code (specifically, the
DoFTools::get_subdomain_association() and DoFRenumbering::subdomain_wise()
functions), but this effort is made more palatable because these functions
are in fact more general than we need here, and we can throw away a good
amount of code that deals with either sequential or completely
distributed DoFHandlers; we also know that a couple of assertions
in these functions must be satisfied here, so we can eliminate them
as well.

The consequence of this code is slightly more code that is more robust
and contains fewer surprises.

7 years agoMerge pull request #4539 from drwells/add-material-id-glossary-link
Wolfgang Bangerth [Fri, 23 Jun 2017 01:41:27 +0000 (20:41 -0500)]
Merge pull request #4539 from drwells/add-material-id-glossary-link

Add a glossary link for material_id.

7 years agoAdd a glossary link for material_id. 4539/head
David Wells [Thu, 22 Jun 2017 21:20:43 +0000 (17:20 -0400)]
Add a glossary link for material_id.

7 years agoDon't just store references, but SmartPointer objects.
Wolfgang Bangerth [Thu, 22 Jun 2017 15:34:23 +0000 (09:34 -0600)]
Don't just store references, but SmartPointer objects.

This ensures that we get an error if the referenced object is deleted first.

7 years agoLet the DoFHandler policy classes store references to the DoFHandler.
Wolfgang Bangerth [Thu, 22 Jun 2017 15:17:14 +0000 (09:17 -0600)]
Let the DoFHandler policy classes store references to the DoFHandler.

This is rather than passing this reference to each and every call to the policy functions.

The primary goal of this is so that we can use the Policy base class not only for the
'normal' DoFHandler, but also for the hp::DoFHandler by removing the reference to the
actual class type from the interface of the base class.

7 years agoImplement an empty, virtual destructor via '=default'.
Wolfgang Bangerth [Thu, 22 Jun 2017 14:48:02 +0000 (08:48 -0600)]
Implement an empty, virtual destructor via '=default'.

7 years agoMerge pull request #4534 from bangerth/dofhandler-cleanup-3
Martin Kronbichler [Thu, 22 Jun 2017 12:44:55 +0000 (14:44 +0200)]
Merge pull request #4534 from bangerth/dofhandler-cleanup-3

Deprecate (hp::)DoFHandler::invalid_dof_index.

7 years agoMerge branch 'master' into dofhandler-cleanup-3 4534/head
Wolfgang Bangerth [Thu, 22 Jun 2017 02:07:02 +0000 (21:07 -0500)]
Merge branch 'master' into dofhandler-cleanup-3

7 years agoMerge pull request #4536 from bangerth/dofhandler-cleanup-7
Daniel Arndt [Wed, 21 Jun 2017 15:35:14 +0000 (17:35 +0200)]
Merge pull request #4536 from bangerth/dofhandler-cleanup-7

Use a cheaper call.

7 years agoDeprecate (hp::)DoFHandler::invalid_dof_index.
Wolfgang Bangerth [Tue, 20 Jun 2017 08:17:04 +0000 (02:17 -0600)]
Deprecate (hp::)DoFHandler::invalid_dof_index.

Also replace all uses by numbers::invalid_dof_index. I can't see a reason to
have both of these numbers, in particular because the only logical choice is
to have them have the same value.

7 years agoUse a cheaper call. 4536/head
Wolfgang Bangerth [Wed, 21 Jun 2017 14:01:23 +0000 (08:01 -0600)]
Use a cheaper call.

The functions in question take an IndexSet argument that can either mean
something, or if it is empty, is ignored. In the places where an empty
IndexSet is passed, it actually has size zero, not just zero elements,
but in the existing code, we test whether 'indices.n_elements()==0'.
It turns out that 'n_elements()' is a pretty expensive function to call.
What we really wanted, of course, was 'indices.size()==0', and this
patch makes that change.

I ran all multigrid tests (the functions in question are multigrid
related), and they all succeed.


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.