ENDIF()
#
- # Trilinos has to be configured with 32bit indices if deal.II uses unsigned long
- # long int.
+ # Trilinos has to be configured with 32bit indices if deal.II uses unsigned int.
#
IF(TRILINOS_WITH_NO_32BIT_INDICES AND NOT DEAL_II_WITH_64BIT_INDICES)
MESSAGE(STATUS "deal.II was configured to use 32bit global indices but "
MACRO(CHECK_MPI_INTERFACE _feature _var)
IF(DEAL_II_WITH_MPI)
+
SET(_nope FALSE)
FOREACH(_library ${${_feature}_LIBRARIES})
- IF(_library MATCHES "/libmpi[^/]*\\.so")
- LIST(FIND MPI_LIBRARIES "${_library}" _position)
- IF("${_position}" STREQUAL "-1")
+ IF( _library MATCHES "/libmpi(|_cxx)\\.(a|so)[^/]*$")
+
+ GET_FILENAME_COMPONENT(_file1 ${_library} REALPATH)
+
+ SET(_not_found TRUE)
+ FOREACH(_mpi_library ${MPI_LIBRARIES})
+ GET_FILENAME_COMPONENT(_file2 ${_mpi_library} REALPATH)
+ IF("${_file1}" STREQUAL "${_file2}")
+ SET(_not_found FALSE)
+ BREAK()
+ ENDIF()
+ ENDFOREACH()
+
+ IF(_not_found)
SET(_nope TRUE)
- SET(_mpi_library ${_library})
+ SET(_spurious_library ${_library})
BREAK()
ENDIF()
ENDIF()
"Could not find a sufficient ${_feature} installation:\n"
"${_feature} has to be compiled against the same MPI library as deal.II "
"but the link line of ${_feature} contains:\n"
- " ${_mpi_library}\n"
+ " ${_spurious_library}\n"
"which is not listed in MPI_LIBRARIES:\n"
" MPI_LIBRARIES = \"${_str}\"\n"
)
SET(_tmp_${_variable} ${${_variable}})
SET(${_variable} "")
FOREACH(_lib ${_tmp_${_variable}})
- IF(_lib MATCHES "lib(c|quadmath|gfortran|m|rt|nsl|dl|pthread).so$")
+ IF(_lib MATCHES "lib(c|quadmath|gfortran|m|rt|nsl|dl|pthread)\\.(a|so)$")
string(REGEX REPLACE ".*lib([a-z]+).so$" "\\1" _lib ${_lib})
ENDIF()
LIST(APPEND ${_variable} ${_lib})
SET(Boost_USE_STATIC_LIBS TRUE)
ENDIF()
+LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
FIND_PACKAGE(Boost 1.44 COMPONENTS iostreams serialization system thread)
+LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
#
# Fall back to dynamic libraries if no static libraries could be found:
CXX_FLAGS OPTIONAL MPI_CXX_COMPILE_FLAGS
LINKER_FLAGS OPTIONAL MPI_CXX_LINK_FLAGS
CLEAR
- MPI_MPI_H
- MPI_HEADER_PATH
- MPI_LIB
- MPIEXEC
- MPI_CXX_COMPILER
MPI_C_COMPILER
+ MPI_CXX_COMPILER
+ MPIEXEC
+ MPI_EXTRA_LIBRARY
MPI_Fortran_COMPILER
+ MPI_HEADER_PATH
+ MPI_LIB
+ MPI_LIBRARY
+ MPI_MPI_H
)
FILE(STRINGS "${PETSC_PETSCVARIABLES}" PETSC_EXTERNAL_LINK_LINE
REGEX "^PETSC_WITH_EXTERNAL_LIB =.*")
+
SEPARATE_ARGUMENTS(PETSC_EXTERNAL_LINK_LINE)
SET(_hints)
SET(_petsc_libraries)
SET(_cleanup_variables)
- FOREACH(_token ${PETSC_EXTERNAL_LINK_LINE}})
+ FOREACH(_token ${PETSC_EXTERNAL_LINK_LINE})
IF(_token MATCHES "^-L")
# Build up hints with the help of all tokens passed with -L:
STRING(REGEX REPLACE "^-L" "" _token "${_token}")
# Search for every library that was specified with -l:
STRING(REGEX REPLACE "^-l" "" _token "${_token}")
- LIST(APPEND _cleanup_variables PETSC_LIBRARY_${_token})
+ IF(NOT _token MATCHES "(petsc|stdc\\+\\+|gcc_s|clang_rt)")
+ LIST(APPEND _cleanup_variables PETSC_LIBRARY_${_token})
- IF(_token MATCHES "^(c|quadmath|gfortran|m|rt|nsl|dl|pthread)$")
- FIND_SYSTEM_LIBRARY(PETSC_LIBRARY_${_token} NAMES ${_token})
- IF(NOT PETSC_LIBRARY_${_token} MATCHES "-NOTFOUND")
- LIST(APPEND _petsc_libraries ${PETSC_LIBRARY_${_token}})
+ IF(_token MATCHES "^(c|quadmath|gfortran|m|rt|nsl|dl|pthread)$")
+ FIND_SYSTEM_LIBRARY(PETSC_LIBRARY_${_token} NAMES ${_token})
+ ELSE()
+ DEAL_II_FIND_LIBRARY(PETSC_LIBRARY_${_token}
+ NAMES ${_token}
+ HINTS ${_hints}
+ )
ENDIF()
- ELSEIF(NOT _token MATCHES "(petsc|stdc\\+\\+|gcc_s)")
- DEAL_II_FIND_LIBRARY(PETSC_LIBRARY_${_token}
- NAMES ${_token}
- HINTS ${_hints}
- )
IF(NOT PETSC_LIBRARY_${_token} MATCHES "-NOTFOUND")
LIST(APPEND _petsc_libraries ${PETSC_LIBRARY_${_token}})
ENDIF()
+
ENDIF()
ENDIF()
MESSAGE("-- CTEST_SITE: ${CTEST_SITE}")
IF( "${TRACK}" STREQUAL "Regression Tests"
- AND NOT CTEST_SITE MATCHES "tester" )
+ AND NOT CTEST_SITE MATCHES "^(simserv04|tester)$" )
MESSAGE(FATAL_ERROR "
I'm sorry ${CTEST_SITE}, I'm afraid I can't do that.
The TRACK \"Regression Tests\" is not for you.
# Umm, no valid subversion info was found, try again with git-svn:
FIND_PACKAGE(Git QUIET)
IF(GIT_FOUND)
- EXECUTE_PROCESS(
- COMMAND ${GIT_EXECUTABLE} svn info
- WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
- OUTPUT_VARIABLE _svn_WC_INFO
- RESULT_VARIABLE _result
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
+ GET_FILENAME_COMPONENT(_path "${CTEST_SOURCE_DIRECTORY}" PATH)
+ IF(EXISTS ${_path}/.git/svn)
+ EXECUTE_PROCESS(
+ COMMAND ${GIT_EXECUTABLE} svn info
+ WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
+ OUTPUT_VARIABLE _svn_WC_INFO
+ RESULT_VARIABLE _result
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
- IF(${_result} EQUAL 0)
- STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
- "\\2" _svn_WC_URL "${_svn_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
- "\\2" _svn_WC_ROOT "${_svn_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
- "\\2" _svn_WC_REVISION "${_svn_WC_INFO}")
- STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
- "\\2" _svn_WC_LAST_CHANGED_DATE "${_svn_WC_INFO}")
- ELSE()
- SET(_svn_WC_INFO)
+ IF(${_result} EQUAL 0)
+ STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
+ "\\2" _svn_WC_URL "${_svn_WC_INFO}")
+ STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
+ "\\2" _svn_WC_ROOT "${_svn_WC_INFO}")
+ STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
+ "\\2" _svn_WC_REVISION "${_svn_WC_INFO}")
+ STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
+ "\\2" _svn_WC_LAST_CHANGED_DATE "${_svn_WC_INFO}")
+ ELSE()
+ SET(_svn_WC_INFO)
+ ENDIF()
ENDIF()
ENDIF()
ENDIF()
<head>
<link href="screen.css" rel="StyleSheet">
<title>deal.II Authors</title>
- <meta name="copyright" content="Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II Authors">
+ <meta name="copyright" content="Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 by the deal.II Authors">
<meta name="date" content="$Date$">
<meta name="keywords" content="deal.II">
<meta name="svn_id" content="$Id$">
<body>
<h1>deal.II Authors</h1>
- <p>
- <acronym>deal.II</acronym> is a global project. It is
- administered by a group of <i>principal
- developers</i>. Technical decisions are made by the principal
- developers and a group of <i>developers</i> consisting of
- long-term contributors with a global overview of the library. A
- large number of <i>contributors</i> have provided substantial
- patches over the years.
- </p>
- <p>
- These three groups are listed below.
- </p>
-
-
- <h2>Principal developers</h2>
- <ul>
- <li>
- <a href="http://www.math.tamu.edu/~bangerth"
- target="_top">Wolfgang Bangerth</a>,
- Texas A&M University, TX, USA
- </li>
-
- <li>
- <a href="http://www.math.clemson.edu/~heister"
- target="_top">Timo Heister</a>,
- Clemson University, SC, USA
- </li>
-
- <li>
- <a href="http://www.iwr.uni-heidelberg.de/groups/MathSim/"
- target="_top">Guido Kanschat</a>,
- Universität Heidelberg, Germany
- </li>
- </ul>
-
-
- <h2>Developers</h2>
- <ul>
- <li>
- <a href="http://people.sissa.it/~heltai/"
- target="_top">Luca Heltai</a>,
- SISSA, Trieste, Italy
- </li>
-
- <li>
- <a href="http://www.lnm.mw.tum.de/en/staff/martin-kronbichler/"
- target="_top">Martin Kronbichler</a>,
- Technische Universität München, Germany
- </li>
-
- <li>
- <a href="http://ganymed.iwr.uni-heidelberg.de/~maier/"
- target="_top">Matthias Maier</a>,
- Universität Heidelberg, Germany
- </li>
-
- <li>
- <a href="http://www.math.tamu.edu/~turcksin"
- target="_top">Bruno Turcksin</a>,
- Texas A&M University, TX, USA
- </li>
-
- <li>
- <a href="http://bluebox.ippt.pan.pl/~tyoung/"
- target="_top">Toby D. Young</a>,
- Polish Academy of Sciences, Poland
- </li>
-
- </ul>
-
-
-
-
- <h2>Contributors</h2>
-
- <p>Many people have contributed to deal.II over the years, some of them very
- substantial parts of the library. Their work
- is greatly appreciated: no open source project can survice without a
- community. The following people contributed major parts
- of the library (in alphabetical order), with many more that have
- sent in fixes and small enhancements:
- </p>
-
- <ul>
- <li><em>Moritz Allmaras:</em>
- Step-29 tutorial program.
-
- <li><em>Fahad Alrashed:</em>
- work in PETScWrappers, various other fixes.
-
- <li><em>Michael Anderson:</em>
- Linear complexity grid reordering algorithm in 2d and 3d.
-
- <li><em>Andrea Bonito:</em>
- Step-38.
-
- <li><em>Markus Bürg:</em>
- Conical meshes and geometries; step-45 tutorial program;
- VectorTools::project_boundary_values_curl_conforming; MUMPS
- interface, FE_Nedelec for arbitrary polynomial degrees.
-
- <li><em>Daniel Arndt:</em>
- FE_Q_DG0 element, ConstraintMatrix fixes, linear algebra, periodicity, bug fixes.
-
- <li><em>Juan Carlos Araujo Cabarcas:</em>
- Work on ARPACK.
-
- <li><em>John Burnell:</em>
- Configuration on Microsoft Windows systems.
-
- <li><em>Brian Carnes:</em>
- Hierarchical finite element classes;
- random fixes and enhancements.
-
- <li><em>Jordan Cazamias:</em>
- Work on tools for testing. Linear algebra.
-
- <li><em>Ivan Christov:</em>
- Step-25 tutorial program.
-
- <li><em>Chih-Che Chueh:</em>
- Step-43 tutorial program. Bug fixes.
-
- <li><em>Denis Davydov:</em>
- FEValuesExtractors::Tensor and associated functionality, bug fixes, various other changes.
-
- <li><em>Kevin Dugan:</em>
- Fixes in VectorTools::interpolate.
-
- <li><em>Marco Engelhard:</em>
- Better support for output for Paraview.
-
- <li><em>Jörg Frohne:</em>
- step-41. Fixes in many places.
-
- <li><em>Thomas Geenen:</em>
- Support for different geometries.
-
- <li><em>Martin Genet:</em>
- Make SparseDirectUMFPACK work with block matrices.
-
- <li><em>Christian Goll:</em>
- Abstraction of material and boundary indicators. Enhancements in
- various places.
-
- <li><em>Alexander Grayver:</em>
- Fixes in PETScWrappers.
-
- <li><em>Felix Gruber:</em>
- Documentation.
-
- <li><em>Ralf Hartmann:</em>
- Ralf was one of the original developers and maintainers of the library until
- 2011. He has written significant chunks of code throughout the library.
-
- <li><em>Eric Heien:</em>
- HDF5 output.
-
- <li><em>Bärbel Janssen:</em>
- Lots of work on multigrid for adaptive meshes; multigrid in the
- MeshWorker framework; step-16. Various fixes.
-
- <li><em>Armin Ghajar Jazi:</em>
- Small fixes.
-
- <li><em>Xing Jin:</em>
- step-24 tutorial program.
-
- <li><em>Oliver Kayser-Herold:</em>
- Lots of work on hp finite elements;
- integration of PETSc's LU decomposition;
- hanging node constraints for higher order elements in 3d.
-
- <li><em>Seungil Kim:</em>
- Help on the step-16 tutorial program.
-
- <li><em>Benjamin Shelton Kirk:</em>
- Tecplot output.
-
- <li><em>Angela Klewinghaus:</em> FE_TraceQ, a family of face
- elements which are the traces of H<sup>1</sup>-conforming
- finite elements.
-
- <li><em>Katharina Kormann:</em>
- Support for arbitrary nodes in FE_Q. Matrix-free
- framework. step-37 and step-48 tutorial programs.
-
- <li><em>Oleh Krehel:</em>
- Documentation fixes, small fixes.
-
- <li><em>Tobias Leicht:</em>
- Lots of work on internal data structures: anisotropic refinement
- (including step-30), faces
- without level,
- support for previously unorientable meshes;
- extension of DataOut to higher order mapping functions; DataPostprocessor;
- GridIn::read_tecplot;
- made SolutionTransfer independent of Triangulation::user_pointers;
- random bug fixes and enhancements.
-
- <li><em>Yan Li:</em>
- step-21 tutorial program.
-
- <li><em>Vijay Mahadevan:</em>
- Enhancements in the interface to PETSc. Support for reading GMSH
- 2.5 format.
-
- <li><em>Cataldo Manigrasso:</em>
- Work on the codimension-one meshes, DoFHandler, and finite
- elements.
-
- <li><em>Andrew McBride:</em>
- FEValues extractors for symmetric tensors. step-44.
-
- <li><em>Craig Michoski:</em>
- Periodic boundaries
-
- <li><em>Scott Miller:</em>
- Enhancements to FE_Nothing, step-51, many smaller fixes.
-
- <li><em>Helmut Müller:</em>
- Multiprocessor detection on Mac OS X.
-
- <li><em>Jose Javier Munoz Criollo:</em>
- Improvements in PETScWrappers.
-
- <li><em>Stefan Nauber:</em>
- Postscript output.
-
- <li><em>David Neckels:</em>
- step-33 tutorial program.
-
- <li><em>M. Sebastian Pauletti:</em>
- Making meshes embedded in higher space dimensions more usable; many
- bug fixes and enhancements for codimension-one computations and
- throughout the library.
-
- <li><em>Jean-Paul Pelteret:</em>
- step-44, linear algebra, bug fixes.
-
- <li><em>Jonathan Pitt:</em>
- Enhancements to FE_Nothing. Changes in a variety of places.
-
- <li><em>Adam Powell IV:</em>
- Configuration issues, Debian packages.
-
- <li><em>Florian Prill:</em>
- Gauss Lobatto quadrature, random bug fixes.
-
- <li><em>Andreas Putz:</em>
- GridIn::read_vtk().
-
- <li><em>Daniel Castanon Quiroz:</em>
- Torus domain and boundary.
-
- <li><em>Michael Rapson:</em>
- PointValueHistory class.
-
- <li><em>Thomas Richter:</em>
- Povray output;
- multi-threading work;
- refinement functions;
- MinRes linear solver.
-
- <li><em>Mayank Sabharwal:</em>
- GridIn::read_vtk().
-
- <li><em>Abner Salgado-Gonzalez:</em>
- step-35 tutorial program. Other fixes.
-
- <li><em>Anna Schneebeli:</em>
- Help and advice for Nedelec elements, writing the excellent
- report on Nedelec elements.
-
- <li><em>Jan Schrage:</em>
- Initial parts of the tutorial.
-
- <li><em>Ralf B. Schulz:</em>
- Support for DLLs on Windows systems.
-
- <li><em>Jason Sheldon:</em>
- More generic FESystems. Enhancements in a variety of places.
-
- <li><em>Michael Stadler:</em>
- Reading 3d data in UCD, accepting boundary data in 3d;
-
- Eulerian mappings.
-
- <li><em>Martin Steigemann:</em>
- Graphical user interface for the ParameterHandler
- class. ParaSails preconditioner. Functionality in various
- places of the library.
-
- <li><em>Franz-Theo Suttmeier:</em>
- Initial parts of the linear algebra libraries.
-
- <li><em>Habib Talavatifard:</em>
- Bug fixes in the Trilinos interfaces.
-
- <li><em>Christophe Trophime:</em>
- Packaging and configuration issues.
-
- <li><em>Kainan Wang:</em>
- Extending deal.ii for 64-bit integer support.
-
- <li><em>Yaqi Wang:</em>
- The step-28 tutorial program;
-
- some grid generation functions.
-
- <li><em>Sven Wetterauer:</em>
- Step-15 tutorial program.
-
- <li><em>Joshua White:</em>
- Arbitrary order Eulerian mappings.
-
- <li><em>Christian Wülker:</em>
- GridOut::write_svg.
-
- <li><em>Yuhan Zhou:</em>
- Input to the curved boundary example in step-49.
- </ul>
-
-
- <p>
- deal.II draws from some ideas which were first implemented in the
- predecessor library,
- DEAL, developed by Guido Kanschat, Franz-Theo
- Suttmeier, and Roland Becker. It has also benefitted from
- knowing about DiffPack, a library developed in Norway in the
- 1990s.
- </p>
-
- <hr />
- <address>
- <a href="authors.html" target="body">The deal.II Authors</a>
- $Date$
- </address>
- <div class="right">
- <a href="http://validator.w3.org/check?uri=referer" target="_top">
- <img style="border:0" src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
- <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_top">
- <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
- </div>
+ <body>
+ This page is now part of the top-level project description. See
+ <a target="_top" href="http://dealii.org/authors.html">this page</a>.
+ </body>
</body>
</html>
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<title>The deal.II Online Documentation</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<link href="screen.css" rel="StyleSheet" type="text/css">
- <meta name="copyright" content="Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by the deal.II Authors">
+ <meta name="copyright" content="Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 by the deal.II Authors">
<meta name="date" content="2006/02/07 22:49:01">
<meta name="keywords" content="deal.II">
<meta name="svn_id" content="$Id$">
<br>
<hr />
<address>
- <a href="authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
// ---------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2005 - 2013 by the deal.II authors
+// Copyright (C) 2005 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
@@MAP@@
* @enddot
*
- * Legend:<br />
- * <b>Green octagons:</b> programs that show basic techniques;<br />
- * <b>Orange boxes:</b> advanced techniques;<br />
- * <b>Yellow:</b> applications in fluid dynamics;<br />
- * <b>Light blue:</b> applications in solid mechanics;<br />
- * <b>Dark blue boxes:</b> time dependent problems.
+ * <b>Legend:</b><br />
+ * <blockquote>
+ * <i>Green:</i> programs that show basic techniques; <br />
+ * <i>Orange:</i> advanced techniques; <br />
+ * <i>Yellow:</i> applications in fluid dynamics; <br />
+ * <i>Light blue:</i> applications in solid mechanics; <br />
+ * <i>Dark blue:</i> time dependent problems.
+ * </blockquote>
*
* <a name="list"></a>
* <h3>Tutorial programs listed by number</h3>
* Step-31,
* Step-32,
* Step-33,
- * Step-40,
* Step-42,
* Step-43
* </td>
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<head>
<title>The deal.II License</title>
<link href="screen.css" rel="StyleSheet">
- <meta name="copyright" content="Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2011, 2012, 2013 by the deal.II Authors">
+ <meta name="copyright" content="Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2011, 2012, 2013, 2014 by the deal.II Authors">
<meta name="date" content="$Date$">
<meta name="svn_id" content="$Id$">
<meta name="keywords" content="deal.II license">
<p>
<b>However, <acronym>deal.II</acronym> is not in the public domain, it
is property of and copyrighted by the
- <a href="authors.html"><acronym>deal.II</acronym> Authors</a>, and
+ <a href="http://www.dealii.org/authors.html" target="_top"><acronym>deal.II</acronym> Authors</a>, and
there are restrictions on its use:</b>
The legally binding license is the <a href="#license-text">GNU Lesser
General Public License</a> (LGPL) as published by the Free Software
In this document, as well as in the program files, the terms
<i>authors of <acronym>deal.II</acronym></i> and
<i><acronym>deal.II</acronym> authors</i> generally refer to all
- people mentioned at the <a href="authors.html">deal.II Authors</a>
+ people mentioned at the <a href="http://www.dealii.org/authors.html" target="_top">deal.II Authors</a>
page.
</p>
<hr />
<address>
- <a href="authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<head>
<title>deal.II Communications</title>
<link href="screen.css" rel="StyleSheet">
- <meta name="copyright" content="Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011, 2012, 2013 by the deal.II Authors">
+ <meta name="copyright" content="Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011, 2012, 2013, 2014 by the deal.II Authors">
<meta name="date" content="$Date$">
<meta name="svn_id" content="$Id$">
<meta name="keywords" content="deal.II">
<hr />
<address>
- <a href="authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<head>
<title>deal.II navigation bar</title>
<link href="screen.css" rel="StyleSheet">
- <meta name="copyright" content="Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013 by the deal.II Authors">
+ <meta name="copyright" content="Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014 by the deal.II Authors">
<meta name="date" content="2006/02/07 22:49:06">
<meta name="svn_id" content="$Id$">
</head>
<b><small>Online Resources</small></b>
<p>
<a href="https://code.google.com/p/dealii/wiki/FrequentlyAskedQuestions" target="_top">FAQ</a><br />
- <a href="news/news.html" target="body">News</a><br />
+ <a href="http://www.dealii.org/news.html" target="_top">News</a><br />
<a href="http://www.dealii.org/download/" target="body">Download</a><br />
<a href="http://www.dealii.org/mail.html" target="body">Mailing list</a><br />
<a href="https://code.google.com/p/dealii/w/list" target="_top">Wiki</a><br />
<p>
<a href="reports/index.html" target="body">Reports</a><br />
<a href="publications/index.html" target="body">Publications</a><br />
- <a href="authors.html" target="body">Authors</a> <br />
+ <a href="http://www.dealii.org/authors.html" target="_top">Authors</a> <br />
<a href="license.html" target="body">License</a> <br />
<a href="mail.html" target="body">Contact</a>
</p>
<h3>Specific improvements</h3>
<ol>
-<li> New: AnyData::try_read() is a function that allows users to check
-whether an entry exists and get a pointer to it without throwing an
-exception in case of failure.
-<br>
-(Guido Kanschat, 2014/05/16)
-</li>
-
-<li> New: The GMRES solver of deal.II can now write an estimate of
+ <li> Bugfix: Filter libclang_rt* from the PETSc link line.
+ <br>
+ (Matthias Maier, 2014/06/04)
+ </li>
+
+ <li> Improved: ParameterHandler parsing added to DoFOutputOperator
+ <br>
+ (Guido Kanschat, 2014/06/03)
+ </li>
+
+ <li> Improved: ThetaTimestepping and other operators now use AnyData
+ to communicate with operators they rely on. This way, time step data
+ can be forwarded using the same mechanism, and no complicated back
+ access to member data is required
+ anymore. MeshWorker::IntegrationInfo uses AnyData as well.
+ <br>
+ (Guido Kanschat, 2014/06/03)
+ </li>
+
+ <li> Bugfix: CMake: Also clean CMAKE_MODULE_PATH prior to call to
+ FIND_PACKAGE(Boost) inside FindBOOST.cmake because apparently
+ "Boost" == "BOOST" for the Mac file system...
+ <br>
+ (Matthias Maier, 2014/05/28)
+ </li>
+
+ <li> Improved: CMake: Search results and error conditions for external
+ libraries are now much more verbose. Added an MPI sanity check.
+ <br>
+ (Matthias Maier, 2014/05/28)
+ </li>
+
+ <li> Fixed: The MatrixTools::apply_boundary_values() variant that works
+ on PETSc matrices could produce a deadlock in parallel if one processor
+ had no boundary values to apply. This is now fixed.
+ <br>
+ (Michal Wichrowski, 2014/05/19)
+ </li>
+
+ <li> New: AnyData::try_read() is a function that allows users to check
+ whether an entry exists and get a pointer to it without throwing an
+ exception in case of failure.
+ <br>
+ (Guido Kanschat, 2014/05/16)
+ </li>
+
+ <li> New: The GMRES solver of deal.II can now write an estimate of
eigenvalues to the log file, in analogy to the CG solver. This is enabled
- by the flag SolverGMRES<>::AdditionalData::compute_eigenvalues.
+ by the flag SolverGMRES::AdditionalData::compute_eigenvalues.
<br>
(Martin Kronbichler, 2014/05/11)
</li>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
+ "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<head>
- <title>The deal.II news page</title>
+ <head>
+ <title>The deal.II news page</title>
- <link href="../screen.css" rel="StyleSheet">
+ <link href="../screen.css" rel="StyleSheet">
- <meta name="copyright" content="Copyright (C) 2000 - 2013 by the deal.II Authors">
- <meta name="date" content="$Date$">
- <meta name="keywords" content="deal.II">
- <meta name="svn_id" content="$Id$">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="copyright" content="Copyright (C) 2000 - 2014 by the deal.II Authors">
+ <meta name="date" content="$Date$">
+ <meta name="keywords" content="deal.II">
+ <meta name="svn_id" content="$Id$">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!- Include stylesheets ->
- <link href="/mockup/htdocs/css/bootstrap.min.css" type="text/css" rel="stylesheet"/>
- <link href="/mockup/htdocs/css/global.less" type="text/less" rel="stylesheet"/>
- <link href="/mockup/htdocs/css/index.less" type="text/less" rel="stylesheet"/>
+ <meta http-equiv="refresh" content="0;url=http://dealii.org/news.html">
- <!- LESS needs to come after the stylesheets ->
- <script src="/mockup/htdocs/js/less-1.4.1.min.js"></script>
-</head>
+ </head>
-<body>
-
-<!--#include virtual="/mockup/htdocs/header.include" -->
-
- <h2>News on <acronym>deal.II</acronym></h2>
-
- <p>
- This page lists news and announcements on
- <acronym>deal.II</acronym> in reverse chronological order. If you
- send us extensions to the library, please feel free to also send a
- patch to this file such that we can announce your contributions in
- your own words.
- </p>
-
- <p>
- Please refer to the archive of the <a target="_top"
- href="http://www.dealii.org/mail.html">deal.II
- mailing list</a> for additional news.
- </p>
-
-
- <p>
- <dt><strong>Recent changes</strong></dt>
- <dd>
- Changes in the library since the last major release are
- <strong><a href="../doxygen/deal.II/changes_after_8_1.html">here.</a></strong>
- </dd>
- </p>
-
-
- <dl>
- <dt>
- <strong style="color:red">2013/12/24: Version 8.1 released</strong>
- </dt>
- <dd>
- deal.II version 8.1 was released today. A full list of changes can be
- found <a href="../doxygen/deal.II/changes_between_8_0_and_8_1.html"
- target="body">here</a>.
- <br>
- deal.II can be downloaded at
- <a href="https://code.google.com/p/dealii/downloads/list"
- target="_top">this site</a>.
- </dd>
-
- <dt>
- <strong>2013/12/18: step-26 for the heat equation </strong>
- </dt>
- <dd>
- step-26 fills a long-standing gap: There was no tutorial
- program solving the heat equation. There was also no tutorial
- showing in relatively easy terms how to do adaptive meshes
- in time dependent problems. This program fills both of these
- needs.
- </dd>
-
- <dt>
- <strong>2013/11/01: step-42 solves an elasto-plastic contact problem </strong>
- </dt>
- <dd>
- step-42, written by Jörg Frohne, Timo Heister and Wolfgang
- Bangerth, shows how to solve an elasto-plastic contact problem.
- The program is an extension of step-41 to a much more complex
- equation (nonlinear elasto-plasticity) and also demonstrates
- how to compute solutions for such problems in parallel.
- </dd>
-
- <dt>
- <strong>2013/10/01: step-51 implements an HDG method </strong>
- </dt>
- <dd>
- step-51, contributed by Martin Kronbichler and Scott Miller,
- implements a hybridized discontinuous Galerkin method for the scalar
- convection-diffusion equation. The method uses standard DG terms for
- describing the element interior but couples the local sub-problems
- using face elements. The local contribution is eliminated from the
- global linear system by a static condensation process.
- </dd>
-
- <dt>
- <strong style="color:red">2013/07/24: Version 8.0 released</strong>
- </dt>
- <dd>
- deal.II version 8.0 was released today. This is a major new
- release, featuring the conversion of the configuration and
- build system to <a href="http://www.cmake.org/">CMake</a>,
- support for parallel computations with more than 4 billion
- unknowns, and many more. A full list of changes can be
- found <a href="../doxygen/deal.II/changes_between_7_3_and_8_0.html"
- target="body">here</a>.
- <br>
- deal.II can be downloaded at
- <a href="https://code.google.com/p/dealii/downloads/list"
- target="_top">this site</a>.
- </dd>
-
- <dt>
- <strong>2013/06/05: 64-bit version of deal.II</strong>
- </dt>
- <dd>
- Because the global dof index variables in deal.II were of type
- unsigned int, it was not possible to create a dof_handler with more than
- 4.3 billions of unknowns. The 64-bit version of deal.II uses unsigned long
- long int and thus, allows for 18e18 unknowns.
- </dd>
-
-
- <dt>
- <strong>2013/03/07: Build system switched to CMake</strong>
- </dt>
- <dd>
- After having used Autoconf as the configuration and build system
- since the beginning of deal.II in 1997, we have now switched to
- <a href="http://www.cmake.org/">CMake</a>. This implementation,
- contributed by Matthias Maier of Heidelberg University, has taken
- more than half a year, consists of more than 10,000 lines, and
- touches every aspect of the installation process. It provides a more
- modern interface to and more reliable way of interacting with other
- packages. Furthermore, it no longer relies on shell scripts and
- therefore integrates more easily with integrated development
- environments as well as Microsoft Windows without Cygwin.
- </dd>
-
- <dt>
- <strong style="color:red">2013/02/27: Version 7.3 released</strong>
- </dt>
- <dd>
- Version 7.3.0 was released today. This release provides one new
- tutorial, work on parallel linear algebra, the new FE_Q_DG0 element,
- and a large number of enhancements and bug fixes throughout the
- entire library. A complete list of new features is
- found <a href="../doxygen/deal.II/changes_between_7_2_and_7_3.html"
- target="body">here</a>.
- </dd>
-
- <dt>
- <strong style="color:red">2012/09/03: Version 7.2 released</strong>
- </dt>
- <dd>
- Version 7.2.0 was released today. This release provides four
- new tutorial programs, a framework for matrix-free
- computations, and a large number of enhancements and bug fixes
- throughout the entire library. A complete list of new
- features is found <a
- href="../doxygen/deal.II/changes_between_7_1_and_7_2.html" target="body">here</a>.
- </dd>
-
-
- <dt>
- <strong>2012/06/06: step-43 — an efficient solver for
- two-phase flow</strong>
- </dt>
- <dd>
- The step-21 tutorial program was the first program in the
- deal.II tutorial to demonstrate the solution of two-phase flow
- problems, but it suffered from the fact that it was very
- slow. step-43 demonstrates some of the techniques that can be
- used to make solvers for such problems more efficient and
- accurate.
- </dd>
-
-
- <dt>
- <strong>2012/06/03: New step-15</strong>
- </dt>
- <dd>
- Step-15 used to be a program that demonstrated techniques for solving
- a rather quirky, nonlinear, 1d problem. It was an interesting problem,
- but it served little purpose in teaching deal.II or in demonstrating
- nonlinear solution techniques. It has now been replaced by a more
- illustrative example, contributed in large part by Sven Wetterauer, in
- which we solve the nonlinear elliptic minimal surface equation using a
- Newton iteration.
- </dd>
-
-
- <dt>
- <strong>2012/05/05: Matrix-free implementation framework</strong>
- </dt>
- <dd>
- A matrix-free framework has been contributed by Katharina
- Kormann and Martin Kronbichler. The implementation is memory
- efficient and includes parallelism via MPI for distributed
- meshes, threads for shared-memory computations, and usage of
- processors' vector units. The two new tutorial programs step-37
- (multigrid solver) and step-48 (nonlinear wave equation with
- distributed grid) demonstrate the new features.
- </dd>
-
-
- <dt>
- <strong>2012/04/02: step-44 — a finite strain
- elasticity solver</strong>
- </dt>
- <dd>
- step-44, contributed by Andrew McBride and Jean-Paul
- Pelteret, demonstrates one approach to modelling large
- deformations of nearly-incompressible elastic solids. The
- elastic response is governed by a non-linear, hyperelastic
- free-energy function. The geometrical response is also
- nonlinear, i.e., the program considers finite deformations.
- </dd>
-
-
- <dt>
- <strong>2012/04/02: step-41 solves the obstacle problem</strong>
- </dt>
- <dd>
- step-41, a program contributed by Jörg Frohne, shows
- how to solve the obstacle problem. This problem describes
- the deformation of a body subject to an inequality
- constraint that arises from the fact that the deformation is
- constrained by contact of the body with some external
- obstacle. The program uses the primal-dual active set method
- to solve this problem.
- </dd>
-
-
- <dt>
- <strong style="color:red">2011/10/09: Version 7.1 released</strong>
- </dt>
- <dd>
- Version 7.1.0 was released today. This release provides two
- new tutorial programs and many smaller enhancements
- throughout the entire library. A complete list of new
- features is found <a
- href="../doxygen/deal.II/changes_between_7_0_and_7_1.html" target="body">here</a>.
- </dd>
-
-
- <dt>
- <strong>2011/10/06: step-32, a massively parallel thermal
- convection solver</strong>
- </dt>
- <dd>
- Long in the making, the step-32 tutorial program
- demonstrates how to solve the Boussinesq equations
- describing thermal convection on large numbers of
- processors.
- </dd>
-
-
- <dt>
- <strong>2011/04/30: step-46 demonstrates coupling different models
- on different parts of the domain</strong>
- </dt>
- <dd>
- step-46 shows how to couple different models defined on subsets of
- the domain, in this case Stokes flow around an elastic solid. The
- trick here is that variables (here the flow velocity and pressure,
- and the solid displacement) do not live on the entire domain, but
- only on a part. The point of the program is how to represent this in
- source code.
- </dd>
-
-
- <dt>
- <strong style="color:red">2011/01/09: Version 7.0 released</strong>
- </dt>
- <dd>
- Version 7.0.0 was released today. This release is a huge step
- forward, with several significant new features such as support for
- thousands or tens of thousands of processors. A complete list of new
- features is found <a
- href="../doxygen/deal.II/changes_between_6_3_and_7_0.html" target="body">here</a>.
- </dd>
-
-
- <dt>
- <strong>2011/01/02: step-38 shows how to solve partial differential
- equations on curved manifolds</strong>
- </dt>
- <dd>
- The new step-38 program, contributed by Andrea Bonito and M. Sebastian
- Pauletti, shows how to discretize and solve partial differential
- equations posed on curved manifolds embedded in higher dimensional
- spaces.
- </dd>
-
- <dt>
- <strong>2010/12/20: Graphical frontend to edit parameter files</strong>
- </dt>
- <dd>
- Contributed by Martin Steigemann, deal.II now has Qt based graphical
- user interface to edit input parameter files for
- the <code>ParameterHandler</code> class. The executable is located in
- <code>lib/bin/dealii_parameter_gui</code>.
- </dd>
-
- <dt>
- <strong>2010/10/25: New directory and library structure</strong>
- </dt>
- <dd>
- deal.II has had a somewhat quirky directory and library structure for
- historical reasons, but this has now changed: All include and source
- files are now under the top-level <code>include/</code>
- and <code>source</code> directories. Furthermore, we no longer build a
- plethora of libraries but only <code>libdeal_II.g.so</code> (debug
- version) and <code>libdeal_II.so</code> (optimized version). In
- particular, we no longer build different versions of the library for
- different space dimensions.
- </dd>
-
- <dt>
- <strong>2010/10/23: Distributed mesh functionality available</strong>
- </dt>
- <dd>
- After more than 2 years of work by Timo Heister, Martin Kronbichler,
- and Wolfgang Bangerth, and with help by Carsten Burstedde, we have
- merged a branch on which we have implemented the functionality
- necessary to distribute meshes on hundreds, thousands, or more
- processors. An overview of the framework
- in which this is implemented is presented in a documentation module,
- an accompanying paper, as well as in the new step-40 tutorial program.
- </dd>
-
- <dt>
- <strong style="color:red">2010/07/18: Version 6.3.1 released</strong>
- </dt>
- <dd>
- Version 6.3.1 was released today. This release addresses a number of
- problems in release 6.3.0 related to compatibility with certain
- compilers, operating systems, and versions of external libraries.
- A list of changes between
- versions 6.3.0 and 6.3.1 can be found <a
- href="../doxygen/deal.II/changes_between_6_3_0_and_6_3_1.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2010/06/25: deal.II on Facebook</strong>
- </dt>
- <dd>
- We built a facebook page titled <b>deal.II</b> today. Please, feel free
- to join us there!
- </dd>
-
- <dt>
- <strong style="color:red">2010/06/25: Version 6.3 released</strong>
- </dt>
- <dd>
- Version 6.3.0 was released today, containing several new
- tutorial programs, a new threading framework and a framework
- for assembling linear systems by just providing the local integrals.
- A complete list of changes between
- versions 6.2.0 and 6.3.0 can be found <a
- href="../doxygen/deal.II/changes_between_6_2_and_6_3.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2010/06/24: step-39 solves Poisson's equation with
- the interior penalty discontinuous Galerkin method on
- adaptively refined meshes with multigrid</strong>
- </dt>
- <dd>
- Using the MeshWorker framework, this program highlights the
- fact that loops over meshes are very generic and that
- building matrices and level matrices and evaluating error
- estimates are really the same task.
- </dd>
-
- <dt>
- <strong> 2010/06/24: The Meshworker framework has been released</strong>
- </dt>
- <dd>
- Using its generic loop and the provided auxiliary classes,
- this framework relieves the application programmer from coding
- loops over cells, faces, and subfaces, such that focus can remain
- on implementation of the local integrals.
- </dd>
-
- <dt>
- <strong>2010/06/23: step-45 shows periodic boundary
- conditions</strong>
- </dt>
- <dd>
- Contributed by Markus Bürg, the new tutorial program step-45
- demonstrates an often requested feature: periodic boundary
- conditions.
- </dd>
-
-
- <dt>
- <strong>2010/02/13: New multigrid, new step-16</strong>
- </dt>
- <dd>
- Over the last few months, the multigrid implementation has seen
- significant rewrites, with much of the work done by Bärbel
- Janssen. The goal — now achieved — was to finally fully
- support multigrid also for continuous finite elements on adaptively
- refined meshes (uniformly refined meshes and discontinuous elements
- have worked for a long time). As part of this process, step-16 has
- been rewritten and now solves the same problem step-6 solves, just
- with a multigrid solver.
- </dd>
-
-
- <dt>
- <strong>2009/10/07: step-35 shows the solution of the
- Navier-Stokes equations</strong>
- </dt>
- <dd>
- Step-35, a tutorial program contributed by Abner
- Salgado-Gonzalez, shows an implementation of a projection
- scheme for the numerical solution of the Navier-Stokes
- equations.
- </dd>
-
-
- <dt>
- <strong>2009/07/30: New tutorial program step-36</strong>
- </dt>
- <dd>
- The new step-36 tutorial program, contributed by Toby D. Young and
- Wolfgang Bangerth, shows how to solve eigenvalue problems, using the
- Schrödinger equation as an example.
- </dd>
-
-
- <dt>
- <strong style="color:red">2009/06/05: Version 6.2.1 released</strong>
- </dt>
- <dd>
- deal.II version 6.2.0 contained a couple of minor but
- annoying bugs in its interaction with PETSc. The
- documentation package also did not include any typeset
- formulas. Release 6.2.1 corrects these mistakes.
- A complete list of changes between
- versions 6.2.0 and 6.2.1 can be found <a
- href="../doxygen/deal.II/changes_between_6_2_0_and_6_2_1.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong style="color:red">2009/04/27: Version 6.2 released</strong>
- </dt>
- <dd>
- Version 6.2.0 was released today!
- A complete list of changes between
- versions 6.1.0 and 6.2.0 can be found <a
- href="../doxygen/deal.II/changes_between_6_1_and_6_2.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2009/04/14: New tutorial program step-34</strong>
- </dt>
- <dd>
- step-34, written by Luca Heltai, demonstrates the ability of
- deal.II to discretize and solve boundary integral equations
- on curved manifolds.
- </dd>
-
-
- <dt>
- <strong>2008/12/05: Support for meshes embedded in
- higher dimensions</strong>
- </dt>
- <dd>
- Based on work by Cataldo Manigrasso and Luca Heltai
- developed over the last few months on a branch, deal.II now
- supports meshes that are embedded in higher space
- dimensions. This allows, for example, to solve equations on
- the surface of a sphere (e.g. to use boundary element
- methods for exterior problems).
- </dd>
-
-
- <dt>
- <strong>2008/11/14: New tutorial program step-31</strong>
- </dt>
- <dd>
- The latest tutorial program, step-31, is contributed by
- Martin Kronbichler and Wolfgang Bangerth and shows the
- solution of the Boussinesq approximation to thermally driven
- convection in an incompressible fluid.
- </dd>
-
-
- <dt>
- <strong>2008/09/10: New tutorial program step-28</strong>
- </dt>
- <dd>
- step-28, contributed by Yaqi Wang, illustrates the solution
- of a coupled system of diffusion equations relevant to
- nuclear reactor physics where we use different meshes for
- different components of a vector-valued solution.
- </dd>
-
-
- <dt>
- <strong>2008/08/21: <acronym>deal.II</acronym> now exceeds
- of 400,000 lines of code</strong>
- </dt>
- <dd>
- Since today, <acronym>deal.II</acronym> has more than 400,000
- lines of code. The rate of growth continues to be close on
- par with the 3000 lines of code per month that we have had
- over many years already, with no signs of abating activity!
- </dd>
-
-
- <dt>
- <strong>2008/07/08: Support for anisotropic mesh refinement</strong>
- </dt>
- <dd>
- Contributed by Tobias Leicht as well as Ralf Hartmann, deal.II
- now supports anisotropic refinement of meshes. This functionality
- is explained in the step-30 tutorial program.
- </dd>
-
-
- <dt>
- <strong style="color:red">2008/05/28: Version 6.1 released</strong>
- </dt>
- <dd>
- Version 6.1.0 was released today!
- A complete list of changes between
- versions 6.0.0 and 6.1.0 can be found <a
- href="../doxygen/deal.II/changes_between_6_0_and_6_1.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2008/05/23: step-33 illustrates the Euler equations</strong>
- </dt>
- <dd>
- <a href="../doxygen/deal.II/step_33.html">step-33</a>,
- a tutorial program written mostly by David Neckels, illustrates how
- the Euler equations of compressible inviscid gas dynamics can be
- solved. More generally, the program also provides a framework for
- the solution of arbitrary hyperbolic, nonlinear conservation laws.
- </dd>
-
- <dt>
- <strong>2008/03/28: step-22 demonstrates solving the Stokes
- equations</strong>
- </dt>
- <dd>
- The new <a href="../doxygen/deal.II/step_22.html">step-22</a>
- tutorial program, written by Martin Kronbichler and Wolfgang
- Bangerth, shows how to solve, and in particular how to solve
- efficiently, the Stokes equations that describe viscous
- incompressible fluid flow.
- </dd>
-
- <dt>
- <strong>2007/10/31: step-29 tutorial program added</strong>
- </dt>
- <dd>
- Contributed by Moritz Allmaras, the <a
- href="../doxygen/deal.II/step_29.html">step-29</a> tutorial program
- explains how problems involving complex numbers can be treated in
- <acronym>deal.II</acronym>. In the example,
- the complex-valued solution to a Helmholtz equation is split into
- real and imaginary parts and a vector-valued finite element field
- is used to discretize them seperately. The program also demonstrates
- how quantities derived from the finite element solution can be directly
- included in the output by using the new <code>DataPostprocessor</code>
- class.
- </dd>
-
- <dt>
- <strong style="color:red">2007/09/07: Version 6.0 released</strong>
- </dt>
- <dd>
- Version 6.0.0 was released today!
- A complete and long list of changes between
- versions 5.2.0 and 6.0.0 can be found <a
- href="5.2.0-vs-6.0.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2007/08/09: step-27 demonstrates hp technology</strong>
- </dt>
- <dd>
- The new <a href="../doxygen/deal.II/step_27.html">step-27</a>
- tutorial program finally demonstrates how to use the
- hp finite element technology that has been part of deal.II for some
- 18 months now. It solves a Laplace equation with hp finite elements
- and shows how to set finite element degrees, assemble matrices on
- cells with varying polynomial degrees, and how to compute a simple
- criterion for estimating the local Sobolev smoothness of a function.
- </dd>
-
- <dt>
- <strong>2007/07/16: Wilkinson Prize</strong>
- </dt>
- <dd>
- The principal authors of <acronym>deal.II</acronym>—Wolfgang
- Bangerth, Ralf Hartmann and Guido Kanscht—have received the <a
- href="http://www.mcs.anl.gov/WilkinsonPrize/">J. H. Wilkinson
- Prize for Numerical Software</a> for their creation of and work on
- the deal.II library. The prize committee particularly noted the
- reliability and usability of the software and the quality of the
- documentation.
- <p>
- We want to take the opportunity to thank our user community for their
- support over the years that kept us working on this software. We
- consider this award motivation to continue this work!
- </dd>
-
- <dt>
- <strong>2007/02/09: Support for previously unorientable meshes</strong>
- </dt>
- <dd>
- Up to now, in 3D only 'orientable' meshes could be used in
- deal.II, where all lines are in standard orientation and the
- faces can be either in standard orientation or with a
- reversed normal. This has been generalized such that now all
- hexahedral meshes can be used.
- </dd>
-
- <dt>
- <strong>2006/10/30: step-21 is finished</strong>
- </dt>
- <dd>
- Step-21 demonstrates the time dependent flow of a multiphase fluid
- through a porous medium. It is an extension of step-20, using a mixed
- formulation and block solvers.
- </dd>
-
- <dt>
- <strong>2006/10/03: step-23/24/25 are finished</strong>
- </dt>
- <dd>
- The step-23, step-24 and step-25 tutorial programs have been added,
- demonstrating how to solve the time dependent wave equation
- and a nonlinear variant of it, the sine-Gordon equation.
- </dd>
-
- <dt>
- <strong>2006/08/24: <acronym>deal.II</acronym> is now part of the
- SPEC CPU 2006 benchmark</strong>
- </dt>
- <dd>
- A modified version of the <acronym>deal.II</acronym> library and the
- step-14 tutorial program has been incorporated into the industry
- standard <a href="http://www.spec.org/cpu2006/" target="_top">SPEC CPU 2006</a>
- benchmark testsuite that is used to determine the speed of
- computers. It is part of the floating point testsuite <a
- href="http://www.spec.org/cpu2006/CFP2006/" target="_top">CFP2006</a> as benchmark
- <a
- href="http://www.spec.org/cpu2006/Docs/447.dealII.html" target="_top">447.dealII</a>.
- <p>
- The inclusion of our software into an industry
- standard benchmark testsuite will lead to better support of compilers
- and machines for the kind of program we write, in particular for
- unstructured hierarchical mesh computations. This will in turn
- help make our codes run faster on future systems.
- </dd>
-
- <dt>
- <strong>2006/2/12: step-20 is finished</strong>
- </dt>
- <dd>
- The new step-20 tutorial program shows how to use Raviart-Thomas
- elements to solve a mixed formulation of the Laplace equation. It
- also demonstrates the use of block matrices and vectors, and how they
- can be used to define more complex solvers and preconditioners
- working on the Schur complement.
- </dd>
-
- <dt>
- <strong>2006/1/3-5: First User Workshop</strong>
- </dt>
- <dd>
- After 8 years of existence, it was time to have the first user
- meeting. During a 3-day workshop held in Heidelberg, topics of
- software development, use of deal.II for applications, and future
- directions were discussed by about a dozen developers and users.
- </dd>
-
- <dt>
- <strong>2005/12/20: hp functionality merged</strong>
- </dt>
- <dd>
- After the code had been developed and maintained on a branch for 3
- years by Oliver Kayser-Herold and Wolfgang Bangerth, it has now been
- merged into the main development, and will be available for the next
- release.
- </dd>
-
- <dt>
- <strong style="color:red">2005/09/17: Version 5.2 released</strong>
- </dt>
- <dd>
- Version 5.2.0 was released today!
- A complete and long list of changes between
- versions 5.1.0 and 5.2.0 can be found <a
- href="5.1.0-vs-5.2.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2005/09/09: Two more tutorial programs</strong>
- </dt>
- <dd>
- Two more tutorial programs, step-18 and step-19, are now
- available. step-18 shows how to solve time-dependent but quasi-static
- elasticity programs in parallel. step-19 demonstrates some data
- handling and parameter file techniques.
- </dd>
-
- <dt>
- <strong>2005/03/29: <acronym>deal.II</acronym> now has a Wiki</strong>
- </dt>
- <dd>
- Hosted by Luca Heltai, there is now a wiki. See the link from the
- <acronym>deal.II</acronym> front page. Users of
- <acronym>deal.II</acronym> are encouraged to visit it, and,
- as is usual with wikis, edit pages freely and post their
- experiences and code snippets they want others to know about.
- </dd>
-
- <dt>
- <strong>2005/03/07: Function parser library integrated</strong>
- </dt>
- <dd>
- Luca Heltai has contributed code that integrates a third
- party <a
- href="http://warp.povusers.org/FunctionParser/">function
- parser library</a>) that takes a string describing a
- mathematical function, and returns an object that can be used in
- all places where function objects are used in deal.II.
- </dd>
-
- <dt>
- <strong style="color:red">2004/12/24: Version 5.1 released</strong>
- </dt>
- <dd>
- Version 5.1.0 was released today!
- A complete and long list of changes between
- versions 5.0.0 and 5.1.0 can be found <a
- href="5.0.0-vs-5.1.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2004/10/21: Q<sub>r</sub> elements of arbitrary order now
- support hanging node constraints also in 3d</strong>
- </dt>
-
- <dd>
- Lagrange elements previously had hanging node constraint matrices
- hard coded in 3d, which were only available for r=1,2. Thanks to
- code written by Oliver Kayser-Herold, this information is now
- computed on-the-fly, which allows the use of Lagrange elements of
- arbitrary order also in 3d on meshes with hanging nodes.
- </dd>
-
- <dt>
- <strong>2004/05/25: Version 5.0 released</strong>
- </dt>
- <dd>
- Version 5.0.0 was released today!
- A complete and long list of changes between
- versions 4.0.0 and 5.0.0 can be found <a
- href="4.0.0-vs-5.0.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2004/03/08: Interfaces to PETSc and METIS</strong>
- </dt>
- <dd>
- In order to support parallel computations, we now have interfaces to
- both the PETSc library for sequential and parallel linear algebra,
- as well as to the METIS library for domain partitioning.
- </dd>
-
- <dt>
- <strong>2004/03/08: MIPSpro compiler version 7.41 supported</strong>
- </dt>
- <dd>
- deal.II now also supports compilation on SGIs by the MIPSpro
- compiler version 7.41.
- </dd>
-
- <dt>
- <strong>2003/06/06: Version 4.0 released</strong>
- </dt>
- <dd>
- After one year, we made it and released Version 4.0.0 today!
- A complete list of changes between
- versions 3.4.0 and 4.0.0 can be found <a
- href="3.4.0-vs-4.0.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2003/04/27: <acronym>deal.II</acronym> now exceeds
- of 200,000 lines of code</strong>
- </dt>
- <dd>
- Since today, <acronym>deal.II</acronym> has now more than 200,000
- lines of code. The rate of growth continues to be close to
- 3000 lines of code per month.
- </dd>
-
- <dt>
- <strong>2003/01/24: deal.II runs on AIX 5.1</strong>
- </dt>
- <dd>
- Using gcc3.2, deal.II can now also be compiled on AIX systems
- with the PowerPC chip.
- </dd>
-
- <dt>
- <strong>2002/12/18: deal.II runs on Mac OS X 10.2</strong>
- </dt>
- <dd>
- Some changes have been made to allow compiling and running deal.II on
- Mac OS X 10.2 systems.
- </dd>
-
- <dt>
- <strong>2002/12/05: Intel ICC 7.0 compiler supported</strong>
- </dt>
- <dd>
- deal.II now also supports compilation by the recently released
- Intel icc 7.0 compiler.
- </dd>
-
- <dt>
- <strong>2002/06/28: deal.II 64-bit ready</strong>
- </dt>
- <dd>
- deal.II also runs on 64-bit systems without changes, as
- tests on a Sparc machine with Solaris 9 in 64-bit mode have
- shown. We also have reports of people running deal.II on
- IA64 systems.
- </dd>
-
- <dt>
- <strong>2002/06/06: Version 3.4 released</strong>
- </dt>
- <dd>
- Today, version 3.4 of the <acronym>deal.II</acronym> library
- has been released. A complete list of changes between
- versions 3.3.0 and 3.4.0 can be found <a
- href="2002/3.3.0-vs-3.4.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2002/05/22: Intel ECC Itanium compiler now supported</strong>
- </dt>
- <dd>
- <code>aclocal.m4</code> has been changed to detect the Intel ECC
- compiler for Itanium systems. The ECC compiler can produce
- optimized code for Intel's new IA-64 architecture.
- </dd>
-
- <dt>
- <strong>2002/03/07: New web home www.dealii.org and new
- email addresses</strong>
- </dt>
- <dd>
- The <acronym>deal.II</acronym> homepage has been moved to <a
- href="http://www.dealii.org"
- target="_top">www.dealii.org</a>. Also the <a
- href="../mail.html">email addresses</a> have been
- changed. Though the old web home and the old addresses will
- be supported for some time we recommend to adjust the
- bookmarks and mail addresses accordingly.
- </dd>
-
- <dt>
- <strong>2002/02/01: Version 3.3 released</strong>
- </dt>
- <dd>
- Today, version 3.3 of the <acronym>deal.II</acronym> library
- has been released. A complete list of changes between
- versions 3.2.0 and 3.3.0 can be found <a
- href="2002/3.2.0-vs-3.3.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2002/01/31: <acronym>deal.II</acronym> now consists
- of 160,000 lines of code</strong>
- </dt>
- <dd>
- All <code>.cc</code> and <code>.h</code> files of
- <acronym>deal.II</acronym> now sum up to more than 160,000(!)
- lines of code. <acronym>deal.II</acronym> continues to grow
- with a rate almost constant at 3000 lines of code per month.
- </dd>
-
- <dt>
- <strong>2001/09/28: Version 3.2 released</strong>
- </dt>
- <dd>
- After a long phase of implementation and testing, we today
- released version 3.2 of the <acronym>deal.II</acronym>
- library. There are many changes between version 3.1 and
- release 3.2. A complete list of these changes can be found
- <a href="2001/3.1.0-vs-3.2.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2001/07/06: Compaq's cxx compiler supported</strong>
- </dt>
- <dd>
- The present development version now also supports
- compilation by Compaq's cxx compiler. See the <a
- href="../readme.html#prerequisites" target="body">ReadMe</a>
- file for more information on using this compiler.
- </dd>
-
- <dt>
- <strong>2001/06/28: deal.II 3.1.2 released</strong>
- </dt>
- <dd>
- Version 3.1.2 is a bug-fix release based on 3.1. A list of
- changes between the two versions can be found on
- <a href="2001/3.1.1-vs-3.1.2.html" target="body">this
- page</a>.
- </dd>
-
- <dt>
- <strong>2001/05/23: Intel ICC compiler supported</strong>
- </dt>
- <dd>
- The present development version of the library is now fixed
- so that it can also be compiled by
- Intel's ICC C++ compiler for Linux.
- </dd>
-
- <dt>
- <strong>2001/05/17: deal.II 3.1.1 released</strong>
- </dt>
- <dd>
- Version 3.1.1 is a bug-fix release based on 3.1. A list of
- changes between the two versions can be found on
- <a href="2001/3.1.0-vs-3.1.1.html" target="body">this
- page</a>.
- </dd>
-
- <dt>
- <strong>2001/02/26: Support for Subroutines from the Harwell Subroutine
- Library (HSL)</strong>
- </dt>
- <dd>
- The <a href="http://www.hsl.rl.ac.uk/"
- target="_top">Harwell Subroutine Library (HSL)</a> is a
- library that, among much other functionality, offers some
- sparse direct solvers. We have added support for an
- interface to these solvers to the library.
- </dd>
-
- <dt>
- <strong>2001/02/20: Version 3.1 released</strong>
- </dt>
- <dd>
- After a long testing phase, we today released version 3.1 of
- the <acronym>deal.II</acronym> library.
- There are many changes between version 3.0 and release
- 3.1. A complete list of these changes can be found
- <a href="2000/3.0.0-vs-3.1.0.html" target="body">here</a>.
- </dd>
-
- <dt>
- <strong>2000/08/07: deal.II 3.0.1</strong>
- </dt>
- <dd>
- Version 3.0.1 is a bug-fix release based on 3.0. A list of
- changes between the two versions can be found on
- <a href="2000/3.0.0-vs-3.0.1.html" target="body">this
- page</a>.
- (<a href="2000/03.html" target="body">Announcement</a>)
- </dd>
-
- <dt>
- <strong>2000/04/13: deal.II 3.0 announced</strong>
- </dt>
- <dd>
- Today, after 2½ years of development and testing, the
- first public release of the <acronym>deal.II</acronym>
- library was announced (<a href="2000/01.html"
- target="body">full text</a>).
- </dd>
- </dl>
-
-
-</body>
- <!- Some JQuery needs to come after the body ->
- <script src="js/jquery.min.js"></script>
- <script src="js/bootstrap.min.js"></script>
- <script src="js/accordion.js"></script>
+ <body>
+ This page is now part of the top-level project description. See
+ <a target="_top" href="http://dealii.org/news.html">this page</a>.
+ </body>
</html>
Lecture Notes in Computational Science and Engineering Volume 95, pp 57-73 , 2014.
</li>
+ <li> J. Sheldon, S. Miller, J. Pitt
+ <br>
+ <strong>Methodology for Comparing Coupling Algorithms for Fluid-Structure Interaction Problems</strong>
+ <br>
+ World Journal of Mathematics, vol. 4, pp. 54-70, 2014.
+ </li>
+
<li> M. Stoll
<br>
<strong>One-shot solution of a time-dependent time-periodic PDE-constrained optimization problem</strong>
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
</address>
<div class="right">
<a href="http://validator.w3.org/check?uri=referer" target="_top">
<title>The deal.II Readme</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link href="screen.css" rel="StyleSheet"/>
- <meta name="copyright" content="Copyright (C) 1998 - 2013 by the deal.II Authors"/>
+ <meta name="copyright" content="Copyright (C) 1998 - 2014 by the deal.II Authors"/>
<meta name="date" content="$Date$"/>
<meta name="svn_id" content="$Id$"/>
<meta name="keywords" content="deal.II"/>
in order to determine the directions of future work on the
library. We are also very much interested in incorporating any
work and bug fixes by third parties into the library. Of course,
- you will be credited for this on the <a href="authors.html">authors page</a>.
+ you will be credited for this on
+ the <a href="http://www.dealii.org/authors.html" target="_top">authors page</a>.
</p>
<p>
the license of the deal.II project granted to you.</b>
</li>
<li>
- We, <a href="authors.html">the deal.II Authors</a>, do not require
+ We, <a href="http://www.dealii.org/authors.html" target="_top">the deal.II Authors</a>, do not require
copyright assignments for contributions. This means that the
copyright for code contributions in the deal.II project is held by
its respective contributors who have each agreed to release their
<hr />
<address>
- <a href="authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
<title>deal.II Development Navigation Bar</title>
<link href="../screen.css" rel="StyleSheet">
<meta name="author" content="the deal.II authors <authors@dealii.org>">
- <meta name="copyright" content="Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012, 2013 by the deal.II authors">
+ <meta name="copyright" content="Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2012, 2013, 2014 by the deal.II authors">
<meta name="date" content="$Date$">
<meta name="svn_id" content="$Id$">
<meta http-equiv="content-language" content="en">
<b><small>Online Resources</small></b>
<p>
<a href="https://code.google.com/p/dealii/wiki/FrequentlyAskedQuestions" target="_top">FAQ</a><br />
- <a href="../news/news.html" target="body">News</a><br />
+ <a href="http://www.dealii.org/news.html" target="_top">News</a><br />
<a href="http://www.dealii.org/download/" target="body">Download</a><br />
<a href="http://www.dealii.org/mail.html" target="body">Mailing list</a><br />
<a href="https://code.google.com/p/dealii/w/list" target="_top">Wiki</a><br />
<hr />
<address>
- <a href="../authors.html" target="body">The deal.II Authors</a>
+ <a href="http://www.dealii.org/authors.html" target="_top">The deal.II Authors</a>
$Date$
</address>
<div class="right">
#
PATTERN "CMakeFiles*" EXCLUDE
PATTERN "doc*" EXCLUDE
- PATTERN "doxygen*" EXCLUDE
PATTERN ".svn*" EXCLUDE
#
# Glob Includes:
PATTERN "*.prm"
PATTERN "*.inp"
PATTERN "step*/CMakeLists.txt"
+ PATTERN "doxygen/CMakeLists.txt"
#
# Special files:
#
--- /dev/null
+##
+# CMake script for compiling the doxygen examples
+##
+
+# Usually, you will not need to modify anything beyond this point...
+
+FILE(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cc)
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+
+FIND_PACKAGE(deal.II 8.0 QUIET
+ HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
+ )
+IF(NOT ${deal.II_FOUND})
+ MESSAGE(FATAL_ERROR "\n"
+ "*** Could not locate deal.II. ***\n\n"
+ "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n"
+ "or set an environment variable \"DEAL_II_DIR\" that contains this path."
+ )
+ENDIF()
+
+DEAL_II_INITIALIZE_CACHED_VARIABLES()
+PROJECT(doxygen_examples)
+
+FOREACH(ccfile ${sources})
+ GET_FILENAME_COMPONENT(file ${ccfile} NAME_WE)
+ ADD_EXECUTABLE(${file} ${ccfile})
+ DEAL_II_SETUP_TARGET(${file})
+ENDFOREACH()
using namespace Algorithms;
-class Explicit
- : public Operator<Vector<double> >
+class Explicit : public Operator<Vector<double> >
{
public:
Explicit(const FullMatrix<double> &matrix);
- void operator() (NamedData<Vector<double>*> &out,
- const NamedData<Vector<double>*> &in);
+ void operator() (AnyData &out, const AnyData &in);
- void initialize_timestep_data(const TimestepData &);
private:
- const TimestepData *timestep_data;
SmartPointer<const FullMatrix<double>, Explicit> matrix;
FullMatrix<double> m;
};
-class Implicit
- : public Operator<Vector<double> >
+class Implicit : public Operator<Vector<double> >
{
public:
Implicit(const FullMatrix<double> &matrix);
- void operator() (NamedData<Vector<double>*> &out,
- const NamedData<Vector<double>*> &in);
-
- void initialize_timestep_data(const TimestepData &);
-private:
- const TimestepData *timestep_data;
+ void operator() (AnyData &out, const AnyData &in);
+
+ private:
SmartPointer<const FullMatrix<double>, Implicit> matrix;
FullMatrix<double> m;
};
int main()
{
FullMatrix<double> matrix(2);
- matrix(0,0) = 1.;
- matrix(1,1) = 1.;
- matrix(0,1) = 31.4;
- matrix(1,0) = -31.4;
+ matrix(0,0) = 0.;
+ matrix(1,1) = 0.;
+ matrix(0,1) = 3.14;
+ matrix(1,0) = -3.14;
OutputOperator<Vector<double> > out;
out.initialize_stream(std::cout);
Explicit op_explicit(matrix);
Implicit op_implicit(matrix);
ThetaTimestepping<Vector<double> > solver(op_explicit, op_implicit);
- op_explicit.initialize_timestep_data(solver.explicit_data());
- op_implicit.initialize_timestep_data(solver.implicit_data());
solver.set_output(out);
Vector<double> value(2);
value(0) = 1.;
- NamedData<Vector<double>*> indata;
- NamedData<Vector<double>*> outdata;
- Vector<double> *p = &value;
- outdata.add(p, "value");
+ AnyData indata;
+ AnyData outdata;
+ outdata.add(&value, "value");
solver.notify(Events::initial);
solver(outdata, indata);
void
-Explicit::initialize_timestep_data(const TimestepData &t)
-{
- timestep_data = &t;
-}
-
-
-void
-Explicit::operator() (NamedData<Vector<double>*> &out, const NamedData<Vector<double>*> &in)
+Explicit::operator() (AnyData &out, const AnyData &in)
{
+ const double timestep = *in.read_ptr<double>("Timestep");
if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size))
{
- m.equ(-timestep_data->step, *matrix);
+ m.equ(-timestep, *matrix);
for (unsigned int i=0; i<m.m(); ++i)
m(i,i) += 1.;
}
this->notifications.clear();
- unsigned int i = in.find("Previous iterate");
- m.vmult(*out(0), *in(i));
+ m.vmult(*out.entry<Vector<double>*>(0),
+ *in.read_ptr<Vector<double> >("Previous iterate"));
}
void
-Implicit::initialize_timestep_data(const TimestepData &t)
-{
- timestep_data = &t;
-}
-
-
-void
-Implicit::operator() (NamedData<Vector<double>*> &out, const NamedData<Vector<double>*> &in)
+Implicit::operator() (AnyData &out, const AnyData &in)
{
+ const double timestep = *in.read_ptr<double>("Timestep");
if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size))
{
- m.equ(timestep_data->step, *matrix);
+ m.equ(timestep, *matrix);
for (unsigned int i=0; i<m.m(); ++i)
m(i,i) += 1.;
m.gauss_jordan();
}
this->notifications.clear();
-
- unsigned int i = in.find("Previous time");
- m.vmult(*out(0), *in(i));
+ m.vmult(*out.entry<Vector<double>*>(0),
+ *in.read_ptr<Vector<double> >("Previous time"));
}
/* ---------------------------------------------------------------------
* $Id$
*
- * Copyright (C) 2003 - 2013 by the deal.II authors
+ * Copyright (C) 2003 - 2014 by the deal.II authors
*
* This file is part of the deal.II library.
*
// The following function extends what the corresponding one in step-6
// did, with the exception of also distributing the degrees of freedom on
// each level of the mesh which is needed for the multigrid hierarchy.
+ // We then output the number of degrees (globally and on each level) and
+ // reset the solution and right hand side vectors to the correct size.
+ // As in other programs where we use a sequence of meshes that become
+ // finer and finer (starting with step-5), the code as is here sets
+ // the solution vector to zero, rather than trying to interpolate the
+ // solution obtained on the previous mesh to the current one. This
+ // follows from the empirical observation that interpolating the solution
+ // and using it as a starting guess does not significant decrease the number
+ // of linear CG iterations one has to perform to solve a linear system.
+ // (The situation is very different for nonlinear problems, where using
+ // a previous time step's solution, or a solution from a coarser grid,
+ // typically drastically makes the solution of a nonlinear system cheaper.)
template <int dim>
void LaplaceProblem<dim>::setup_system ()
{
dof_handler.distribute_dofs (fe);
dof_handler.distribute_mg_dofs (fe);
- // Here we output not only the degrees of freedom on the finest level, but
- // also in the multilevel structure
- deallog << "Number of degrees of freedom: "
- << dof_handler.n_dofs();
-
- for (unsigned int l=0; l<triangulation.n_levels(); ++l)
- deallog << " " << 'L' << l << ": "
- << dof_handler.n_dofs(l);
- deallog << std::endl;
+ std::cout << " Number of degrees of freedom: "
+ << dof_handler.n_dofs()
+ << " (by level: ";
+ for (unsigned int level=0; level<triangulation.n_levels(); ++level)
+ std::cout << dof_handler.n_dofs(level)
+ << (level == triangulation.n_levels()-1
+ ? ")" : ", ");
+ std::cout << std::endl;
sparsity_pattern.reinit (dof_handler.n_dofs(),
dof_handler.n_dofs(),
setup_system ();
- std::cout << " Number of degrees of freedom: "
- << dof_handler.n_dofs()
- << " (by level: ";
- for (unsigned int level=0; level<triangulation.n_levels(); ++level)
- std::cout << dof_handler.n_dofs(level)
- << (level == triangulation.n_levels()-1
- ? ")" : ", ");
- std::cout << std::endl;
-
assemble_system ();
assemble_multigrid ();
href="../../readme.html" target="body">README</a> file.
-There is an additional caveat: PETSc appears not to co-operate well when using
-threads and the program crashes when deal.II is compiled in its usual mode
-supporting multithreading. The program can therefore only be compiled and run
-if multithreading is disabled upon configuration of deal.II using the
-<code>--disable-threads</code> switch to <code>./configure</code>.
-
Now, for the details: as mentioned, the program does not compute anything new,
so the use of finite element classes etc. is exactly the same as before. The
simulation.
-@note PETSc appears not to co-operate well when using
-threads and the program crashes when deal.II is compiled in its usual mode
-supporting multithreading. The program can therefore only be compiled and run
-if multithreading is disabled upon configuration of deal.II using the
-<code>--disable-threads</code> switch to <code>./configure</code>.
threads. For example, if your cluster nodes have 8 cores as they often have at
the time of writing this, and if your batch scheduler puts 8 MPI processes on
each node, then using threads doesn't make the program any
-faster. Consequently, you probably want to use the
-<code>--disable-threads</code> flag when configuring your deal.II installation
-for this machine. On the other hand, if you want to run this program on a
-single multicore machine, then it may make sense to use threads. That said, at
+faster. Consequently, you probably want to either configure your deal.II without threads, or set the number of threads in MPI_InitFinalize to 1 (third argument), or "export DEAL_II_NUM_THREADS=1" before running.
+That said, at
the time of writing this, we only use the WorkStream class for assembling
(parts of) linear systems, while 75% or more of the run time of the program is
spent in the linear solvers that are not parallelized — in other words,
preconditioner package implementing algebraic multigrid; it can be
installed as part of PETSc but has to be explicitly enabled during
PETSc configuration; see the page linked to from the installation
-instructions for PETSc. Finally, note that
-PETSc appears not to co-operate well when using
-threads and the program crashes when deal.II is compiled in its usual mode
-supporting multithreading. The program can therefore only be compiled and run
-if multithreading is disabled upon configuration of deal.II using the
-<code>--disable-threads</code> switch to <code>./configure</code>.
+instructions for PETSc.
<a name="Intro"></a>
This program shows how to use Runge-Kutta methods to solve a time-dependent
problem.
-<h3>Problem statement<h3>
+<h3>Problem statement</h3>
-In this example, we solve the energy-integrated time-dependent diffusion
+In this example, we solve the one-group time-dependent diffusion
approximation of the neutron transport equation (see step-28 for the
time-independent multigroup diffusion). We assume that the medium is not
fissible and therefore, the neutron flux satisfies the following equation:
- \Sigma_a(x) \phi(x,t) + S(x,t)
@f}
augmented by appropriate boundary conditions. Here, $v$ is the velocity of
-neutrons, $D$ is the diffusion coefficient, $\Sigma_a$ is the <i>absorption
-cross section</i>, and $S$ is a source. Because we are only interested in the
-time dependence, we assume that $D$ and $\Sigma_a$ are constant. In this
-example, we are only interested in the error in time and thus, we are looking
-for a solution of the form:
+neutrons (for simplicity we assume it is equal to 1), $D$ is the diffusion coefficient,
+$\Sigma_a$ is the absorption cross section, and $S$ is a source. Because we are
+only interested in the time dependence, we assume that $D$ and $\Sigma_a$ are
+constant. We are looking for a solution on a square domain $[0,b]\times[0,b]$ of
+the form:
@f{eqnarray*}
\phi(x,t) = A\sin(\omega t)(bx-x^2).
@f}
-By using quadratic finite elements, we will not have any spatial error. We
-impose the following boundary conditions: homogeneous Dirichlet fo $x=0$ and
+By using quadratic finite elements, all the error will be due to the time discretization. We
+impose the following boundary conditions: homogeneous Dirichlet for $x=0$ and
$x=b$ and homogeneous Neumann conditions for $y=0$ and $y=b$. The source is
given by:
@f{eqnarray*}
S=A\left(\frac{1}{v}\omega \cos(\omega t)(bx -x^2) + \sin(\omega t)
\left(\Sigma_a (bx-x^2)+2D\right) \right).
@f}
-Because the solution is a sine, we know that
-\f$\phi\left(x,\frac{\pi}{\omega}\right) = 0$. Therefore, we can easily
-compute the error at this time since it is simply the norm of the solution
-found.
+Because the solution is a sine, we know that $\phi\left(x,\pi\right) = 0$.
+Therefore, the error at this time is simply the norm of the numerical solution.
<h3>Runge-Kutta</h3>
-The Runke-Kutta methods implemented in deal.II assume that the equation to be
+The Runge-Kutta methods implemented in deal.II assume that the equation to be
solved can be written as:
@f{eqnarray*}
\frac{dy}{dt} = f(t,y).
@f}
where
@f{eqnarray*}
-k_i = h M^{-1} f(t_n+c_ih,y_n+\sum_{j=1}^sa_{ij}k_j)
+k_i = h M^{-1} f\left(t_n+c_ih,y_n+\sum_{j=1}^sa_{ij}k_j\right)
@f}
-with $a_{ij}$, $b_i$, and $c_i$ are known coefficient and $h$ is the time step
-used. The methods currently implemented in deal.II can be divided in three
-categories:
+where $a_{ij}$, $b_i$, and $c_i$ are known coefficients and $h$ is the time step
+used. At the time of the writing of this tutorial, the methods implemented in
+deal.II can be divided in three categories:
<ol>
<li> explicit Runge-Kutta
<li> embedded (or adaptive) Runge-Kutta
</ol>
<h4>Explicit Runge-Kutta</h4>
-These methods that include for forward Euler, third order Runge-Kutta, and
-fourth order Runge-Kutta, require a function to evaluate $M^{-1}f(t,y). These
+These methods that include forward Euler, third order Runge-Kutta, and
+fourth order Runge-Kutta, require a function to evaluate $M^{-1}f(t,y)$. These
methods become unstable when the time step chosen is too large.
<h4>Embedded Runge-Kutta</h4>
These methods include Heun-Euler, Bogacki-Shampine, Dormand-Prince (ode45 in
Matlab), Fehlberg, and Cash-Karp. These methods use a low order method to
-estimate the error and decide if the time step needs to be refined or it can be
-coarsen. Only embedded explicit methods have been implemented so far.
+estimate the error and decide if the time step needs to be refined or coarsen.
+Only embedded explicit methods have been implemented at the time of the writing.
<h4>Implicit Runge-Kutta</h4>
-These methods include backward Euler, implicit midpoint, Crank-Nicolson, and the
+These methods include backward Euler, implicit midpoint, Crank-Nicolson, and a
two stages SDIRK. These methods require to evaluate $M^{-1}f(t,y)$ and
-$\left(I-\Delta t M^{-1} \frac{\partial f}{\partial Y}\right) = \left(M - \Delta
-t \frac{\partial f}{\partial y}\right)^{-1} M$. These methods are always stable.
+$\left(I-\Delta t M^{-1} \frac{\partial f}{\partial y}\right)^{-1}$ or equivalently
+$\left(M - \Delta t \frac{\partial f}{\partial y}\right)^{-1} M$. These methods are
+always stable.
+
+<h3>Weak form</h3>
+To use the Runge-Kutta methods, we need to be able to evaluate:
+@f{eqnarray*}
+f = \oint D b_i \frac{\partial b_j}{\partial n} d\boldsymbol{r} - \int D \nabla
+b_i \nabla b_j \phi_j d\boldsymbol{r} -\int \Sigma_a b_i b_j \phi_j
+d\boldsymbol{r} + \int b_j S d\boldsymbol{r}
+@f}
+and $\frac{\partial f}{\partial y}$. Because $f$ is linear in $y$ (or $\phi$ in
+this case) $\frac{\partial f}{\partial y} y = f$.
<h3>Remarks</h3>
-To simplify the problem, we solve the domain in two dimensional and the mesh is
+To simplify the problem, the domain is two dimensional and the mesh is
uniform (there is no need to adapt the mesh since we use quadratic finite
elements and the exact solution is quadratic). Going from a two dimensional
domain to a three dimensional domain is not very challenging. However if the
-mesh must be adapted, we cannot forget to:
+mesh must be adapted, it is important to remember to:
<ol>
<li> project the solution to the new mesh when the mesh is changed. The mesh
used should be the same at the beginning and at the end of the time step.
<h1>Results</h1>
-The output of this program consist of the console output and solutions given in
+The output of this program consists of the console output and the solutions given in
vtu format.
The console output is:
Number of steps done: 200
@endcode
-Like expected the high-order methods give a more accurate solutions. We see that
+Like expected the high-order methods give a more accurate solution. We see that
the Heun-Euler method adapted the number of time steps in order to satisfy the
tolerance. The others embedded methods did not need to change the number of time
steps.
// @sect3{Include files}
-// The first task as usal is to include the functionality of these well-known
+// The first task as usual is to include the functionality of these well-known
// deal.II library files and some C++ header files.
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
public:
Diffusion();
+ // This function is the driver that will call the other functions.
void run();
private:
// the time.
void assemble_system();
- // Compute the intensity of the source at the given point.
+ // Compute the intensity of the source at a given time for a given point.
double get_source(double time,const Point<2> &point) const;
- // Evaluate the diffusion equation \f$M^{-1}(f(t,y))\f$
+ // Evaluate the diffusion equation $M^{-1}(f(t,y))$ at a given time and
+ // for a given y.
Vector<double> evaluate_diffusion(const double time, const Vector<double> &y) const;
- // Evaluate \f$\left(I-\tau M^{-1} \frac{\partial f(t,y)}{\partial y}\right)^{-1} =
- // \left(M-\tau \frac{\partial f}{\partial y}\right)^{-1} M \f$
- Vector<double> id_minus_tau_J_inverse(const double time, const double tau,
- const Vector<double> &y);
+ // Evaluate $\left(I-\tau M^{-1} \frac{\partial f(t,y)}{\partial y}\right)^{-1}$ or
+ // equivalently $\left(M-\tau \frac{\partial f}{\partial y}\right)^{-1} M$ at a given
+ // time, for a given $\tau$ and y.
+ Vector<double> id_minus_tau_J_inverse(const double time,
+ const double tau,
+ const Vector<double> &y);
- // Output the results as vtu
+ // Output the results as vtu files.
void output_results(unsigned int time_step,TimeStepping::runge_kutta_method method) const;
- // Driver for the explicit methods
+ // Driver for the explicit methods.
void explicit_method(TimeStepping::runge_kutta_method method,
const unsigned int n_time_steps,
const double initial_time,
const double final_time);
- // Driver for the implicit methods
+ // Driver for the implicit methods.
void implicit_method(TimeStepping::runge_kutta_method method,
const unsigned int n_time_steps,
const double initial_time,
const double final_time);
- // Driver for the embedded explicit methods. Returns the number of steps
+ // Driver for the embedded explicit methods. This function returns the number of steps
// executed.
unsigned int embedded_explicit_method(TimeStepping::runge_kutta_method method,
const unsigned int n_time_steps,
const double final_time);
+ // The next parameters are self-explanatory.
unsigned int fe_degree;
double diffusion_coefficient;
- // We choose quadratic finite elements so that there are no spatial error.
+ // We choose quadratic finite elements and we initialize the parameters.
Diffusion::Diffusion()
:
fe_degree(2),
+ // @sect5{<code>Diffusion::setup_system</code>}
void Diffusion::setup_system()
{
dof_handler.distribute_dofs(fe);
DoFTools::make_sparsity_pattern(dof_handler,c_sparsity,constraint_matrix);
sparsity_pattern.copy_from(c_sparsity);
+ // Initialize the matrices and the solution vector.
system_matrix.reinit(sparsity_pattern);
mass_matrix.reinit(sparsity_pattern);
mass_minus_tau_Jacobian.reinit(sparsity_pattern);
+ // @sect5{<code>Diffusion::assemble_system</code>}
void Diffusion::assemble_system()
{
system_matrix = 0.;
cell = dof_handler.begin_active(),
endc = dof_handler.end();
- // Compute \f$-\int D \nabla b \cdot \nabla b - \int \Sigma_a b b\f$ and \f$\int b b\f$
+ // Compute $-\int D \nabla b_i \cdot \nabla b_j d\boldsymbol{r} - \int \Sigma_a b_i b_j d\boldsymbol{r}$
+ // and the mass matrix $\int b_i b_j d\boldsymbol{r}$.
for (; cell!=endc; ++cell)
{
cell_matrix = 0.;
+ // @sect5{<code>Diffusion::get_source</code>}
+ //
+ // Compute the source for a given time and a given point.
double Diffusion::get_source(double time,const Point<2> &point) const
{
const double pi = 3.14159265358979323846;
+ // @sect5{<code>Diffusion:evaluate_diffusion</code>}
+ //
+ // Evaluate the weak form of the diffusion equation at a given time t and for a given vector y.
Vector<double> Diffusion::evaluate_diffusion(const double time, const Vector<double> &y) const
{
Vector<double> tmp(dof_handler.n_dofs());
tmp = 0.;
- // Compute system_matrix*y
+ // Compute $tmp=system\_matrix\cdot y$.
system_matrix.vmult(tmp,y);
-
- // Compute the source term
const QGauss<2> quadrature_formula(fe_degree+1);
FEValues<2> fe_values(fe, quadrature_formula,
}
-
+ // @sect5{<code>Diffusion::id_minus_tau_J_inverse</code>}
+ //
+ // We compute $\left(M-\tau \frac{\partial f}{\partial y}\right)^{-1} M$.
Vector<double> Diffusion::id_minus_tau_J_inverse(const double time, const double tau,
const Vector<double> &y)
{
Vector<double> result(y);
SparseDirectUMFPACK inverse_mass_minus_tau_Jacobian;
+ // Compute $M-\tau \frac{\partial f}{\partial y}$.
mass_minus_tau_Jacobian.copy_from(mass_matrix);
mass_minus_tau_Jacobian.add(-tau,system_matrix);
+
+ // Inverse the matrix to get $\left(M-\tau \frac{\partial f}{\partial y}\right)^{-1}$.
inverse_mass_minus_tau_Jacobian.initialize(mass_minus_tau_Jacobian);
+
+ // Compute $tmp=My$.
mass_matrix.vmult(tmp,y);
+
+ // Compute $\left(M-\tau \frac{\partial f}{\partial y}\right)^{-1} tmp = \left(M-\tau \frac{\partial f}{\partial y}\right)^{-1} My$.
inverse_mass_minus_tau_Jacobian.vmult(result,tmp);
return result;
+ // @sect5{<code>Diffusion::output_results}
+ //
+ // We output the solution in vtu files.
void Diffusion::output_results(unsigned int time_step,TimeStepping::runge_kutta_method method) const
{
std::string method_name;
}
-
+ // @sect5{<code>Diffusion::explicit_method</code>}
void Diffusion::explicit_method(TimeStepping::runge_kutta_method method,
const unsigned int n_time_steps,
const double initial_time,
output_results(0,method);
for (unsigned int i=0; i<n_time_steps; ++i)
{
- // Because we use a member function, we need to bind this to the
+ // Because we use a member function, we need to bind $this$ to the
// function.
time = explicit_runge_kutta.evolve_one_time_step(
std_cxx1x::bind(&Diffusion::evaluate_diffusion,this,std_cxx1x::_1,std_cxx1x::_2),
+ // @sect5{<code>Diffusion::implicit_method</code>}
void Diffusion::implicit_method(TimeStepping::runge_kutta_method method,
const unsigned int n_time_steps,
const double initial_time,
output_results(0,method);
for (unsigned int i=0; i<n_time_steps; ++i)
{
- // Because we use a member function, we need to bind this to the
+ // Because we use a member function, we need to bind $this$ to the
// function.
time = implicit_runge_kutta.evolve_one_time_step(
std_cxx1x::bind(&Diffusion::evaluate_diffusion,this,std_cxx1x::_1,std_cxx1x::_2),
+ // @sect5{<code>Diffusion::embedded_explicit_method</code>}
unsigned int Diffusion::embedded_explicit_method(TimeStepping::runge_kutta_method method,
const unsigned int n_time_steps,
const double initial_time,
unsigned int n_steps=0;
while (time<final_time)
{
- // Choose the last time step to reach final_time.
+ // Choose the last time step to exactly reach the final time.
if (time+time_step>final_time)
time_step = final_time-time;
- // Because we use a member function, we need to bind this to the
+ // Because we use a member function, we need to bind $this$ to the
// function.
time = embedded_explicit_runge_kutta.evolve_one_time_step(
std_cxx1x::bind(&Diffusion::evaluate_diffusion,this,std_cxx1x::_1,std_cxx1x::_2),
if ((n_steps+1)%10==0)
output_results(n_steps+1,method);
- // Update the time step
+ // Update the time step.
time_step = embedded_explicit_runge_kutta.get_status().delta_t_guess;
++n_steps;
}
+ // @sect5{<code>Diffusion::run</code>}
void Diffusion::run()
{
- // Create the grid (a square [0,5]x[0,5]) and refine the mesh four times.
- // The final gird has 16 times 16 cells, for a total of 256.
+ // Create the grid (a [0,5]x[0,5] square) and refine the mesh four times.
+ // The final grid has 16 by 16 cells, for a total of 256.
GridGenerator::hyper_cube(triangulation, 0., 5.);
triangulation.refine_global(4);
- // Set the boundary indicator for x=0 and x=5 to 1
+ // Set the boundary indicator for x=0 and x=5 to 1.
typename Triangulation<2>::active_cell_iterator
cell = triangulation.begin_active(),
endc = triangulation.end();
const double initial_time = 0.;
const double final_time = 10.;
- // Use forward Euler
+ // Use forward Euler.
explicit_method(TimeStepping::FORWARD_EULER,n_time_steps,initial_time,final_time);
std::cout<<"Forward Euler error: "<<solution.l2_norm()<<std::endl;
- // Use third order Runge-Kutta
+ // Use third order Runge-Kutta.
explicit_method(TimeStepping::RK_THIRD_ORDER,n_time_steps,initial_time,final_time);
std::cout<<"Third order Runge-Kutta error: "<<solution.l2_norm()<<std::endl;
- // Use fourth order Runge-Kutta
+ // Use fourth order Runge-Kutta.
explicit_method(TimeStepping::RK_CLASSIC_FOURTH_ORDER,n_time_steps,initial_time,final_time);
std::cout<<"Fourth order Runge-Kutta error: "<<solution.l2_norm()<<std::endl;
- // Use backward Euler
+ // Use backward Euler.
implicit_method(TimeStepping::BACKWARD_EULER,n_time_steps,initial_time,final_time);
std::cout<<"Backward Euler error: "<<solution.l2_norm()<<std::endl;
- // Use implicit midpoint
+ // Use implicit midpoint.
implicit_method(TimeStepping::IMPLICIT_MIDPOINT,n_time_steps,initial_time,final_time);
std::cout<<"Implicit Midpoint error: "<<solution.l2_norm()<<std::endl;
- // Use Crank-NICOLSON
+ // Use Crank-Nicolson.
implicit_method(TimeStepping::CRANK_NICOLSON,n_time_steps,initial_time,final_time);
std::cout<<"Crank-Nicolson error: "<<solution.l2_norm()<<std::endl;
- // Use two stages SDIRK
+ // Use two stages SDIRK.
implicit_method(TimeStepping::SDIRK_TWO_STAGES,n_time_steps,initial_time,final_time);
std::cout<<"SDIRK error: "<<solution.l2_norm()<<std::endl;
- // Use Heun-Euler
+ // Use Heun-Euler.
n_steps = embedded_explicit_method(TimeStepping::HEUN_EULER,n_time_steps,initial_time,final_time);
std::cout<<"Heun-Euler error: "<<solution.l2_norm()<<std::endl;
std::cout<<"Number of steps done: "<<n_steps<<std::endl;
- // Use Bogacki-Shampine
+ // Use Bogacki-Shampine.
n_steps = embedded_explicit_method(TimeStepping::BOGACKI_SHAMPINE,n_time_steps,initial_time,final_time);
std::cout<<"Bogacki-Shampine error: "<<solution.l2_norm()<<std::endl;
std::cout<<"Number of steps done: "<<n_steps<<std::endl;
- // Use Dopri
+ // Use Dopri.
n_steps = embedded_explicit_method(TimeStepping::DOPRI,n_time_steps,initial_time,final_time);
std::cout<<"Dopri error: "<<solution.l2_norm()<<std::endl;
std::cout<<"Number of steps done: "<<n_steps<<std::endl;
- // Use Fehlberg
+ // Use Fehlberg.
n_steps = embedded_explicit_method(TimeStepping::FEHLBERG,n_time_steps,initial_time,final_time);
std::cout<<"Fehlberg error: "<<solution.l2_norm()<<std::endl;
std::cout<<"Number of steps done: "<<n_steps<<std::endl;
- // Use Cash-Karp
+ // Use Cash-Karp.
n_steps = embedded_explicit_method(TimeStepping::CASH_KARP,n_time_steps,initial_time,final_time);
std::cout<<"Cash-Karp error: "<<solution.l2_norm()<<std::endl;
std::cout<<"Number of steps done: "<<n_steps<<std::endl;
}
}
+
-
+// @sect3{The <code>main()</code> function}
+//
// The following <code>main</code> function is similar to previous examples as
// well, and need not be commented on.
int main ()
* for long enough, then change to a map.
*/
class AnyData :
- public Subscriptor
+ public Subscriptor
{
- public:
- /// Default constructor for empty object
- AnyData();
-
- /// Number of stored data objects.
- unsigned int size() const;
-
- /// Add a new data object
- template <typename type>
- void add(type entry, const std::string& name);
-
- /**
- * @brief Merge the data of another NamedData to the end of this object.
- */
- void merge(const AnyData& other);
-
- /**
- * @brief Access to stored data object by name.
- *
- * Find the object with given name, try to convert it to
- * <tt>type</tt> and return it. This function throws an exception
- * if either the name does not exist or if the conversion
- * fails. If such an exception is not desired, use try_read()
- * instead.
- */
- template <typename type>
- type entry (const std::string& name);
-
- /**
- * @brief Read-only access to stored data object by name.
- *
- * Find the object with given name, try to convert it to
- * <tt>type</tt> and return it. This function throws an exception
- * if either the name does not exist or if the conversion
- * fails. If such an exception is not desired, use try_read()
- * instead.
- */
- template <typename type>
- const type entry (const std::string& name) const;
-
- /**
- * @brief Dedicated read only access by name.
- *
- * For a constant object, this function equals entry(). For a
- * non-const object, it forces read only access to the data. In
- * particular, it throws an exception if the object is not found
- * or cannot be converted to type. If such an exception is not
- * desired, use try_read() instead.
- */
- template <typename type>
- const type read (const std::string& name) const;
-
- /**
- * @brief Dedicated read only access by name without exceptions.
- *
- * This function tries to find the name in the list and return a
- * pointer to the associated object. If either the name is not
- * found or the object cannot be converted to the return type, a
- * null pointer is returned.
- */
- template <typename type>
- const type * try_read (const std::string& name) const;
-
+public:
+ /// Default constructor for empty object
+ AnyData();
+
+ /// Number of stored data objects.
+ unsigned int size() const;
+
+ /// Add a new data object
+ template <typename type>
+ void add(type entry, const std::string &name);
+
+ /**
+ * @brief Merge the data of another NamedData to the end of this object.
+ */
+ void merge(const AnyData &other);
+
+ /**
+ * @brief Access to stored data object by name.
+ *
+ * Find the object with given name, try to convert it to
+ * <tt>type</tt> and return it. This function throws an exception
+ * if either the name does not exist or if the conversion
+ * fails. If such an exception is not desired, use try_read()
+ * instead.
+ */
+ template <typename type>
+ type entry (const std::string &name);
+
+ /**
+ * @brief Read-only access to stored data object by name.
+ *
+ * Find the object with given name, try to convert it to
+ * <tt>type</tt> and return it. This function throws an exception
+ * if either the name does not exist or if the conversion
+ * fails. If such an exception is not desired, use try_read()
+ * instead.
+ */
+ template <typename type>
+ const type entry (const std::string &name) const;
+
+ /**
+ * @brief Dedicated read only access by name.
+ *
+ * For a constant object, this function equals entry(). For a
+ * non-const object, it forces read only access to the data. In
+ * particular, it throws an exception if the object is not found
+ * or cannot be converted to type. If such an exception is not
+ * desired, use try_read() instead.
+ *
+ * @warning Do not use this function for stored objects which are
+ * pointers. Use read_ptr() instead!
+ */
+ template <typename type>
+ const type read (const std::string &name) const;
+
+ /**
+ * @brief Dedicated read only access by name for pointer data.
+ *
+ * If the stored data object is a pointer to a constant object, the logic
+ * of access becomes fairly complicated. Namely, the standard read
+ * function may fail, depending on whether it was a const pointer
+ * or a regular pointer. This function fixes the logic and
+ * ascertains that the object does not become mutable by accident.
+ */
+ template <typename type>
+ const type *read_ptr (const std::string &name) const;
+
+ /**
+ * Perform the same action as read_ptr(), but do not throw an
+ * exception if the pointer does not exist. Return a null pointer
+ * instead.
+ */
+ template <typename type>
+ const type *try_read_ptr (const std::string &name) const;
+
+ /**
+ * @brief Dedicated read only access by name without exceptions.
+ *
+ * This function tries to find the name in the list and return a
+ * pointer to the associated object. If either the name is not
+ * found or the object cannot be converted to the return type, a
+ * null pointer is returned.
+ */
+ template <typename type>
+ const type *try_read (const std::string &name) const;
+
/**
* Access to stored data object by index.
*/
- template <typename type>
- type entry (const unsigned int i);
-
- /// Read-only access to stored data object by index.
- template <typename type>
- const type entry (const unsigned int i) const;
-
- /// Dedicated read only access.
- template <typename type>
- const type read (const unsigned int i) const;
-
- /// Name of object at index.
- const std::string &name(const unsigned int i) const;
-
- /**
- * @brief Find index of a named object
- *
- * Try to find the objecty and return its index in the list. Throw
- * an exception if the object has not been found.
- */
- unsigned int find(const std::string &name) const;
-
- /// Find out if object is of a certain type
- template <typename type>
- bool is_type(const unsigned int i) const;
-
- /// Conversion from old NamedData
- template <typename type>
- AnyData(const NamedData<type>&);
-
- /// The requested type and the stored type are different
+ template <typename type>
+ type entry (const unsigned int i);
+
+ /// Read-only access to stored data object by index.
+ template <typename type>
+ const type entry (const unsigned int i) const;
+
+ /// Dedicated read only access.
+ template <typename type>
+ const type read (const unsigned int i) const;
+
+ /// Dedicated read only access to pointer object.
+ template <typename type>
+ const type *read_ptr (const unsigned int i) const;
+
+ /// Dedicated read only access to pointer object without exception.
+ template <typename type>
+ const type *try_read_ptr (const unsigned int i) const;
+
+ /// Dedicated read only access without exception.
+ template <typename type>
+ const type *try_read (const unsigned int i) const;
+
+ /// Name of object at index.
+ const std::string &name(const unsigned int i) const;
+
+ /**
+ * @brief Find index of a named object
+ *
+ * Try to find the objecty and return its index in the list. Throw
+ * an exception if the object has not been found.
+ */
+ unsigned int find(const std::string &name) const;
+
+ /**
+ * @brief Try to find index of a named object
+ *
+ * Try to find the objecty and return its index in the
+ * list. returns numbers::invalid_unsigned_int if the name was not
+ * found.
+ */
+ unsigned int try_find(const std::string &name) const;
+
+ /// Find out if object is of a certain type
+ template <typename type>
+ bool is_type(const unsigned int i) const;
+
+ /// Conversion from old NamedData
+ template <typename type>
+ AnyData(const NamedData<type> &);
+
+ /// An entry with this name does not exist in the AnyData object.
+ DeclException1(ExcNameNotFound, std::string &,
+ << "No entry with the name " << arg1 << " exists");
+
+ /// The requested type and the stored type are different
DeclException2(ExcTypeMismatch,
- char*, char*,
- << "The requested type " << arg1
- << " and the stored type " << arg2
- << " must coincide");
-
- private:
- /// The stored data
- std::vector<boost::any> data;
- /// The names of the stored data
- std::vector<std::string> names;
+ char *, char *,
+ << "The requested type " << arg1
+ << " and the stored type " << arg2
+ << " must coincide");
+
+ /**
+ * Exception indicating that a function expected a vector to have a
+ * certain name, but NamedData had a different name in that
+ * position.
+ */
+ DeclException2(ExcNameMismatch, int, std::string,
+ << "Name at position " << arg1 << " is not equal to " << arg2);
+private:
+ /// The stored data
+ std::vector<boost::any> data;
+ /// The names of the stored data
+ std::vector<std::string> names;
};
template <typename type>
inline
-AnyData::AnyData(const NamedData<type>& other)
+AnyData::AnyData(const NamedData<type> &other)
{
- for (unsigned int i=0;i<other.size();++i)
+ for (unsigned int i=0; i<other.size(); ++i)
add(other(i), other.name(i));
}
AnyData::entry (const unsigned int i)
{
AssertIndexRange(i, size());
- type* p = boost::any_cast<type>(&data[i]);
+ type *p = boost::any_cast<type>(&data[i]);
Assert(p != 0,
- ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
return *p;
}
AnyData::entry (const unsigned int i) const
{
AssertIndexRange(i, size());
- const type* p = boost::any_cast<type>(&data[i]);
+ const type *p = boost::any_cast<type>(&data[i]);
+ if (p==0 )
+ p = boost::any_cast<const type>(&data[i]);
Assert(p != 0,
- ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
return *p;
}
AnyData::read(const unsigned int i) const
{
AssertIndexRange(i, size());
- const type* p = boost::any_cast<type>(&data[i]);
+ const type *p = boost::any_cast<type>(&data[i]);
+ if (p==0)
+ p = boost::any_cast<const type>(&data[i]);
Assert(p != 0,
- ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
return *p;
}
+template <typename type>
inline
-const std::string&
+const type *
+AnyData::read_ptr(const unsigned int i) const
+{
+ AssertIndexRange(i, size());
+ const type *const *p = boost::any_cast<type *>(&data[i]);
+ if (p==0)
+ p = boost::any_cast<const type *>(&data[i]);
+ Assert(p != 0,
+ ExcTypeMismatch(typeid(type *).name(),data[i].type().name()));
+ return *p;
+}
+
+
+template <typename type>
+inline
+const type *
+AnyData::try_read_ptr(const unsigned int i) const
+{
+ AssertIndexRange(i, size());
+ const type *const *p = boost::any_cast<type *>(&data[i]);
+ if (p==0)
+ p = boost::any_cast<const type *>(&data[i]);
+ return *p;
+}
+
+
+template <typename type>
+inline
+const type *
+AnyData::try_read(const unsigned int i) const
+{
+ AssertIndexRange(i, size());
+ const type *p = boost::any_cast<type>(&data[i]);
+ if (p==0)
+ p = boost::any_cast<const type>(&data[i]);
+ return p;
+}
+
+
+inline
+const std::string &
AnyData::name(const unsigned int i) const
{
AssertIndexRange(i, size());
inline
unsigned int
-AnyData::find(const std::string& n) const
+AnyData::try_find(const std::string &n) const
{
std::vector<std::string>::const_iterator it =
std::find(names.begin(), names.end(), n);
-
- Assert(it != names.end(), ExcMessage("An entry with this name does not exist"));
-
+
+ if (it == names.end())
+ return numbers::invalid_unsigned_int;
+
return it - names.begin();
}
+inline
+unsigned int
+AnyData::find(const std::string &n) const
+{
+ const unsigned int i = try_find(n);
+ Assert(i != numbers::invalid_unsigned_int, ExcNameNotFound(n));
+
+ return i;
+}
+
+
template <typename type>
inline
bool
template <typename type>
inline
type
-AnyData::entry (const std::string& n)
+AnyData::entry (const std::string &n)
{
const unsigned int i = find(n);
- type* p = boost::any_cast<type>(&data[i]);
+ type *p = boost::any_cast<type>(&data[i]);
Assert(p != 0,
- ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
return *p;
}
template <typename type>
inline
const type
-AnyData::entry (const std::string& n) const
+AnyData::entry (const std::string &n) const
{
const unsigned int i = find(n);
- const type* p = boost::any_cast<type>(&data[i]);
+ const type *p = boost::any_cast<type>(&data[i]);
Assert(p != 0,
- ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
return *p;
}
template <typename type>
inline
const type
-AnyData::read(const std::string& n) const
+AnyData::read(const std::string &n) const
+{
+ const unsigned int i = find(n);
+ const type *p = boost::any_cast<type>(&data[i]);
+ Assert(p != 0,
+ ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ return *p;
+}
+
+
+template <typename type>
+inline
+const type *
+AnyData::read_ptr(const std::string &n) const
{
const unsigned int i = find(n);
- const type* p = boost::any_cast<type>(&data[i]);
+ const type *const *p = boost::any_cast<type *>(&data[i]);
+ if (p==0)
+ p = boost::any_cast<const type *>(&data[i]);
Assert(p != 0,
- ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ ExcTypeMismatch(typeid(type).name(),data[i].type().name()));
+ return *p;
+}
+
+
+template <typename type>
+inline
+const type *
+AnyData::try_read_ptr(const std::string &n) const
+{
+ const unsigned int i = try_find(n);
+ if (i == numbers::invalid_unsigned_int)
+ return 0;
+
+ const type *const *p = boost::any_cast<type *>(&data[i]);
+ if (p==0)
+ p = boost::any_cast<const type *>(&data[i]);
return *p;
}
template <typename type>
inline
-const type*
-AnyData::try_read(const std::string& n) const
+const type *
+AnyData::try_read(const std::string &n) const
{
// Try to find name
std::vector<std::string>::const_iterator it =
// Compute index and return casted pointer
unsigned int i=it-names.begin();
- const type* p = boost::any_cast<type>(&data[i]);
+ const type *p = boost::any_cast<type>(&data[i]);
return p;
}
template <typename type>
inline
void
-AnyData::add(type ent, const std::string& n)
+AnyData::add(type ent, const std::string &n)
{
boost::any e = ent;
data.push_back(e);
inline
void
-AnyData::merge(const AnyData& other)
+AnyData::merge(const AnyData &other)
{
for (unsigned int i=0; i<other.size(); ++i)
{
Newton (Operator<VECTOR> &residual, Operator<VECTOR> &inverse_derivative);
/**
- * Declare the parameters
- * applicable to Newton's method.
+ * Declare the parameters applicable to Newton's method.
*/
- void declare_parameters (ParameterHandler ¶m);
+ static void declare_parameters (ParameterHandler ¶m);
/**
- * Read the parameters.
+ * Read the parameters in the ParameterHandler.
*/
- void initialize (ParameterHandler ¶m);
+ void parse_parameters (ParameterHandler ¶m);
+
+ /**
+ * @deprecated Use parse_parameters().
+ */
+ void initialize (ParameterHandler ¶m) DEAL_II_DEPRECATED;
/**
* Initialize the pointer
/**
* @deprecated Use the function using AnyData
*/
- virtual void operator() (NamedData<VECTOR*> &out, const NamedData<VECTOR*> &in);
+ virtual void operator() (NamedData<VECTOR *> &out, const NamedData<VECTOR *> &in);
virtual void notify(const Event &);
template <class VECTOR>
void
- Newton<VECTOR>::initialize (ParameterHandler ¶m)
+ Newton<VECTOR>::parse_parameters (ParameterHandler ¶m)
{
param.enter_subsection("Newton");
control.parse_parameters (param);
param.leave_subsection ();
}
+ template <class VECTOR>
+ void
+ Newton<VECTOR>::initialize (ParameterHandler ¶m)
+ {
+ parse_parameters(param);
+ }
+
template <class VECTOR>
void
Newton<VECTOR>::initialize (OutputOperator<VECTOR> &output)
inverse_derivative->notify(e);
}
-
+
template <class VECTOR>
double
Newton<VECTOR>::threshold(const double thr)
assemble_threshold = thr;
return t;
}
-
-
+
+
template <class VECTOR>
void
Newton<VECTOR>::operator() (NamedData<VECTOR *> &out, const NamedData<VECTOR *> &in)
Assert (out.size() == 1, ExcNotImplemented());
deallog.push ("Newton");
- VECTOR &u = *out.entry<VECTOR*>(0);
+ VECTOR &u = *out.entry<VECTOR *>(0);
if (debug>2)
deallog << "u: " << u.l2_norm() << std::endl;
res->reinit(u);
AnyData src1;
AnyData src2;
- src1.add<const VECTOR*>(&u, "Newton iterate");
+ src1.add<const VECTOR *>(&u, "Newton iterate");
src1.merge(in);
- src2.add<const VECTOR*>(res, "Newton residual");
+ src2.add<const VECTOR *>(res, "Newton residual");
src2.merge(src1);
AnyData out1;
- out1.add<VECTOR*>(res, "Residual");
+ out1.add<VECTOR *>(res, "Residual");
AnyData out2;
- out2.add<VECTOR*>(Du, "Update");
+ out2.add<VECTOR *>(Du, "Update");
unsigned int step = 0;
// fill res with (f(u), v)
* of reassembling the matrix.
*/
Event notifications;
-
+
};
/**
{
public:
Operator();
-
+
/**
* Implementation of the function in the base class in order to do
* compatibility conversions between the old and the new
*/
virtual void operator() (NamedData<VECTOR *> &out, const NamedData<VECTOR *> &in);
+ /**
+ * Set this true to avoid compatibility warnings.
+ */
+ bool silent_compatibility;
+
private:
/**
* While we are providing compatibility functions to the old
/**
* Output all the vectors in AnyData.
*/
- virtual OutputOperator<VECTOR> &operator<< (const AnyData& vectors);
-
+ virtual OutputOperator<VECTOR> &operator<< (const AnyData &vectors);
+
/**
* @deprecated Output all the vectors in NamedData.
*/
- virtual OutputOperator<VECTOR> &operator<< (const NamedData<VECTOR *> &vectors);
+ OutputOperator<VECTOR> &operator<< (const NamedData<VECTOR *> &vectors);
protected:
unsigned int step;
private:
{
template <class VECTOR>
Operator<VECTOR>::Operator()
- : compatibility_flag(false)
+ : silent_compatibility(false), compatibility_flag(false)
{}
template <class VECTOR>
void
- Operator<VECTOR>::operator() (AnyData& out, const AnyData& in)
+ Operator<VECTOR>::operator() (AnyData &out, const AnyData &in)
{
// Had this function been overloaded in a derived clas, it would
// not have been called. Therefore, we have to start the
// compatibility engine. But before, we have to avoid an endless loop.
Assert(!compatibility_flag, ExcMessage("Compatibility resolution of Operator generates and endless loop\n"
- "Please provide an operator() in a derived class"));
+ "Please provide an operator() in a derived class"));
compatibility_flag = true;
-
- NamedData<VECTOR*> new_out;
- for (unsigned int i=0;i<out.size();++i)
+
+ NamedData<VECTOR *> new_out;
+ for (unsigned int i=0; i<out.size(); ++i)
{
- if (out.is_type<VECTOR*>(i))
- new_out.add(out.entry<VECTOR*>(i), out.name(i));
- else
- deallog << "Cannot convert AnyData argument " << out.name(i) << " to NamedData"
- << std::endl;
+ if (out.is_type<VECTOR *>(i))
+ new_out.add(out.entry<VECTOR *>(i), out.name(i));
+ else if (!silent_compatibility)
+ deallog << "Cannot convert AnyData argument " << out.name(i) << " to NamedData"
+ << std::endl;
}
-
- NamedData<VECTOR*> new_in;
- for (unsigned int i=0;i<in.size();++i)
+
+ NamedData<VECTOR *> new_in;
+ for (unsigned int i=0; i<in.size(); ++i)
{
- // deallog << "Convert " << in.name(i) << std::endl;
- if (in.is_type<VECTOR*>(i))
- {
- // This const cast is due to the wrong constness handling
- // in NamedData. As soon as NamedData is gone, this code
- // will not be necessary anymore. And deprecating begins
- // now.
- VECTOR* p = const_cast<VECTOR*> (in.entry<VECTOR*>(i));
- new_in.add(p, in.name(i));
- }
- else if (in.is_type<const VECTOR*>(i))
- {
- // This const cast is due to the wrong constness handling
- // in NamedData. As soon as NamedData is gone, this code
- // will not be necessary anymore. And deprecating begins
- // now.
- VECTOR* p = const_cast<VECTOR*> (in.entry<const VECTOR*>(i));
- new_in.add(p, in.name(i));
- }
- else
- deallog << "Cannot convert AnyData argument " << in.name(i)
- << " to NamedData" << std::endl;
+ // deallog << "Convert " << in.name(i) << std::endl;
+ if (in.is_type<VECTOR *>(i))
+ {
+ // This const cast is due to the wrong constness handling
+ // in NamedData. As soon as NamedData is gone, this code
+ // will not be necessary anymore. And deprecating begins
+ // now.
+ VECTOR *p = const_cast<VECTOR *> (in.entry<VECTOR *>(i));
+ new_in.add(p, in.name(i));
+ }
+ else if (in.is_type<const VECTOR *>(i))
+ {
+ // This const cast is due to the wrong constness handling
+ // in NamedData. As soon as NamedData is gone, this code
+ // will not be necessary anymore. And deprecating begins
+ // now.
+ VECTOR *p = const_cast<VECTOR *> (in.entry<const VECTOR *>(i));
+ new_in.add(p, in.name(i));
+ }
+ else if (!silent_compatibility)
+ deallog << "Cannot convert AnyData argument " << in.name(i)
+ << " to NamedData" << std::endl;
}
this->operator() (new_out, new_in);
compatibility_flag = false;
template <class VECTOR>
void
- Operator<VECTOR>::operator() (NamedData<VECTOR*>& out, const NamedData<VECTOR*>& in)
+ Operator<VECTOR>::operator() (NamedData<VECTOR *> &out, const NamedData<VECTOR *> &in)
{
// Had this function been overloaded in a derived clas, it would
// not have been called. Therefore, we have to start the
// compatibility engine. But before, we have to avoid an endless loop.
Assert(!compatibility_flag, ExcMessage("Compatibility resolution of Operator generates and endless loop\n"
- "Please provide an operator() in a derived class"));
+ "Please provide an operator() in a derived class"));
compatibility_flag = true;
-
+
AnyData new_out;
- for (unsigned int i=0;i<out.size();++i)
+ for (unsigned int i=0; i<out.size(); ++i)
new_out.add(out(i), out.name(i));
AnyData new_in;
- for (unsigned int i=0;i<in.size();++i)
+ for (unsigned int i=0; i<in.size(); ++i)
new_in.add(in(i), in.name(i));
this->operator() (new_out, new_in);
template <class VECTOR>
OutputOperator<VECTOR> &
- OutputOperator<VECTOR>::operator<< (const AnyData& vectors)
+ OutputOperator<VECTOR>::operator<< (const AnyData &vectors)
{
if (os == 0)
{
- //TODO: make this possible
- //deallog << ' ' << step;
- //for (unsigned int i=0;i<vectors.size();++i)
- // vectors(i)->print(deallog);
- //deallog << std::endl;
+ deallog << "Step " << step << std::endl;
+ for (unsigned int i=0; i<vectors.size(); ++i)
+ {
+ const VECTOR *v = vectors.try_read_ptr<VECTOR>(i);
+ if (v == 0) continue;
+ deallog << vectors.name(i);
+ for (unsigned int j=0; j<v->size(); ++j)
+ deallog << ' ' << (*v)(j);
+ deallog << std::endl;
+ }
+ deallog << std::endl;
}
else
{
(*os) << ' ' << step;
for (unsigned int i=0; i<vectors.size(); ++i)
- {
- if (vectors.is_type<VECTOR*>(i))
- {
- const VECTOR& v = *vectors.entry<VECTOR*>(i);
- for (unsigned int j=0; j<v.size(); ++j)
- (*os) << ' ' << v(j);
- }
- else if (vectors.is_type<const VECTOR*>(i))
- {
- const VECTOR& v = *vectors.entry<const VECTOR*>(i);
- for (unsigned int j=0; j<v.size(); ++j)
- (*os) << ' ' << v(j);
- }
- }
+ {
+ const VECTOR *v = vectors.try_read_ptr<VECTOR>(i);
+ if (v == 0) continue;
+ for (unsigned int j=0; j<v->size(); ++j)
+ (*os) << ' ' << (*v)(j);
+ (*os) << std::endl;
+ }
(*os) << std::endl;
}
return *this;
}
-
+
template <class VECTOR>
OutputOperator<VECTOR> &
OutputOperator<VECTOR>::operator<< (const NamedData<VECTOR *> &vectors)
{
- if (os == 0)
- {
- //TODO: make this possible
- //deallog << ' ' << step;
- //for (unsigned int i=0;i<vectors.size();++i)
- // vectors(i)->print(deallog);
- //deallog << std::endl;
- }
- else
- {
- (*os) << ' ' << step;
- for (unsigned int i=0; i<vectors.size(); ++i)
- for (unsigned int j=0; j<vectors(i)->size(); ++j)
- (*os) << ' ' << (*vectors(i))(j);
- (*os) << std::endl;
- }
+ const AnyData newdata = vectors;
+ (*this) << newdata;
return *this;
}
}
// ---------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2010 - 2013 by the deal.II authors
+// Copyright (C) 2010 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
* communicate the current time step information through AnyData as
* well. Therefore, the AnyData objects handed as input to
* #op_explicit and #op_implicit contain two entries of type
- * <tt>const double</tt> reference named "Time" and "Timestep". Note
+ * <tt>const double*</tt> named "Time" and "Timestep". Note
* that "Time" refers to the time at the beginning of the current
* step for #op_explicit and at the end for #op_implicit,
* respectively.
* @until End of declarations
*
* These operators will be implemented after the main program. But let
- * us look at how they get used. First, let us define a matrix to be
+ * us look first at how they get used. First, let us define a matrix to be
* used for our system and also an OutputOperator in order to write
* the data of each timestep to a file.
*
* @until out.initialize
*
* Now we create objects for the implicit and explicit parts of the
- * steps as well as the ThetaTimestepping itself. Notice how the
- * TimestepData of ThetaTimestepping gets forwarded to the inner
- * operators. There are two different data objects, because the
- * timestep size is modified by #theta.
+ * steps as well as the ThetaTimestepping itself. We initialize the
+ * timestepping with the output operator in order to be able to see
+ * the output in every step.
*
* @until set_output
*
* is filled with the initial value and is also the vector where the
* solution at each timestep will be. Because the interface of
* Operator has to be able to handle several vectors, we need to store
- * it in a NamedData object. Notice, that we need to create the
- * intermediate pointer <tt>p</tt>. If we would use
- * <code>&value</code> directly in the <code>add</code> function, the
- * resulting object would be constant.
+ * it in an AnyData object. Since our problem has no additional
+ * parameters, the input AnyData object remains empty.
*
* @until add
*
- * Finally, we are ready to tell the solver, that we are looknig at
+ * Finally, we are ready to tell the solver, that we are starting at
* the initial timestep and run it.
*
- * @until outdata
- * @skip Explicit::initialize
+ * @until }
+ *
+ * First the constructor, which simply copies the system matrix into
+ * the member pointer for later use.
+ *
+ * @skip Explicit::
+ * @until }
*
* Now we need to study the application of the implicit and explicit
* operator. We assume that the pointer <code>matrix</code> points to
- * the matrix created in the main program, and that
- * <code>timestep_data</code> points to the correct data object of
- * ThetaTimestepping.
+ * the matrix created in the main program (the constructor did this
+ * for us). Here, we first get the time step size from the AnyData
+ * object that was provided as input. Then, if we are in the first
+ * step or if the timestep has changed, we fill the local matrix
+ * <tt>m</tt>, such that with the given matrix \f$M\f$, it becomes
+ * \f[
+ * m = I - \Delta t M.
+ * \f]
+ * After we have worked off the notifications, we clear them, such
+ * that the matrix is only generated when necessary.
*
* @skipline void
- * @until vmult
+ * @until clear
+ *
+ * Now we multiply the input vector with the new matrix and store on output.
+ *
* @until }
+ * The code for the implicit operator is almost the same, except
+ * that we change the sign in front of the timestep and use the
+ * inverse of t he matrix.
*
+ * @until vmult
+ * @until }
* @author Guido Kanschat
* @date 2010
*/
*/
void set_output(OutputOperator<VECTOR> &output);
- void declare_parameters (ParameterHandler ¶m);
- void initialize (ParameterHandler ¶m);
+ /**
+ * Declare parameters in a parameter handler.
+ */
+ static void declare_parameters (ParameterHandler ¶m);
+
+ /**
+ * Read the parameters in the ParameterHandler.
+ */
+ void parse_parameters (ParameterHandler ¶m);
+
+ /**
+ * @deprecated Use parse_parameters().
+ */
+ void initialize (ParameterHandler ¶m) DEAL_II_DEPRECATED;
/**
* The current time in the
* timestepping scheme.
*/
- const double ¤t_time() const;
+ double current_time() const;
/**
* The current step size.
*/
- const double &step_size() const;
+ double step_size() const;
/**
* The weight between implicit and explicit part.
*/
- const double &theta() const;
+ double theta() const;
+
+ /**
+ * Set a new weight and return the old
+ */
+ double theta(double new_theta);
/**
* The data handed to the #op_explicit time stepping operator.
{
output = &out;
}
+
+
+ template <class VECTOR>
+ inline
+ double ThetaTimestepping<VECTOR>::theta () const
+ {
+ return vtheta;
+ }
+
+
+ template <class VECTOR>
+ inline
+ double ThetaTimestepping<VECTOR>::theta (double new_theta)
+ {
+ const double tmp = vtheta;
+ vtheta = new_theta;
+ return tmp;
+ }
+
+
+ template <class VECTOR>
+ inline
+ double ThetaTimestepping<VECTOR>::current_time () const
+ {
+ return control.now();
+ }
}
DEAL_II_NAMESPACE_CLOSE
template <class VECTOR>
void
- ThetaTimestepping<VECTOR>::initialize (ParameterHandler ¶m)
+ ThetaTimestepping<VECTOR>::parse_parameters (ParameterHandler ¶m)
{
param.enter_subsection("ThetaTimestepping");
control.parse_parameters (param);
}
+ template <class VECTOR>
+ void
+ ThetaTimestepping<VECTOR>::initialize (ParameterHandler ¶m)
+ {
+ parse_parameters(param);
+ }
+
+
template <class VECTOR>
void
ThetaTimestepping<VECTOR>::operator() (NamedData<VECTOR *> &out, const NamedData<VECTOR *> &in)
{
Operator<VECTOR>::operator() (out, in);
}
-
-
+
+
template <class VECTOR>
void
ThetaTimestepping<VECTOR>::operator() (AnyData &out, const AnyData &in)
deallog.push ("Theta");
- VECTOR& solution = *out.entry<VECTOR*>(0);
+ VECTOR &solution = *out.entry<VECTOR *>(0);
GrowingVectorMemory<VECTOR> mem;
typename VectorMemory<VECTOR>::Pointer aux(mem);
aux->reinit(solution);
// vector associated with the old
// timestep
AnyData src1;
- src1.add<const VECTOR*>(&solution, "Previous iterate");
- src1.add<const double&>(d_explicit.time, "Time");
- src1.add<const double&>(d_explicit.step, "Timestep");
+ src1.add<const VECTOR *>(&solution, "Previous iterate");
+ src1.add<const double *>(&d_explicit.time, "Time");
+ src1.add<const double *>(&d_explicit.step, "Timestep");
+ src1.add<const double *>(&vtheta, "Theta");
src1.merge(in);
AnyData src2;
- src2.add<const VECTOR*>(&solution, "Previous iterate");
AnyData out1;
- out1.add<VECTOR*>(aux, "Solution");
+ out1.add<VECTOR *>(aux, "Solution");
// The data provided to the inner solver
- src2.add<const VECTOR*>(aux, "Previous time");
- src2.add<const double&>(d_implicit.time, "Time");
- src2.add<const double&>(d_explicit.step, "Timestep");
+ src2.add<const VECTOR *>(aux, "Previous time");
+ src2.add<const VECTOR *>(&solution, "Previous iterate");
+ src2.add<const double *>(&d_implicit.time, "Time");
+ src2.add<const double *>(&d_implicit.step, "Timestep");
+ src2.add<const double *>(&vtheta, "Theta");
src2.merge(in);
if (output != 0)
(*output) << 0U << out;
+ // Avoid warnings because time and timestep cannot be converted to VECTOR*
+ const bool explicit_silent = op_explicit->silent_compatibility;
+ const bool implicit_silent = op_implicit->silent_compatibility;
+ op_explicit->silent_compatibility = true;
+ op_implicit->silent_compatibility = true;
+
for (unsigned int count = 1; d_explicit.time < control.final(); ++count)
{
const bool step_change = control.advance();
d_explicit.time = control.now();
}
+ op_explicit->silent_compatibility = explicit_silent;
+ op_implicit->silent_compatibility = implicit_silent;
deallog.pop();
}
}
// ---------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2000 - 2013 by the deal.II authors
+// Copyright (C) 2000 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
/**
* Gives the patchwise extrapolation of a @p dof1 function @p z1 to a @p
- * dof2 function @p z2. @p dof1 and @p dof2 need to be DoFHandler based on
- * the same triangulation.
- *
- * This function is interesting for e.g. extrapolating patchwise a piecewise
- * linear solution to a piecewise quadratic solution.
- *
- * Note that the resulting field does not satisfy continuity requirements of
- * the given finite elements.
- *
+ * dof2 function @p z2. @p dof1 and @p dof2 need to be DoFHandler objects
+ * based on the same triangulation. This function is used, for example, for
+ * extrapolating patchwise a piecewise linear solution to a piecewise
+ * quadratic solution.
+ *
+ * The function's name is historical and probably not particularly well
+ * chosen. The function performs the following operations, one after the
+ * other:
+ *
+ * - It interpolates directly from every cell of @p dof1 to the
+ * corresponding cell of @dof2 using the interpolation matrix of the
+ * finite element spaces used on these cells and provided by
+ * the finite element objects involved. This step is done using the
+ * FETools::interpolate() function.
+ * - It then performs a loop over all non-active cells of @dof2. If
+ * such a non-active cell has at least one active child, then we
+ * call the children of this cell a "patch". We then interpolate
+ * from the children of this patch to the patch, using the finite
+ * element space associated with @p dof2 and immediately interpolate
+ * back to the children. In essence, this information throws away
+ * all information in the solution vector that lives on a scale
+ * smaller than the patch cell.
+ * - Since we traverse non-active cells from the coarsest to the
+ * finest levels, we may find patches that correspond to child
+ * cells of previously treated patches if the mesh had been
+ * refined adaptively (this cannot happen if the mesh has been
+ * refined globally because there the children of a patch are
+ * all active). We also perform the operation described above
+ * on these patches, but it is easy to see that on patches that
+ * are children of previously treated patches, the operation is
+ * now the identity operation (since it interpolates from the
+ * children of the current patch a function that had previously
+ * been interpolated to these children from an even coarser patch).
+ * Consequently, this does not alter the solution vector any more.
+ *
+ * The name of the function originates from the fact that it can be
+ * used to construct a representation of a function of higher polynomial
+ * degree on a once coarser mesh. For example, if you imagine that you
+ * start with a $Q_1$ function on globally refined mesh, and that @p dof2
+ * is associated with a $Q_2$ element, then this function computes the
+ * equivalent of the operator $I_{2h}^{(2)}$ interpolating the original
+ * piecewise linear function onto a quadratic function on a once coarser
+ * mesh with mesh size $2h$ (but representing this function on the original
+ * mesh with size $h$). If the exact solution is sufficiently smooth,
+ * then $u^\ast=I_{2h}^{(2)}u_h$ is typically a better approximation to
+ * the exact solution $u$ of the PDE than $u_h$ is. In other words, this
+ * function provides a postprocessing step that improves the solution in
+ * a similar way one often obtains by extrapolating a sequence of solutions,
+ * explaining the origin of the function's name.
+ *
+ * @note The resulting field does not satisfy continuity requirements of
+ * the given finite elements if the algorithm outlined above is used.
* When you use continuous elements on grids with hanging nodes, please use
* the @p extrapolate function with an additional ConstraintMatrix argument,
* see below.
*
- * Since this function operates on patches of cells, it is required that the
- * underlying grid is refined at least once for every coarse grid cell. If
+ * @note Since this function operates on patches of cells, it requires that
+ * the underlying grid is refined at least once for every coarse grid cell. If
* this is not the case, an exception will be raised.
*/
template <int dim, class InVector, class OutVector, int spacedim>
/**
* Gives the patchwise extrapolation of a @p dof1 function @p z1 to a @p
- * dof2 function @p z2. @p dof1 and @p dof2 need to be DoFHandler based on
+ * dof2 function @p z2. @p dof1 and @p dof2 need to be DoFHandler objects based on
* the same triangulation. @p constraints is a hanging node constraints
- * object corresponding to @p dof2. This object is particular important when
+ * object corresponding to @p dof2. This object is necessary when
* interpolating onto continuous elements on grids with hanging nodes
* (locally refined grids).
*
- * Otherwise, the same holds as for the other @p extrapolate function.
+ * Otherwise, the function does the same as the other @p extrapolate
+ * function above (for which the documentation provides an extensive
+ * description of its operation).
*/
template <int dim, class InVector, class OutVector, int spacedim>
void extrapolate (const DoFHandler<dim,spacedim> &dof1,
* accordingly.
*
* The name must be in the form which is returned by the
- * FiniteElement::get_name function, where a few modifications are allowed:
- *
- * <ul>
- * <li> Dimension template parameters <2> etc. can be
+ * FiniteElement::get_name function, where dimension template parameters <2> etc. can be
* omitted. Alternatively, the explicit number can be replaced by
* <tt>dim</tt> or <tt>d</tt>. If a number is given, it <b>must</b> match
* the template parameter of this function.
*
- * <li> The powers used for FESystem may either be numbers or can be
+ * The names of FESystem elements follow the pattern <code>FESystem[FE_Base1^p1-FE_Base2^p2]</code>
+ * The powers <code>p1</code> etc. may either be numbers or can be
* replaced by <tt>dim</tt> or <tt>d</tt>.
- * </ul>
+ *
*
* If no finite element can be reconstructed from this string, an exception
* of type @p FETools::ExcInvalidFEName is thrown.
* may be different as to whether
* a point is in- or outside the
* cell in real space.
-
- In case of codim>0, the point is first projected
- to the manifold where the cell is embedded and
- then check if this projection is inside the cell.
-
- */
+ *
+ * In case of codim>0, the point is first projected
+ * to the manifold where the cell is embedded and
+ * then check if this projection is inside the cell.
+ */
bool point_inside (const Point<spacedim> &p) const;
/**
/**
* The method allows to take advantage
* if the system matrix is symmetric by
- * using LDL^T decomposition unstead of
+ * using LDL^T decomposition instead of
* more expensive LU. The argument
* indicates whether the matrix is
* symmetric or not.
const TrilinosScalar new_diag_value = 0);
/**
- * Make an in-place transpose of a matrix.
+ * Sets an internal flag so that all operations performed by the matrix,
+ * i.e., multiplications, are done in transposed order. However, this does
+ * not reshape the matrix to transposed form directly, so care should be
+ * taken when using this flag.
*/
void transpose ();
#define __deal2__mesh_worker_functional_h
#include <deal.II/base/named_data.h>
+#include <deal.II/algorithms/any_data.h>
#include <deal.II/base/smartpointer.h>
#include <deal.II/base/mg_level_object.h>
#include <deal.II/lac/block_vector.h>
{
public:
/**
- * The data type for
- * communicating the cell and
- * face vectors.
- */
- typedef NamedData<BlockVector<number>*> DataVectors;
-
- /**
- * The initialization
- * function, specifying the
- * @p results vectors and
- * whether face data should
- * be collected separately.
+ * The initialization function, specifying the @p results
+ * vectors and whether face data should be collected separately.
*
- * @p results should contain
- * two block vectors named
- * "cells" and "faces" (the
- * latter only if
- * @p separate_faces is
- * true). In each of the two,
- * each block should have
- * equal size and be large
- * enough to accommodate all
- * user indices set in the
- * cells and faces covered by
- * the loop it is used
- * in. Typically, for
- * estimators, this is
- * Triangulation::n_active_cells()
- * and
- * Triangulation::n_faces(),
- * respectively.
+ * @p results should contain two block vectors named "cells" and
+ * "faces" (the latter only if @p separate_faces is true). In
+ * each of the two, each block should have equal size and be
+ * large enough to accommodate all user indices set in the cells
+ * and faces covered by the loop it is used in. Typically, for
+ * estimators, this is Triangulation::n_active_cells() and
+ * Triangulation::n_faces(), respectively.
*
- * The use of BlockVector may
- * seem cumbersome, but it
- * allows us to assemble
- * several functionals at the
- * same time, one in each
- * block. The typical
- * situation for error
- * estimate is just having a
- * single block in each vector.
+ * The use of BlockVector may seem cumbersome, but it allows us
+ * to assemble several functionals at the same time, one in each
+ * block. The typical situation for error estimate is just
+ * having a single block in each vector.
*/
- void initialize(DataVectors &results,
+ void initialize(AnyData &results, bool separate_faces = true);
+
+ /**
+ * @deprecated
+ */
+ void initialize(NamedData<BlockVector<number>*> &results,
bool separate_faces = true);
/**
* Initialize the local data
*/
number operator() (const unsigned int i) const;
private:
- DataVectors results;
+ AnyData results;
bool separate_faces;
};
//----------------------------------------------------------------------//
template <typename number>
inline void
- CellsAndFaces<number>::initialize(DataVectors &r, bool sep)
+ CellsAndFaces<number>::initialize(AnyData &r, bool sep)
+ {
+ Assert(r.name(0) == "cells", AnyData::ExcNameMismatch(0, "cells"));
+ if (sep)
+ {
+ Assert(r.name(1) == "faces", AnyData::ExcNameMismatch(1, "faces"));
+ AssertDimension(r.entry<BlockVector<double>*>(0)->n_blocks(),
+ r.entry<BlockVector<double>*>(1)->n_blocks());
+ }
+
+ results = r;
+ separate_faces = sep;
+ }
+
+ template <typename number>
+ inline void
+ CellsAndFaces<number>::initialize(NamedData<BlockVector<number>*> &r, bool sep)
{
- Assert(r.name(0) == "cells", typename DataVectors::ExcNameMismatch(0, "cells"));
+ Assert(r.name(0) == "cells", AnyData::ExcNameMismatch(0, "cells"));
if (sep)
{
- Assert(r.name(1) == "faces", typename DataVectors::ExcNameMismatch(1, "faces"));
- AssertDimension(r(0)->n_blocks(), r(1)->n_blocks());
+ Assert(r.name(1) == "faces", AnyData::ExcNameMismatch(1, "faces"));
+ AssertDimension(r(0)->n_blocks(),r(1)->n_blocks());
}
results = r;
inline void
CellsAndFaces<number>::initialize_info(DOFINFO &info, bool) const
{
- info.initialize_numbers(results(0)->n_blocks());
+ info.initialize_numbers(results.entry<BlockVector<double>*>(0)->n_blocks());
}
inline void
CellsAndFaces<number>::assemble(const DOFINFO &info)
{
+ BlockVector<double>* v;
+ if (separate_faces &&
+ info.face_number != deal_II_numbers::invalid_unsigned_int)
+ v = results.entry<BlockVector<double>*>(1);
+ else
+ v = results.entry<BlockVector<double>*>(0);
+
for (unsigned int i=0; i<info.n_values(); ++i)
- {
- if (separate_faces &&
- info.face_number != deal_II_numbers::invalid_unsigned_int)
- results(1)->block(i)(info.face->user_index()) += info.value(i);
- else
- results(0)->block(i)(info.cell->user_index()) += info.value(i);
- }
+ v->block(i)(info.cell->user_index()) += info.value(i);
}
{
if (separate_faces)
{
+ BlockVector<double>* v1 = results.entry<BlockVector<double>*>(1);
const double J = info1.value(i) + info2.value(i);
- results(1)->block(i)(info1.face->user_index()) += J;
+ v1->block(i)(info1.face->user_index()) += J;
if (info2.face != info1.face)
- results(1)->block(i)(info2.face->user_index()) += J;
+ v1->block(i)(info2.face->user_index()) += J;
}
else
{
- results(0)->block(i)(info1.cell->user_index()) += .5*info1.value(i);
- results(0)->block(i)(info2.cell->user_index()) += .5*info2.value(i);
+ BlockVector<double>* v0 = results.entry<BlockVector<double>*>(0);
+ v0->block(i)(info1.cell->user_index()) += .5*info1.value(i);
+ v0->block(i)(info2.cell->user_index()) += .5*info2.value(i);
}
}
}
* undertaken to use this class.
*
* First, you should consider if you need values from any vectors in a
- * NamedData object. If so, fill the VectorSelector objects
+ * AnyData object. If so, fill the VectorSelector objects
* #cell_selector, #boundary_selector and #face_selector with their names
* and the data type (value, gradient, Hessian) to be extracted.
*
* formulas, which integrate polynomial bilinear forms exactly.
*/
template <typename VECTOR>
+ void initialize(const FiniteElement<dim, spacedim> &el,
+ const Mapping<dim, spacedim> &mapping,
+ const AnyData &data,
+ const VECTOR& dummy,
+ const BlockInfo *block_info = 0);
+ /**
+ * @deprecated Use AnyData instead of NamedData.
+ */
+ template <typename VECTOR>
void initialize(const FiniteElement<dim, spacedim> &el,
const Mapping<dim, spacedim> &mapping,
const NamedData<VECTOR *> &data,
const BlockInfo *block_info = 0);
/**
- * Initialize the IntegrationInfo objects contained.
- *
- * Before doing so, add update flags necessary to produce the data
- * needed and also set uninitialized quadrature rules to Gauss
- * formulas, which integrate polynomial bilinear forms exactly.
+ * @deprecated Use AnyData instead of NamedData.
*/
template <typename VECTOR>
void initialize(const FiniteElement<dim, spacedim> &el,
}
+ template <int dim, int sdim>
+ template <typename VECTOR>
+ void
+ IntegrationInfoBox<dim,sdim>::initialize(
+ const FiniteElement<dim,sdim> &el,
+ const Mapping<dim,sdim> &mapping,
+ const AnyData &data,
+ const VECTOR& dummy,
+ const BlockInfo *block_info)
+ {
+ initialize(el, mapping, block_info);
+ std_cxx1x::shared_ptr<VectorData<VECTOR, dim, sdim> > p;
+ VectorDataBase<dim,sdim>* pp;
+
+ p = std_cxx1x::shared_ptr<VectorData<VECTOR, dim, sdim> >(new VectorData<VECTOR, dim, sdim> (cell_selector));
+ // Public member function of parent class was not found without
+ // explicit cast
+ pp = &*p;
+ pp->initialize(data);
+ cell_data = p;
+ cell.initialize_data(p);
+
+ p = std_cxx1x::shared_ptr<VectorData<VECTOR, dim, sdim> >(new VectorData<VECTOR, dim, sdim> (boundary_selector));
+ pp = &*p;
+ pp->initialize(data);
+ boundary_data = p;
+ boundary.initialize_data(p);
+
+ p = std_cxx1x::shared_ptr<VectorData<VECTOR, dim, sdim> >(new VectorData<VECTOR, dim, sdim> (face_selector));
+ pp = &*p;
+ pp->initialize(data);
+ face_data = p;
+ face.initialize_data(p);
+ subface.initialize_data(p);
+ neighbor.initialize_data(p);
+ }
+
+
template <int dim, int sdim>
template <typename VECTOR>
void
#define __deal2__mesh_worker_simple_h
#include <deal.II/base/named_data.h>
+#include <deal.II/algorithms/any_data.h>
#include <deal.II/base/smartpointer.h>
#include <deal.II/base/mg_level_object.h>
#include <deal.II/lac/block_vector.h>
class ResidualSimple
{
public:
- void initialize(NamedData<VECTOR *> &results);
+ /**
+ * Initialize with an AnyData object holding the result of
+ * assembling.
+ *
+ * Assembling currently writes into the first vector of <tt>results</tt>.
+ */
+ void initialize(AnyData& results);
+ /**
+ * @deprecated Use initialize(AnyData&) instead.
+ */
+ void initialize(NamedData<VECTOR *> &results);
/**
* Initialize the constraints.
*/
/**
* The global residal vectors filled by assemble().
*/
- NamedData<SmartPointer<VECTOR,ResidualSimple<VECTOR> > > residuals;
+ AnyData residuals;
/**
* A pointer to the object containing constraints.
*/
//----------------------------------------------------------------------//
+ template <class VECTOR>
+ inline void
+ ResidualSimple<VECTOR>::initialize(AnyData &results)
+ {
+ residuals = results;
+ }
+
template <class VECTOR>
inline void
ResidualSimple<VECTOR>::initialize(NamedData<VECTOR *> &results)
{
for (unsigned int k=0; k<residuals.size(); ++k)
{
+ VECTOR* v = residuals.entry<VECTOR*>(k);
if (constraints == 0)
{
for (unsigned int i=0; i<info.vector(k).block(0).size(); ++i)
- (*residuals(k))(info.indices[i]) += info.vector(k).block(0)(i);
+ (*v)(info.indices[i]) += info.vector(k).block(0)(i);
}
else
{
if (info.indices_by_block.size() == 0)
- constraints->distribute_local_to_global(info.vector(k).block(0), info.indices, (*residuals(k)));
+ constraints->distribute_local_to_global(info.vector(k).block(0), info.indices, *v);
else
for (unsigned int i=0; i != info.vector(k).n_blocks(); ++i)
- constraints->distribute_local_to_global(info.vector(k).block(i), info.indices_by_block[i], (*residuals(k)));
+ constraints->distribute_local_to_global(info.vector(k).block(i), info.indices_by_block[i], *v);
}
}
}
{
for (unsigned int k=0; k<residuals.size(); ++k)
{
+ VECTOR* v = residuals.entry<VECTOR*>(k);
if (constraints == 0)
{
for (unsigned int i=0; i<info1.vector(k).block(0).size(); ++i)
- (*residuals(k))(info1.indices[i]) += info1.vector(k).block(0)(i);
+ (*v)(info1.indices[i]) += info1.vector(k).block(0)(i);
for (unsigned int i=0; i<info2.vector(k).block(0).size(); ++i)
- (*residuals(k))(info2.indices[i]) += info2.vector(k).block(0)(i);
+ (*v)(info2.indices[i]) += info2.vector(k).block(0)(i);
}
else
{
if (info1.indices_by_block.size() == 0 && info2.indices_by_block.size() == 0)
{
constraints->distribute_local_to_global
- (info1.vector(k).block(0), info1.indices, (*residuals(k)));
+ (info1.vector(k).block(0), info1.indices, *v);
constraints->distribute_local_to_global
- (info2.vector(k).block(0), info2.indices, (*residuals(k)));
+ (info2.vector(k).block(0), info2.indices, *v);
}
else if (info1.indices_by_block.size() != 0 && info2.indices_by_block.size() != 0)
{
for (unsigned int i=0; i<info1.vector(k).n_blocks(); ++i)
{
constraints->distribute_local_to_global
- (info1.vector(k).block(i), info1.indices_by_block[i], (*residuals(k)));
+ (info1.vector(k).block(i), info1.indices_by_block[i], *v);
constraints->distribute_local_to_global
- (info2.vector(k).block(i), info2.indices_by_block[i], (*residuals(k)));
+ (info2.vector(k).block(i), info2.indices_by_block[i], *v);
}
}
else
inline void
SystemSimple<MATRIX,VECTOR>::initialize(MATRIX &m, VECTOR &rhs)
{
- NamedData<VECTOR *> data;
+ AnyData data;
VECTOR *p = &rhs;
data.add(p, "right hand side");
#define __deal2__mesh_worker_vector_selector_h
#include <deal.II/base/named_data.h>
+#include <deal.II/algorithms/any_data.h>
#include <deal.II/base/tensor.h>
#include <deal.II/base/smartpointer.h>
#include <deal.II/base/mg_level_object.h>
/**
* A class that selects vectors from a list of named vectors.
*
- * Since the number of vectors in a NamedData object may grow with every
+ * Since the number of vectors in an AnyData object may grow with every
* nesting of applications or loops, it is important to be able to
* select those, which are actually used in computing residuals etc.
* This class organizes the selection.
{
public:
/**
- * Add a vector to the
- * selection of finite element
- * functions. The arguments are
- * the name of the vector and
- * indicators, which
- * information is to be
- * extracted from the
- * vector. The name refers to
- * an entry in a NamedData
- * object, which will be
- * identified by initialize().
- * The three bool parameters
- * indicate, whether values,
- * greadients and Hessians of
- * the finite element function
- * are to be computed on each
- * cell or face.
+ * Add a vector to the selection of finite element functions. The
+ * arguments are the name of the vector and indicators, which
+ * information is to be extracted from the vector. The name refers
+ * to an entry in a AnyData object, which will be identified by
+ * initialize(). The three bool parameters indicate, whether
+ * values, greadients and Hessians of the finite element function
+ * are to be computed on each cell or face.
*/
void add(const std::string &name,
const bool values = true,
const bool hessians = false);
/**
- * Does the same as the function
- * above but it is possible to
- * select a block of the global
- * vector.
+ * Does the same as the function above but it is possible to
+ * select a block of the global vector.
*/
// void add(const std::string& name,
// const unsigned int selected_block,
// bool hessians = false);
/**
- * Initialize the selection
- * field with a data
- * vector. While add() only
- * enters the names of vectors,
- * which will be used in the integration
- * loop over cells and faces,
- * this function links the
- * names to actual vectos in a
- * NamedData object.
+ * Initialize the selection field with a data vector. While add()
+ * only enters the names of vectors, which will be used in the
+ * integration loop over cells and faces, this function links the
+ * names to actual vectos in a AnyData object.
*
- * @note This function caches
- * the index associated with a
- * name. Therefore, it must be
- * called every time after the
- * NamedData object has changed.
+ * @note This function caches the index associated with a
+ * name. Therefore, it must be called every time after the AnyData
+ * object has changed.
+ */
+ void initialize(const AnyData &);
+
+ /**
+ * @deprecated Use AnyData instead of NamedData.
*/
template <class DATA>
void initialize(const NamedData<DATA> &);
bool empty () const;
/**
- * Returns true if values are
- * selected for any vector.
+ * Returns true if values are selected for any vector.
*/
bool has_values () const;
/**
- * Returns true if gradients are
- * selected for any vector.
+ * Returns true if gradients are selected for any vector.
*/
bool has_gradients () const;
/**
- * Returns true if hessians are
- * selected for any vector.
+ * Returns true if hessians are selected for any vector.
*/
bool has_hessians () const;
* selection to the stream.
*/
template <class STREAM, typename DATA>
+ void print (STREAM &s, const AnyData &v) const;
+
+ /**
+ * @deprecated Use AnyData instead of NamedData.
+ */
+ template <class STREAM, typename DATA>
void print (STREAM &s, const NamedData<DATA> &v) const;
/**
NamedSelection value_selection;
/**
- * Selection of the vectors
- * used to compute gradients.
+ * Selection of the vectors used to compute gradients.
*/
NamedSelection gradient_selection;
/**
- * Selection of the vectors
- * used to compute hessians.
+ * Selection of the vectors used to compute hessians.
*/
NamedSelection hessian_selection;
};
VectorDataBase();
/**
- * Constructor from a base
- * class object
+ * Constructor from a base class object
*/
VectorDataBase(const VectorSelector &);
/**
- * Virtual, but empty
- * destructor.
+ * Initialize with a AnyData object and cache the indices in the
+ * VectorSelector base class.
+ *
+ * @note Make sure the VectorSelector base class was filled with
+ * reasonable data before calling this function.
+ */
+ void initialize(const AnyData&);
+
+ /**
+ * Virtual, but empty destructor.
*/
virtual ~VectorDataBase();
/**
- * The only function added to
- * VectorSelector is an
- * abstract virtual function
- * implemented in the derived
- * class template and called by
- * IntegrationInfo.
+ * The only function added to VectorSelector is an abstract
+ * virtual function implemented in the derived class template and
+ * called by IntegrationInfo.
*
- * Depending on the selections
- * made in our base class, this
- * fills the first three
- * arguments with the local
- * data of the finite element
- * functions. It is usually
- * called either for the whole
- * FESystem, or for each base
- * element separately.
+ * Depending on the selections made in our base class, this fills
+ * the first three arguments with the local data of the finite
+ * element functions. It is usually called either for the whole
+ * FESystem, or for each base element separately.
*
- * @param values is the vector
- * filled with the values of
- * the finite element function
- * in the quadrature points.
+ * @param values is the vector filled with the values of the
+ * finite element function in the quadrature points.
*
- * @param gradients is the vector
- * filled with the derivatives of
- * the finite element function
- * in the quadrature points.
+ * @param gradients is the vector filled with the derivatives of
+ * the finite element function in the quadrature points.
*
- * @param hessians is the
- * vector filled with the
- * second derivatives of the
- * finite element function in
- * the quadrature points.
+ * @param hessians is the vector filled with the second
+ * derivatives of the finite element function in the quadrature
+ * points.
*
- * @param fe is the
- * FEValuesBase object which is
- * used to compute the function
- * values. Its UpdateFlags must
- * have been set appropriately.
+ * @param fe is the FEValuesBase object which is used to compute
+ * the function values. Its UpdateFlags must have been set
+ * appropriately.
*
- * @param index is the local
- * index vector. If @p fe
- * refers to base elements of
- * the system, this vector
- * should be sorted by block
- * and the arguments @p start
- * and @p size below specify
- * the subset of @p indices
- * used.
+ * @param index is the local index vector. If @p fe refers to base
+ * elements of the system, this vector should be sorted by block
+ * and the arguments @p start and @p size below specify the subset
+ * of @p indices used.
*
- * @param component is the first
- * index in @p values, @p
- * gradients and @p hessians
- * entered in this function.
+ * @param component is the first index in @p values, @p gradients
+ * and @p hessians entered in this function.
*
- * @param n_comp is the number
- * of components to be filled.
+ * @param n_comp is the number of components to be filled.
*
- * @param start is the first
- * index of this block in @p
- * indices, or zero if
- * no base elements are used.
+ * @param start is the first index of this block in @p indices, or
+ * zero if no base elements are used.
*
- * @param size is the number of
- * dofs per cell of the current
+ * @param size is the number of dofs per cell of the current
* element or base element.
*/
virtual void fill(
const unsigned int size) const;
/**
- * Fill the local data vector
- * from level vectors. Performs
- * exactly what the other
- * fill() does, but uses the
- * cell level to access a
- * single level out of a
- * hierarchy of level vectors,
- * instead of a global data
- * vector on the active cells.
+ * Fill the local data vector from level vectors. Performs exactly
+ * what the other fill() does, but uses the cell level to access a
+ * single level out of a hierarchy of level vectors, instead of a
+ * global data vector on the active cells.
*/
virtual void mg_fill(
std::vector<std::vector<std::vector<double> > > &values,
* The memory used by this object.
*/
std::size_t memory_consumption () const;
+ protected:
+ AnyData data;
};
/**
* Based on VectorSelector, this is the class that implements the
* function VectorDataBase::fill() for a certain type of vector, using
- * NamedData to identify vectors by name.
+ * AnyData to identify vectors by name.
*
* @ingroup MeshWorker
* @author Guido Kanschat, 2009
VectorData(const VectorSelector &);
/**
- * Initialize with a NamedData
- * object and cache the indices
- * in the VectorSelector base
- * class.
- *
- * @note Make sure the
- * VectorSelector base class
- * was filled with reasonable
- * data before calling this
- * function.
+ * @deprecated Use AnyData instead of NamedData.
*/
void initialize(const NamedData<VECTOR *> &);
/**
- * Initialize with a single
- * vector and cache the indices
- * in the VectorSelector base
- * class.
+ * Initialize with a single vector and cache the indices in the
+ * VectorSelector base class.
*
- * @note Make sure the
- * VectorSelector base class
- * was filled with reasonable
- * data before calling this
- * function.
+ * @note Make sure the VectorSelector base class was filled with
+ * reasonable data before calling this function.
*/
void initialize(const VECTOR *, const std::string &name);
const unsigned int start,
const unsigned int size) const;
- /**
+ virtual void mg_fill(
+ std::vector<std::vector<std::vector<double> > > &values,
+ std::vector<std::vector<std::vector<Tensor<1,dim> > > > &gradients,
+ std::vector<std::vector<std::vector<Tensor<2,dim> > > > &hessians,
+ const FEValuesBase<dim,spacedim> &fe,
+ const unsigned int level,
+ const std::vector<types::global_dof_index> &index,
+ const unsigned int component,
+ const unsigned int n_comp,
+ const unsigned int start,
+ const unsigned int size) const;
+
+ /**
* The memory used by this object.
*/
std::size_t memory_consumption () const;
-
- private:
- NamedData<SmartPointer<const VECTOR,VectorData<VECTOR,dim,spacedim> > > data;
};
/**
* Based on VectorSelector, this is the class that implements the
* function VectorDataBase::fill() for a certain type of multilevel vectors, using
- * NamedData to identify vectors by name.
+ * AnyData to identify vectors by name.
*
* @ingroup MeshWorker
* @author Guido Kanschat, 2010
*/
template <class VECTOR, int dim, int spacedim = dim>
class MGVectorData :
- public VectorDataBase<dim, spacedim>
+ public VectorData<VECTOR, dim, spacedim>
{
public:
/**
*/
MGVectorData();
/**
- * Constructor using a
- * prefilled VectorSelector
+ * Constructor using a prefilled VectorSelector
*/
MGVectorData(const VectorSelector &);
/**
- * Initialize with a NamedData
- * object and cache the indices
- * in the VectorSelector base
- * class.
- *
- * @note Make sure the
- * VectorSelector base class
- * was filled with reasonable
- * data before calling this
- * function.
+ * @deprecated Use AnyData instead of NamedData.
*/
void initialize(const NamedData<MGLevelObject<VECTOR>*> &);
/**
- * Initialize with a single
- * vector and cache the indices
- * in the VectorSelector base
- * class.
+ * Initialize with a single vector and cache the indices in the
+ * VectorSelector base class.
*
- * @note Make sure the
- * VectorSelector base class
- * was filled with reasonable
- * data before calling this
- * function.
+ * @note Make sure the VectorSelector base class was filled with
+ * reasonable data before calling this function.
*/
void initialize(const MGLevelObject<VECTOR> *, const std::string &name);
- virtual void mg_fill(
- std::vector<std::vector<std::vector<double> > > &values,
- std::vector<std::vector<std::vector<Tensor<1,dim> > > > &gradients,
- std::vector<std::vector<std::vector<Tensor<2,dim> > > > &hessians,
- const FEValuesBase<dim,spacedim> &fe,
- const unsigned int level,
- const std::vector<types::global_dof_index> &index,
- const unsigned int component,
- const unsigned int n_comp,
- const unsigned int start,
- const unsigned int size) const;
/**
* The memory used by this object.
*/
std::size_t memory_consumption () const;
-
- private:
- NamedData<SmartPointer<const MGLevelObject<VECTOR>,MGVectorData<VECTOR,dim,spacedim> > > data;
};
//}
+ inline void
+ VectorSelector::initialize(const AnyData &src)
+ {
+ value_selection.initialize(src);
+ gradient_selection.initialize(src);
+ hessian_selection.initialize(src);
+ }
+
template <typename DATA>
inline void
VectorSelector::initialize(const NamedData<DATA> &src)
}
+ template <class STREAM, typename DATA>
+ inline void
+ VectorSelector::print(STREAM &s, const AnyData &v) const
+ {
+ s << "values: ";
+ for (unsigned int i=0; i<n_values(); ++i)
+ s << " '" << v.name(value_selection(i)) << '\'';
+ s << std::endl << "gradients:";
+ for (unsigned int i=0; i<n_gradients(); ++i)
+ s << " '" << v.name(gradient_selection(i)) << '\'';
+ s << std::endl << "hessians: ";
+ for (unsigned int i=0; i<n_hessians(); ++i)
+ s << " '" << v.name(hessian_selection(i)) << '\'';
+ s << std::endl;
+ }
+
+
template <class STREAM, typename DATA>
inline void
VectorSelector::print(STREAM &s, const NamedData<DATA> &v) const
{}
+ template <int dim, int spacedim>
+ void
+ VectorDataBase<dim, spacedim>::initialize(const AnyData &d)
+ {
+ this->data = d;
+ VectorSelector::initialize(d);
+ }
+
+
template <int dim, int spacedim>
void
VectorDataBase<dim, spacedim>::fill(
void
VectorData<VECTOR, dim, spacedim>::initialize(const NamedData<VECTOR *> &d)
{
- data = d;
+ this->data = d;
VectorSelector::initialize(d);
}
VectorData<VECTOR, dim, spacedim>::initialize(const VECTOR *v, const std::string &name)
{
SmartPointer<const VECTOR,VectorData<VECTOR, dim, spacedim> > p = v;
- data.add(p, name);
- VectorSelector::initialize(data);
+ this->data.add(p, name);
+ VectorSelector::initialize(this->data);
}
AssertDimension(gradients.size(), this->n_gradients());
AssertDimension(hessians.size(), this->n_hessians());
+ const AnyData& data = this->data;
for (unsigned int i=0; i<this->n_values(); ++i)
{
- const VECTOR &src = *data(this->value_index(i));
+ const VECTOR* src = data.read_ptr<VECTOR>(this->value_index(i));
VectorSlice<std::vector<std::vector<double> > > dst(values[i], component, n_comp);
- fe.get_function_values(src, make_slice(index, start, size), dst, true);
+ fe.get_function_values(*src, make_slice(index, start, size), dst, true);
}
for (unsigned int i=0; i<this->n_gradients(); ++i)
{
- const VECTOR &src = *data(this->gradient_index(i));
+ const VECTOR* src = data.read_ptr<VECTOR>(this->gradient_index(i));
VectorSlice<std::vector<std::vector<Tensor<1,dim> > > > dst(gradients[i], component, n_comp);
- fe.get_function_gradients(src, make_slice(index, start, size), dst, true);
+ fe.get_function_gradients(*src, make_slice(index, start, size), dst, true);
}
for (unsigned int i=0; i<this->n_hessians(); ++i)
{
- const VECTOR &src = *data(this->hessian_index(i));
+ const VECTOR* src = data.read_ptr<VECTOR>(this->hessian_index(i));
VectorSlice<std::vector<std::vector<Tensor<2,dim> > > > dst(hessians[i], component, n_comp);
- fe.get_function_hessians(src, make_slice(index, start, size), dst, true);
+ fe.get_function_hessians(*src, make_slice(index, start, size), dst, true);
}
}
VectorData<VECTOR, dim, spacedim>::memory_consumption () const
{
std::size_t mem = VectorSelector::memory_consumption();
- mem += sizeof (data);
+ mem += sizeof (this->data);
return mem;
}
template <class VECTOR, int dim, int spacedim>
MGVectorData<VECTOR, dim, spacedim>::MGVectorData(const VectorSelector &s)
- :
- VectorDataBase<dim, spacedim>(s)
+ :
+ VectorData<VECTOR, dim, spacedim>(s)
{}
void
MGVectorData<VECTOR, dim, spacedim>::initialize(const NamedData<MGLevelObject<VECTOR>*> &d)
{
- data = d;
+ this->data = d;
VectorSelector::initialize(d);
}
{
SmartPointer<const MGLevelObject<VECTOR>, MGVectorData<VECTOR, dim, spacedim> >
p = v;
- data.add(p, name);
- VectorSelector::initialize(data);
+ this->data.add(p, name);
+ VectorSelector::initialize(this->data);
}
template <class VECTOR, int dim, int spacedim>
void
- MGVectorData<VECTOR, dim, spacedim>::mg_fill(
+ VectorData<VECTOR, dim, spacedim>::mg_fill(
std::vector<std::vector<std::vector<double> > > &values,
std::vector<std::vector<std::vector<Tensor<1,dim> > > > &gradients,
std::vector<std::vector<std::vector<Tensor<2,dim> > > > &hessians,
AssertDimension(gradients.size(), this->n_gradients());
AssertDimension(hessians.size(), this->n_hessians());
+ const AnyData& data = this->data;
for (unsigned int i=0; i<this->n_values(); ++i)
{
- const VECTOR &src = (*data(this->value_index(i)))[level];
+ const MGLevelObject<VECTOR>* src = data.read_ptr<MGLevelObject<VECTOR> >(this->value_index(i));
VectorSlice<std::vector<std::vector<double> > > dst(values[i], component, n_comp);
- fe.get_function_values(src, make_slice(index, start, size), dst, true);
+ fe.get_function_values((*src)[level], make_slice(index, start, size), dst, true);
}
for (unsigned int i=0; i<this->n_gradients(); ++i)
{
- const VECTOR &src = (*data(this->value_index(i)))[level];
+ const MGLevelObject<VECTOR>* src = data.read_ptr<MGLevelObject<VECTOR> >(this->value_index(i));
VectorSlice<std::vector<std::vector<Tensor<1,dim> > > > dst(gradients[i], component, n_comp);
- fe.get_function_gradients(src, make_slice(index, start, size), dst, true);
+ fe.get_function_gradients((*src)[level], make_slice(index, start, size), dst, true);
}
for (unsigned int i=0; i<this->n_hessians(); ++i)
{
- const VECTOR &src = (*data(this->value_index(i)))[level];
+ const MGLevelObject<VECTOR>* src = data.read_ptr<MGLevelObject<VECTOR> >(this->value_index(i));
VectorSlice<std::vector<std::vector<Tensor<2,dim> > > > dst(hessians[i], component, n_comp);
- fe.get_function_hessians(src, make_slice(index, start, size), dst, true);
+ fe.get_function_hessians((*src)[level], make_slice(index, start, size), dst, true);
}
}
-
-
- template <class VECTOR, int dim, int spacedim>
- std::size_t
- MGVectorData<VECTOR, dim, spacedim>::memory_consumption () const
- {
- std::size_t mem = VectorSelector::memory_consumption();
- mem += sizeof (data);
- return mem;
- }
}
DEAL_II_NAMESPACE_CLOSE
* the sequence of cells to be converted into patches itself, but relies
* on the two functions first_cell() and next_cell(). By default, they
* return the first active cell, and the next active cell, respectively.
- * Since they are @p virtual functions, you may overload them to select other
- * cells for output. If cells are not active, interpolated values are taken
- * for output instead of the exact values on active cells.
+ * Since they are @p virtual functions, you can write your own class
+ * derived from DataOut in which you overload these two functions to select other
+ * cells for output. This may, for example, include only cells that are
+ * in parts of a domain (e.g., if you don't care about the solution elsewhere,
+ * think for example a buffer region in which you attenuate outgoing waves
+ * in the Perfectly Matched Layer method) or if you don't want output to
+ * be generated at all levels of an adaptively refined mesh because this
+ * creates too much data (in this case, the set of cells returned by
+ * your implementations of first_cell() and next_cell() will include
+ * non-active cells, and DataOut::build_patches() will simply take
+ * interpolated values of the solution instead of the exact values on these
+ * cells children for output). Once you derive your own class, you would
+ * just create an object of this type instead of an object of type DataOut,
+ * and everything else will remain the same.
*
* The two functions are not constant, so you may store information within
* your derived class about the last accessed cell. This is useful if the
#define __deal2__dof_output_operator_h
#include <deal.II/base/config.h>
+#include <deal.II/base/parameter_handler.h>
#include <deal.II/base/named_data.h>
+#include <deal.II/algorithms/any_data.h>
#include <deal.II/base/event.h>
#include <deal.II/algorithms/operator.h>
#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/numerics/data_out.h>
#include <fstream>
namespace Algorithms
{
+ /**
+ * An output operator writing a separate file in each step and
+ * writing the vectors as finite element functions with respect to a
+ * given DoFHandler.
+ */
template <class VECTOR, int dim, int spacedim=dim>
class DoFOutputOperator : public OutputOperator<VECTOR>
{
public:
+ /*
+ * Constructor. The <tt>filename</tt> is the common base name of
+ * all files and the argument <tt>digits</tt> should be the number
+ * of digits of the highest number in the sequence. File names by
+ * default have the form "outputNN" with NNN the number set by the
+ * last step command. Numbers with less digits are filled with
+ * zeros from the left.
+ */
+ DoFOutputOperator (const std::string filename_base = std::string("output"),
+ const unsigned int digits = 3);
+
+ void parse_parameters(ParameterHandler ¶m);
void initialize (DoFHandler<dim, spacedim> &dof_handler);
virtual OutputOperator<VECTOR> &
- operator<<(const NamedData<VECTOR *> &vectors);
+ operator << (const AnyData &vectors);
private:
SmartPointer<DoFHandler<dim, spacedim>,
DoFOutputOperator<VECTOR, dim, spacedim> > dof;
+
+ const std::string filename_base;
+ const unsigned int digits;
+
+ DataOut<dim> out;
};
template <class VECTOR, int dim, int spacedim>
#include <deal.II/numerics/dof_output_operator.h>
-#include <deal.II/numerics/data_out.h>
DEAL_II_NAMESPACE_OPEN
namespace Algorithms
{
+ template <class VECTOR, int dim, int spacedim>
+ DoFOutputOperator<VECTOR, dim, spacedim>::DoFOutputOperator (
+ const std::string filename_base,
+ const unsigned int digits)
+ :
+ filename_base(filename_base),
+ digits(digits)
+ {
+ out.set_default_format(DataOutBase::gnuplot);
+ }
+
+
+ template <class VECTOR, int dim, int spacedim>
+ void
+ DoFOutputOperator<VECTOR, dim, spacedim>::parse_parameters(ParameterHandler ¶m)
+ {
+ out.parse_parameters(param);
+ }
+
template <class VECTOR, int dim, int spacedim>
OutputOperator<VECTOR> &
DoFOutputOperator<VECTOR, dim, spacedim>::operator<<(
- const NamedData<VECTOR *> &vectors)
+ const AnyData &data)
{
Assert ((dof!=0), ExcNotInitialized());
- DataOut<dim> out;
out.attach_dof_handler (*dof);
- out.add_data_vector (*vectors(vectors.find("solution")), "solution");
- out.add_data_vector (*vectors(vectors.find("update")), "update");
- out.add_data_vector (*vectors(vectors.find("residual")), "residual");
+ for (unsigned int i=0; i<data.size(); ++i)
+ {
+ const VECTOR *p = data.try_read_ptr<VECTOR>(i);
+ if (p!=0)
+ {
+ out.add_data_vector (*p, data.name(i));
+ }
+ }
std::ostringstream streamOut;
- streamOut << "Newton_" << std::setw(3) << std::setfill('0') << this->step;
+ streamOut << filename_base
+ << std::setw(digits) << std::setfill('0') << this->step
+ << out.default_suffix();
std::ofstream out_filename (streamOut.str().c_str());
- out.build_patches (2);
- out.write_gnuplot (out_filename);
+ out.build_patches ();
+ out.write (out_filename);
+ out.clear ();
return *this;
}
}
const std::string value = p->second.get<std::string>("value");
// print name
- out << "\\item {\\it Parameter name:} {\\tt " << demangle(p->first) << "}\n\n"
+ out << "\\item {\\it Parameter name:} {\\tt " << demangle(p->first) << "}\n"
+ << "\\phantomsection\\label{parameters:";
+ for (unsigned int i=0; i<subsection_path.size(); ++i)
+ out << subsection_path[i] << "/";
+ out << demangle(p->first);
+ out << "}\n\n"
<< std::endl;
out << "\\index[prmindex]{"
// ---------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2004 - 2013 by the deal.II authors
+// Copyright (C) 2004 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
* factorization here we start to see differences with the base
* class solve function
*/
+#if DEAL_II_PETSC_VERSION_GTE(3,2,0)
ierr = PCFactorSetMatSolverPackage (solver_data->pc, MATSOLVERMUMPS);
+#else
+ ierr = PCFactorSetMatSolverPackage (solver_data->pc, MAT_SOLVER_MUMPS);
+#endif
AssertThrow (ierr == 0, ExcPETScError (ierr));
/**
// ---------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 1998 - 2013 by the deal.II authors
+// Copyright (C) 1998 - 2014 by the deal.II authors
//
// This file is part of the deal.II library.
//
Assert (matrix.n() == solution.size(),
ExcDimensionMismatch(matrix.n(), solution.size()));
- // if no boundary values are to be applied
- // simply return
- if (boundary_values.size() == 0)
- return;
-
- const std::pair<types::global_dof_index, types::global_dof_index> local_range
- = matrix.local_range();
- Assert (local_range == right_hand_side.local_range(),
- ExcInternalError());
- Assert (local_range == solution.local_range(),
- ExcInternalError());
-
- // determine the first nonzero diagonal
- // entry from within the part of the
- // matrix that we can see. if we can't
- // find such an entry, take one
- PetscScalar average_nonzero_diagonal_entry = 1;
- for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
- if (matrix.diag_element(i) != 0)
- {
- average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
- break;
- }
-
- // figure out which rows of the matrix we
- // have to eliminate on this processor
- std::vector<types::global_dof_index> constrained_rows;
- for (std::map<types::global_dof_index,double>::const_iterator
- dof = boundary_values.begin();
- dof != boundary_values.end();
- ++dof)
- if ((dof->first >= local_range.first) &&
- (dof->first < local_range.second))
- constrained_rows.push_back (dof->first);
-
- // then eliminate these rows and set
- // their diagonal entry to what we have
- // determined above. note that for petsc
- // matrices interleaving read with write
- // operations is very expensive. thus, we
- // here always replace the diagonal
- // element, rather than first checking
- // whether it is nonzero and in that case
- // preserving it. this is different from
- // the case of deal.II sparse matrices
- // treated in the other functions.
- matrix.clear_rows (constrained_rows, average_nonzero_diagonal_entry);
+ // if no boundary values are to be applied, then
+ // jump straight to the compress() calls that we still have
+ // to perform because they are collective operations
+ if (boundary_values.size() > 0)
+ {
+ const std::pair<types::global_dof_index, types::global_dof_index> local_range
+ = matrix.local_range();
+ Assert (local_range == right_hand_side.local_range(),
+ ExcInternalError());
+ Assert (local_range == solution.local_range(),
+ ExcInternalError());
+
+ // determine the first nonzero diagonal
+ // entry from within the part of the
+ // matrix that we can see. if we can't
+ // find such an entry, take one
+ PetscScalar average_nonzero_diagonal_entry = 1;
+ for (types::global_dof_index i=local_range.first; i<local_range.second; ++i)
+ if (matrix.diag_element(i) != 0)
+ {
+ average_nonzero_diagonal_entry = std::fabs(matrix.diag_element(i));
+ break;
+ }
- std::vector<types::global_dof_index> indices;
- std::vector<PetscScalar> solution_values;
- for (std::map<types::global_dof_index,double>::const_iterator
- dof = boundary_values.begin();
- dof != boundary_values.end();
- ++dof)
- if ((dof->first >= local_range.first) &&
- (dof->first < local_range.second))
- {
- indices.push_back (dof->first);
- solution_values.push_back (dof->second);
- }
- solution.set (indices, solution_values);
+ // figure out which rows of the matrix we
+ // have to eliminate on this processor
+ std::vector<types::global_dof_index> constrained_rows;
+ for (std::map<types::global_dof_index,double>::const_iterator
+ dof = boundary_values.begin();
+ dof != boundary_values.end();
+ ++dof)
+ if ((dof->first >= local_range.first) &&
+ (dof->first < local_range.second))
+ constrained_rows.push_back (dof->first);
- // now also set appropriate values for
- // the rhs
- for (unsigned int i=0; i<solution_values.size(); ++i)
- solution_values[i] *= average_nonzero_diagonal_entry;
+ // then eliminate these rows and set
+ // their diagonal entry to what we have
+ // determined above. note that for petsc
+ // matrices interleaving read with write
+ // operations is very expensive. thus, we
+ // here always replace the diagonal
+ // element, rather than first checking
+ // whether it is nonzero and in that case
+ // preserving it. this is different from
+ // the case of deal.II sparse matrices
+ // treated in the other functions.
+ matrix.clear_rows (constrained_rows, average_nonzero_diagonal_entry);
+
+ std::vector<types::global_dof_index> indices;
+ std::vector<PetscScalar> solution_values;
+ for (std::map<types::global_dof_index,double>::const_iterator
+ dof = boundary_values.begin();
+ dof != boundary_values.end();
+ ++dof)
+ if ((dof->first >= local_range.first) &&
+ (dof->first < local_range.second))
+ {
+ indices.push_back (dof->first);
+ solution_values.push_back (dof->second);
+ }
+ solution.set (indices, solution_values);
- right_hand_side.set (indices, solution_values);
+ // now also set appropriate values for
+ // the rhs
+ for (unsigned int i=0; i<solution_values.size(); ++i)
+ solution_values[i] *= average_nonzero_diagonal_entry;
+ right_hand_side.set (indices, solution_values);
+ }
+ else
+ {
+ // clear_rows() is a collective operation so we still have to call
+ // it:
+ std::vector<types::global_dof_index> constrained_rows;
+ matrix.clear_rows (constrained_rows, 1.);
+ }
+
// clean up
matrix.compress ();
solution.compress (VectorOperation::insert);
DEAL:Newton::Check 0 98.0000
DEAL:Newton::Starting value 98.0000
+DEAL:Newton::Step 1
+DEAL:Newton::solution 10.0000
+DEAL:Newton::update 4.90000
+DEAL:Newton::residual 98.0000
+DEAL:Newton::
DEAL:Newton::Check 1 24.0100
+DEAL:Newton::Step 2
+DEAL:Newton::solution 5.10000
+DEAL:Newton::update 2.35392
+DEAL:Newton::residual 24.0100
+DEAL:Newton::
DEAL:Newton::Check 2 5.54095
+DEAL:Newton::Step 3
+DEAL:Newton::solution 2.74608
+DEAL:Newton::update 1.00888
+DEAL:Newton::residual 5.54095
+DEAL:Newton::
DEAL:Newton::Check 3 1.01785
+DEAL:Newton::Step 4
+DEAL:Newton::solution 1.73719
+DEAL:Newton::update 0.292957
+DEAL:Newton::residual 1.01785
+DEAL:Newton::
DEAL:Newton::Check 4 0.0858237
+DEAL:Newton::Step 5
+DEAL:Newton::solution 1.44424
+DEAL:Newton::update 0.0297124
+DEAL:Newton::residual 0.0858237
+DEAL:Newton::
DEAL:Newton::Check 5 0.000882829
+DEAL:Newton::Step 6
+DEAL:Newton::solution 1.41453
+DEAL:Newton::update 0.000312058
+DEAL:Newton::residual 0.000882829
+DEAL:Newton::
DEAL:Newton::Check 6 9.73804e-08
+DEAL:Newton::Step 7
+DEAL:Newton::solution 1.41421
+DEAL:Newton::update 3.44292e-08
+DEAL:Newton::residual 9.73804e-08
+DEAL:Newton::
DEAL:Newton::Check 7 0
DEAL:Newton::Convergence step 7 value 0
DEAL:: square root 1.41421
DEAL:Newton::Check 0 98.0000
DEAL:Newton::Starting value 98.0000
+DEAL:Newton::Step 1
+DEAL:Newton::solution 10.0000
+DEAL:Newton::update 4.90000
+DEAL:Newton::residual 98.0000
+DEAL:Newton::
DEAL:Newton::Check 1 24.0100
+DEAL:Newton::Step 2
+DEAL:Newton::solution 5.10000
+DEAL:Newton::update 2.35392
+DEAL:Newton::residual 24.0100
+DEAL:Newton::
DEAL:Newton::Check 2 5.54095
+DEAL:Newton::Step 3
+DEAL:Newton::solution 2.74608
+DEAL:Newton::update 1.00888
+DEAL:Newton::residual 5.54095
+DEAL:Newton::
DEAL:Newton::Check 3 1.01785
+DEAL:Newton::Step 4
+DEAL:Newton::solution 1.73719
+DEAL:Newton::update 0.292957
+DEAL:Newton::residual 1.01785
+DEAL:Newton::
DEAL:Newton::Check 4 0.0858237
+DEAL:Newton::Step 5
+DEAL:Newton::solution 1.44424
+DEAL:Newton::update 0.0297124
+DEAL:Newton::residual 0.0858237
+DEAL:Newton::
DEAL:Newton::Check 5 0.000882829
+DEAL:Newton::Step 6
+DEAL:Newton::solution 1.41453
+DEAL:Newton::update 0.000312058
+DEAL:Newton::residual 0.000882829
+DEAL:Newton::
DEAL:Newton::Check 6 9.73804e-08
+DEAL:Newton::Step 7
+DEAL:Newton::solution 1.41421
+DEAL:Newton::update 3.44292e-08
+DEAL:Newton::residual 9.73804e-08
+DEAL:Newton::
DEAL:Newton::Check 7 0
DEAL:Newton::Convergence step 7 value 0
DEAL:: square root 1.41421
--- /dev/null
+// ---------------------------------------------------------------------
+// $Id: theta_timestepping.cc 30050 2013-07-18 20:03:31Z maier $
+//
+// Copyright (C) 2005 - 2013 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// See documentation of ThetaTimestepping for documentation of this example
+
+#include <deal.II/base/logstream.h>
+#include <deal.II/lac/vector.h>
+#include <deal.II/lac/full_matrix.h>
+
+#include <deal.II/algorithms/operator.h>
+#include <deal.II/algorithms/theta_timestepping.h>
+
+#include <iostream>
+
+using namespace dealii;
+using namespace Algorithms;
+
+
+class Explicit
+ : public Operator<Vector<double> >
+{
+public:
+ Explicit(const FullMatrix<double> &matrix);
+ void operator() (AnyData &out, const AnyData &in);
+private:
+ SmartPointer<const FullMatrix<double>, Explicit> matrix;
+ FullMatrix<double> m;
+};
+
+
+class Implicit
+ : public Operator<Vector<double> >
+{
+public:
+ Implicit(const FullMatrix<double> &matrix);
+ void operator() (AnyData &out, const AnyData &in);
+private:
+ SmartPointer<const FullMatrix<double>, Implicit> matrix;
+ FullMatrix<double> m;
+};
+
+// End of declarations
+
+int main()
+{
+ std::string logname = "output";
+ std::ofstream logfile(logname.c_str());
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+ deallog.threshold_double(1.e-10);
+
+ FullMatrix<double> matrix(2);
+ matrix(0,0) = 0.;
+ matrix(1,1) = 0.;
+ matrix(0,1) = numbers::PI;
+ matrix(1,0) = -numbers::PI;
+
+ OutputOperator<Vector<double> > out;
+ out.initialize_stream(logfile);
+
+ Explicit op_explicit(matrix);
+ Implicit op_implicit(matrix);
+ ThetaTimestepping<Vector<double> > solver(op_explicit, op_implicit);
+ solver.timestep_control().start_step(0.1);
+ //solver.set_output(out);
+
+ Vector<double> value(2);
+ value(0) = 1.;
+ AnyData indata;
+ AnyData outdata;
+ Vector<double> *p = &value;
+ outdata.add(p, "value");
+ deallog << "Initial: " << value(0) << ' ' << value(1) << std::endl;
+ solver.notify(Events::initial);
+ solver(outdata, indata);
+ deallog << "Result: " << value(0) << ' ' << value(1)
+ << " Norm " << value.l2_norm() << std::endl;
+}
+
+
+Explicit::Explicit(const FullMatrix<double> &M)
+ :
+ matrix(&M)
+{
+ m.reinit(M.m(), M.n());
+}
+
+
+void
+Explicit::operator() (AnyData &out, const AnyData &in)
+{
+ const double* step = in.read_ptr<double>("Timestep");
+
+ if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size))
+ {
+ m.equ(-*step, *matrix);
+ for (unsigned int i=0; i<m.m(); ++i)
+ m(i,i) += 1.;
+ }
+ this->notifications.clear();
+ unsigned int i = in.find("Previous iterate");
+ m.vmult(*out.entry<Vector<double>*>(0), *in.read_ptr<Vector<double> >(i));
+}
+
+
+Implicit::Implicit(const FullMatrix<double> &M)
+ :
+ matrix(&M)
+{
+ m.reinit(M.m(), M.n());
+}
+
+
+void
+Implicit::operator() (AnyData &out, const AnyData &in)
+{
+ const double * step = in.read_ptr<double>("Timestep");
+
+ if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size))
+ {
+ m.equ(*step, *matrix);
+ for (unsigned int i=0; i<m.m(); ++i)
+ m(i,i) += 1.;
+ m.gauss_jordan();
+ }
+ this->notifications.clear();
+
+ unsigned int i = in.find("Previous time");
+ m.vmult(*out.entry<Vector<double>*>(0), *in.read_ptr<Vector<double> >(i));
+}
+
+
--- /dev/null
+
+DEAL::Initial: 1.00000 0
+DEAL:Theta::Time step:0.100000
+DEAL:Theta::Time step:0.200000
+DEAL:Theta::Time step:0.300000
+DEAL:Theta::Time step:0.400000
+DEAL:Theta::Time step:0.500000
+DEAL:Theta::Time step:0.600000
+DEAL:Theta::Time step:0.700000
+DEAL:Theta::Time step:0.800000
+DEAL:Theta::Time step:0.900000
+DEAL:Theta::Time step:1.00000
+DEAL::Result: -0.999676 0.0254599 Norm 1.00000
\begin{itemize}
\item {\it Parameter name:} {\tt double}
+\phantomsection\label{parameters:Testing/double}
\index[prmindex]{double}
{\it Possible values:} [Double -1.79769e+308...1.79769e+308 (inclusive)]
\item {\it Parameter name:} {\tt int}
+\phantomsection\label{parameters:Testing/int}
\index[prmindex]{int}
{\it Possible values:} [Integer range -2147483648...2147483647 (inclusive)]
\item {\it Parameter name:} {\tt string list}
+\phantomsection\label{parameters:Testing/string list}
\index[prmindex]{string list}
\begin{itemize}
\item {\it Parameter name:} {\tt double}
+\phantomsection\label{parameters:Testing/double}
\index[prmindex]{double}
{\it Possible values:} [Double -1.79769e+308...1.79769e+308 (inclusive)]
\item {\it Parameter name:} {\tt int}
+\phantomsection\label{parameters:Testing/int}
\index[prmindex]{int}
{\it Possible values:} [Integer range -2147483648...2147483647 (inclusive)]
\item {\it Parameter name:} {\tt string list}
+\phantomsection\label{parameters:Testing/string list}
\index[prmindex]{string list}
\begin{itemize}
\item {\it Parameter name:} {\tt double 2}
+\phantomsection\label{parameters:Testing/Testing 2/double 2}
\index[prmindex]{double 2}
{\it Possible values:} [Double -1.79769e+308...1.79769e+308 (inclusive)]
\item {\it Parameter name:} {\tt int 2}
+\phantomsection\label{parameters:Testing/Testing 2/int 2}
\index[prmindex]{int 2}
{\it Possible values:} [Integer range -2147483648...2147483647 (inclusive)]
\item {\it Parameter name:} {\tt string list 2}
+\phantomsection\label{parameters:Testing/Testing 2/string list 2}
\index[prmindex]{string list 2}
template <typename number>
void test (unsigned int variant)
{
- const unsigned int n = variant < 3 ? 64 : 16;
+ const unsigned int n = variant % 2 == 0 ? 64 : 16;
Vector<number> rhs(n), sol(n);
rhs = 1.;
matrix(i,i) = (i+1);
else if (variant == 1)
for (unsigned int i=0; i<n; ++i)
- matrix(i,i) = (i+1) * (i+1) * (i+1) * (i+1);
+ matrix(i,i) = (i+1) * (i+1) * (i+1) * (i+1) * 1.001;
else if (variant == 2)
for (unsigned int i=0; i<n; ++i)
matrix(i,i) = (i%2?1.:-1.)*(i+1);
int main()
{
std::ofstream logfile("output");
- deallog << std::setprecision(3);
+ deallog << std::setprecision(2);
deallog.attach(logfile);
deallog.depth_console(0);
- deallog.threshold_double(1.e-10);
+ deallog.threshold_double(1.e-8);
deallog.push("double");
test<double>(0);
-DEAL:double:0:GMRES::Starting value 8.00
+DEAL:double:0:GMRES::Starting value 8.0
DEAL:double:0:GMRES::Convergence step 56 value 0
-DEAL:double:0:GMRES::Eigenvalue estimate: (1.00,0.00) (2.00,0.00) (3.00,0.00) (4.00,0.00) (5.00,0.00) (6.00,0.00) (7.00,0.00) (8.00,0.00) (9.00,0.00) (10.0,0.00) (11.0,0.00) (12.0,0.00) (13.0,0.00) (14.0,0.00) (15.0,0.00) (16.0,0.00) (17.1,0.00) (18.2,0.00) (19.5,0.00) (20.7,0.00) (22.0,0.00) (23.3,0.00) (24.7,0.00) (26.0,0.00) (27.5,0.00) (28.9,0.00) (30.3,0.00) (31.8,0.00) (33.2,0.00) (34.7,0.00) (36.1,0.00) (37.6,0.00) (39.0,0.00) (40.4,0.00) (41.7,0.00) (43.0,0.00) (44.3,0.00) (45.5,0.00) (46.7,0.00) (47.9,0.00) (49.0,0.00) (50.0,0.00) (51.0,0.00) (52.0,0.00) (53.0,0.00) (54.0,0.00) (55.0,0.00) (56.0,0.00) (57.0,0.00) (58.0,0.00) (59.0,0.00) (60.0,0.00) (61.0,0.00) (62.0,0.00) (63.0,0.00) (64.0,0.00)
-DEAL:double:0:cg::Starting value 8.00
+DEAL:double:0:GMRES::Eigenvalue estimate: (1.0,0.0) (2.0,0.0) (3.0,0.0) (4.0,0.0) (5.0,0.0) (6.0,0.0) (7.0,0.0) (8.0,0.0) (9.0,0.0) (10.,0.0) (11.,0.0) (12.,0.0) (13.,0.0) (14.,0.0) (15.,0.0) (16.,0.0) (17.,0.0) (18.,0.0) (19.,0.0) (21.,0.0) (22.,0.0) (23.,0.0) (25.,0.0) (26.,0.0) (27.,0.0) (29.,0.0) (30.,0.0) (32.,0.0) (33.,0.0) (35.,0.0) (36.,0.0) (38.,0.0) (39.,0.0) (40.,0.0) (42.,0.0) (43.,0.0) (44.,0.0) (46.,0.0) (47.,0.0) (48.,0.0) (49.,0.0) (50.,0.0) (51.,0.0) (52.,0.0) (53.,0.0) (54.,0.0) (55.,0.0) (56.,0.0) (57.,0.0) (58.,0.0) (59.,0.0) (60.,0.0) (61.,0.0) (62.,0.0) (63.,0.0) (64.,0.0)
+DEAL:double:0:cg::Starting value 8.0
DEAL:double:0:cg::Convergence step 56 value 0
-DEAL:double:0:cg:: 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.0 11.0 12.0 13.0 14.0 15.0 16.1 17.3 18.4 19.7 21.0 22.3 23.7 25.1 26.6 28.0 29.5 31.0 32.5 34.0 35.5 37.0 38.4 39.9 41.3 42.7 44.0 45.3 46.6 47.7 48.9 50.0 51.0 52.0 53.0 54.0 55.0 56.0 57.0 58.0 59.0 60.0 61.0 62.0 63.0 64.0
-DEAL:double:1:GMRES::Starting value 8.00
-DEAL:double:1:GMRES::Convergence step 64 value 4.41e-10
-DEAL:double:1:GMRES::Eigenvalue estimate: (1.00,0.00) (16.0,0.00) (81.0,0.00) (256.,0.00) (625.,0.00) (1.30e+03,0.00) (2.40e+03,0.00) (4.10e+03,0.00) (6.56e+03,0.00) (1.00e+04,0.00) (1.46e+04,0.00) (2.07e+04,0.00) (2.86e+04,0.00) (3.84e+04,0.00) (5.06e+04,0.00) (6.55e+04,0.00) (8.35e+04,0.00) (1.05e+05,0.00) (1.30e+05,0.00) (1.60e+05,0.00) (1.94e+05,0.00) (2.34e+05,0.00) (2.80e+05,0.00) (3.32e+05,0.00) (3.91e+05,0.00) (4.57e+05,0.00) (5.31e+05,0.00) (6.15e+05,0.00) (7.07e+05,0.00) (8.10e+05,0.00) (9.24e+05,0.00) (1.05e+06,0.00) (1.19e+06,0.00) (1.34e+06,0.00) (1.50e+06,0.00) (1.68e+06,0.00) (1.87e+06,0.00) (2.09e+06,0.00) (2.31e+06,0.00) (2.56e+06,0.00) (2.83e+06,0.00) (3.11e+06,0.00) (3.42e+06,0.00) (3.75e+06,0.00) (4.10e+06,0.00) (4.48e+06,0.00) (4.88e+06,0.00) (5.31e+06,0.00) (5.76e+06,0.00) (6.25e+06,0.00) (6.77e+06,0.00) (7.31e+06,0.00) (7.89e+06,0.00) (8.50e+06,0.00) (9.15e+06,0.00) (9.83e+06,0.00) (1.06e+07,0.00) (1.13e+07,0.00) (1.21e+07,0.00) (1.30e+07,0.00) (1.38e+07,0.00) (1.48e+07,0.00) (1.58e+07,0.00) (1.68e+07,0.00)
-DEAL:double:2:GMRES::Starting value 8.00
+DEAL:double:0:cg:: 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10. 11. 12. 13. 14. 15. 16. 17. 18. 20. 21. 22. 24. 25. 27. 28. 30. 31. 33. 34. 35. 37. 38. 40. 41. 43. 44. 45. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64.
+DEAL:double:1:GMRES::Starting value 4.0
+DEAL:double:1:GMRES::Convergence step 16 value 0
+DEAL:double:1:GMRES::Eigenvalue estimate: (1.0,0.0) (16.,0.0) (81.,0.0) (2.6e+02,0.0) (6.3e+02,0.0) (1.3e+03,0.0) (2.4e+03,0.0) (4.1e+03,0.0) (6.6e+03,0.0) (1.0e+04,0.0) (1.5e+04,0.0) (2.1e+04,0.0) (2.9e+04,0.0) (3.8e+04,0.0) (5.1e+04,0.0) (6.6e+04,0.0)
+DEAL:double:2:GMRES::Starting value 8.0
DEAL:double:2:GMRES::Convergence step 64 value 0
-DEAL:double:2:GMRES::Eigenvalue estimate: (-63.0,0.00) (-61.0,0.00) (-59.0,0.00) (-57.0,0.00) (-55.0,0.00) (-53.0,0.00) (-51.0,0.00) (-49.0,0.00) (-47.0,0.00) (-45.0,0.00) (-43.0,0.00) (-41.0,0.00) (-39.0,0.00) (-37.0,0.00) (-35.0,0.00) (-33.0,0.00) (-31.0,0.00) (-29.0,0.00) (-27.0,0.00) (-25.0,0.00) (-23.0,0.00) (-21.0,0.00) (-19.0,0.00) (-17.0,0.00) (-15.0,0.00) (-13.0,0.00) (-11.0,0.00) (-9.00,0.00) (-7.00,0.00) (-5.00,0.00) (-3.00,0.00) (-1.00,0.00) (2.00,0.00) (4.00,0.00) (6.00,0.00) (8.00,0.00) (10.0,0.00) (12.0,0.00) (14.0,0.00) (16.0,0.00) (18.0,0.00) (20.0,0.00) (22.0,0.00) (24.0,0.00) (26.0,0.00) (28.0,0.00) (30.0,0.00) (32.0,0.00) (34.0,0.00) (36.0,0.00) (38.0,0.00) (40.0,0.00) (42.0,0.00) (44.0,0.00) (46.0,0.00) (48.0,0.00) (50.0,0.00) (52.0,0.00) (54.0,0.00) (56.0,0.00) (58.0,0.00) (60.0,0.00) (62.0,0.00) (64.0,0.00)
-DEAL:double:3:GMRES::Starting value 4.00
+DEAL:double:2:GMRES::Eigenvalue estimate: (-63.,0.0) (-61.,0.0) (-59.,0.0) (-57.,0.0) (-55.,0.0) (-53.,0.0) (-51.,0.0) (-49.,0.0) (-47.,0.0) (-45.,0.0) (-43.,0.0) (-41.,0.0) (-39.,0.0) (-37.,0.0) (-35.,0.0) (-33.,0.0) (-31.,0.0) (-29.,0.0) (-27.,0.0) (-25.,0.0) (-23.,0.0) (-21.,0.0) (-19.,0.0) (-17.,0.0) (-15.,0.0) (-13.,0.0) (-11.,0.0) (-9.0,0.0) (-7.0,0.0) (-5.0,0.0) (-3.0,0.0) (-1.0,0.0) (2.0,0.0) (4.0,0.0) (6.0,0.0) (8.0,0.0) (10.,0.0) (12.,0.0) (14.,0.0) (16.,0.0) (18.,0.0) (20.,0.0) (22.,0.0) (24.,0.0) (26.,0.0) (28.,0.0) (30.,0.0) (32.,0.0) (34.,0.0) (36.,0.0) (38.,0.0) (40.,0.0) (42.,0.0) (44.,0.0) (46.,0.0) (48.,0.0) (50.,0.0) (52.,0.0) (54.,0.0) (56.,0.0) (58.,0.0) (60.,0.0) (62.,0.0) (64.,0.0)
+DEAL:double:3:GMRES::Starting value 4.0
DEAL:double:3:GMRES::Convergence step 16 value 0
-DEAL:double:3:GMRES::Eigenvalue estimate: (0.272,-1.14) (0.272,1.14) (1.52,-3.81) (1.52,3.81) (2.81,-3.71) (2.81,3.71) (4.50,-4.11) (4.50,4.11) (7.18,-5.38) (7.18,5.38) (10.3,-5.98) (10.3,5.98) (13.9,-5.92) (13.9,5.92) (18.5,-4.07) (18.5,4.07)
-DEAL:double:3::Actual eigenvalues: (0.272,-1.14) (0.272,1.14) (1.52,-3.81) (1.52,3.81) (2.81,-3.71) (2.81,3.71) (4.50,-4.11) (4.50,4.11) (7.18,-5.38) (7.18,5.38) (10.3,-5.98) (10.3,5.98) (13.9,-5.92) (13.9,5.92) (18.5,-4.07) (18.5,4.07)
+DEAL:double:3:GMRES::Eigenvalue estimate: (0.27,-1.1) (0.27,1.1) (1.5,-3.8) (1.5,3.8) (2.8,-3.7) (2.8,3.7) (4.5,-4.1) (4.5,4.1) (7.2,-5.4) (7.2,5.4) (10.,-6.0) (10.,6.0) (14.,-5.9) (14.,5.9) (19.,-4.1) (19.,4.1)
+DEAL:double:3::Actual eigenvalues: (0.27,-1.1) (0.27,1.1) (1.5,-3.8) (1.5,3.8) (2.8,-3.7) (2.8,3.7) (4.5,-4.1) (4.5,4.1) (7.2,-5.4) (7.2,5.4) (10.,-6.0) (10.,6.0) (14.,-5.9) (14.,5.9) (19.,-4.1) (19.,4.1)