From 9b5be7e53b6125435cd5d95fee10a08aadff7880 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 17 Apr 2020 19:17:08 -0400 Subject: [PATCH] Remove doc/doxygen/tutorial --- doc/doxygen/options.dox.in | 3 +- examples/doxygen/CMakeLists.txt | 29 ---- .../doxygen/block_dynamic_sparsity_pattern.cc | 83 ------------ examples/doxygen/theta_timestepping.cc | 128 ------------------ 4 files changed, 1 insertion(+), 242 deletions(-) delete mode 100644 examples/doxygen/CMakeLists.txt delete mode 100644 examples/doxygen/block_dynamic_sparsity_pattern.cc delete mode 100644 examples/doxygen/theta_timestepping.cc diff --git a/doc/doxygen/options.dox.in b/doc/doxygen/options.dox.in index a78bc4bae3..9c7b377fb0 100644 --- a/doc/doxygen/options.dox.in +++ b/doc/doxygen/options.dox.in @@ -71,8 +71,7 @@ WARN_IF_DOC_ERROR = YES INPUT = RECURSIVE = YES EXCLUDE_PATTERNS = *.templates.h -EXAMPLE_PATH = @CMAKE_BINARY_DIR@/doc/doxygen/tutorial \ - @CMAKE_SOURCE_DIR@/examples/doxygen +EXAMPLE_PATH = @CMAKE_BINARY_DIR@/doc/doxygen/tutorial EXAMPLE_RECURSIVE = NO IMAGE_PATH = INPUT_FILTER = ${CMAKE_SOURCE_DIR}/doc/doxygen/scripts/filter diff --git a/examples/doxygen/CMakeLists.txt b/examples/doxygen/CMakeLists.txt deleted file mode 100644 index fe68d3597c..0000000000 --- a/examples/doxygen/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -## -# 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.12) - -FIND_PACKAGE(deal.II 9.2.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 a (sufficiently recent) version of 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() diff --git a/examples/doxygen/block_dynamic_sparsity_pattern.cc b/examples/doxygen/block_dynamic_sparsity_pattern.cc deleted file mode 100644 index b82fcdff20..0000000000 --- a/examples/doxygen/block_dynamic_sparsity_pattern.cc +++ /dev/null @@ -1,83 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2006 - 2018 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.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// See documentation of BlockDynamicSparsityPattern for documentation of this -// example - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace dealii; - -int main() -{ - Triangulation<2> tr; - GridGenerator::subdivided_hyper_cube(tr, 3); - tr.begin_active()->set_refine_flag(); - tr.execute_coarsening_and_refinement(); - - FE_Q<2> fe1(1); - FE_Q<2> fe2(2); - FESystem<2> fe(fe1, 2, fe2, 1); - - DoFHandler<2> dof(tr); - dof.distribute_dofs(fe); - DoFRenumbering::Cuthill_McKee(dof); - DoFRenumbering::component_wise(dof); - - AffineConstraints constraints; - DoFTools::make_hanging_node_constraints(dof, constraints); - constraints.close(); - - const std::vector dofs_per_block = - DoFTools::count_dofs_per_fe_block(dof); - - BlockDynamicSparsityPattern dsp(fe.n_blocks(), fe.n_blocks()); - for (unsigned int i = 0; i < fe.n_blocks(); ++i) - for (unsigned int j = 0; j < fe.n_blocks(); ++j) - dsp.block(i, j).reinit(dofs_per_block[i], dofs_per_block[j]); - dsp.collect_sizes(); - - DoFTools::make_sparsity_pattern(dof, dsp); - constraints.condense(dsp); - - BlockSparsityPattern sparsity; - sparsity.copy_from(dsp); - - unsigned int ig = 0; - for (unsigned int ib = 0; ib < fe.n_blocks(); ++ib) - for (unsigned int i = 0; i < dofs_per_block[ib]; ++i, ++ig) - { - unsigned int jg = 0; - for (unsigned int jb = 0; jb < fe.n_blocks(); ++jb) - for (unsigned int j = 0; j < dofs_per_block[jb]; ++j, ++jg) - { - if (sparsity.exists(ig, jg)) - std::cout << ig << ' ' << jg << '\t' << ib << jb << std::endl; - } - } -} diff --git a/examples/doxygen/theta_timestepping.cc b/examples/doxygen/theta_timestepping.cc deleted file mode 100644 index 91dd59ca1d..0000000000 --- a/examples/doxygen/theta_timestepping.cc +++ /dev/null @@ -1,128 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2005 - 2018 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.md at -// the top level directory of deal.II. -// -// --------------------------------------------------------------------- - - -// See documentation of ThetaTimestepping for documentation of this example - -#include -#include -#include - -#include -#include - -#include - -using namespace dealii; -using namespace Algorithms; - - -class Explicit : public OperatorBase -{ -public: - Explicit(const FullMatrix &matrix); - void operator()(AnyData &out, const AnyData &in); - -private: - SmartPointer, Explicit> matrix; - FullMatrix m; -}; - - -class Implicit : public OperatorBase -{ -public: - Implicit(const FullMatrix &matrix); - void operator()(AnyData &out, const AnyData &in); - -private: - SmartPointer, Implicit> matrix; - FullMatrix m; -}; - -// End of declarations - -int main() -{ - FullMatrix matrix(2); - matrix(0, 0) = 0.; - matrix(1, 1) = 0.; - matrix(0, 1) = 3.14; - matrix(1, 0) = -3.14; - - OutputOperator> out; - out.initialize_stream(std::cout); - - Explicit op_explicit(matrix); - Implicit op_implicit(matrix); - ThetaTimestepping> solver(op_explicit, op_implicit); - solver.set_output(out); - - Vector value(2); - value(0) = 1.; - AnyData indata; - AnyData outdata; - outdata.add(&value, "value"); - - solver.notify(Events::initial); - solver(outdata, indata); -} - - -Explicit::Explicit(const FullMatrix &M) - : matrix(&M) -{ - m.reinit(M.m(), M.n()); -} - - -void Explicit::operator()(AnyData &out, const AnyData &in) -{ - const double timestep = *in.read_ptr("Timestep"); - if (this->notifications.test(Events::initial) || - this->notifications.test(Events::new_timestep_size)) - { - m.equ(-timestep, *matrix); - for (unsigned int i = 0; i < m.m(); ++i) - m(i, i) += 1.; - } - this->notifications.clear(); - m.vmult(*out.entry *>(0), - *in.read_ptr>("Previous iterate")); -} - - -Implicit::Implicit(const FullMatrix &M) - : matrix(&M) -{ - m.reinit(M.m(), M.n()); -} - - -void Implicit::operator()(AnyData &out, const AnyData &in) -{ - const double timestep = *in.read_ptr("Timestep"); - if (this->notifications.test(Events::initial) || - this->notifications.test(Events::new_timestep_size)) - { - m.equ(timestep, *matrix); - for (unsigned int i = 0; i < m.m(); ++i) - m(i, i) += 1.; - m.gauss_jordan(); - } - this->notifications.clear(); - m.vmult(*out.entry *>(0), - *in.read_ptr>("Previous time")); -} -- 2.39.5