GithubHelp home page GithubHelp logo

dealii / code-gallery Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 52.0 56.3 MB

A collection of codes based on deal.II contributed by deal.II users

License: Other

CMake 1.62% C++ 90.65% C 0.13% Shell 0.09% TeX 1.02% Gnuplot 4.65% Python 1.01% MATLAB 0.77% GLSL 0.06%

code-gallery's Introduction

regression-tester/current regression-tester/previous performance-tester/current jenkins/dealii-serial jenkins/dealii-mpi jenkins/dealii-osx jenkins/dealii-ampere workflows/github-docker workflows/indent workflows/tidy workflows/github-linux workflows/github-OSX workflows/github-windows

What is deal.II?

deal.II is a C++ program library targeted at the computational solution of partial differential equations using adaptive finite elements. It uses state-of-the-art programming techniques to offer you a modern interface to the complex data structures and algorithms required.

For the impatient:

Let's say you've unpacked the .tar.gz file into a directory /path/to/dealii/sources. Then configure, compile, and install the deal.II library with:

$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/path/where/dealii/should/be/installed/to /path/to/dealii/sources
$ make install    (alternatively $ make -j<N> install)
$ make test

To build from the repository, execute the following commands first:

$ git clone https://github.com/dealii/dealii
$ cd dealii

Then continue as before.

A detailed ReadME can be found at ./doc/readme.html, ./doc/users/cmake_user.html, or at https://www.dealii.org/.

Getting started:

The tutorial steps are located under examples/ of the installation. Information about the tutorial steps can be found at ./doc/doxygen/tutorial/index.html or at https://www.dealii.org/.

deal.II includes support for pretty-printing deal.II objects inside GDB. See contrib/utilities/dotgdbinit.py or the new documentation page (under 'information for users') for instructions on how to set this up.

License:

Please see the file ./LICENSE.md for details

Further information:

For further information have a look at ./doc/index.html or at https://www.dealii.org.

Docker Images:

Docker images based on the Ubuntu operating system are available on Docker Hub. You can use any of the available version (list of available tags) by running, for example:

$ docker run --rm -t -i dealii/dealii:master-focal

The above command would drop you into an isolated environment, in which you will find the latest version of deal.II (master development branch) installed under /usr/local.

code-gallery's People

Contributors

bangerth avatar davidscn avatar davydden avatar drwells avatar ecomellas avatar eldarkh avatar elstargazer avatar fdrmrc avatar giuseppeorlando878776 avatar jcc242 avatar jie-cheng avatar jppelteret avatar krishnakumarg1984 avatar lianxiali avatar magomedovs avatar marcfehling avatar markma1990 avatar masterleinad avatar mdh266 avatar narasimhan-2604 avatar peterrum avatar rombur avatar sam0h51 avatar sfloresm avatar tamiko avatar tjhei avatar umairhussaincmm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code-gallery's Issues

Use of deprecated matrix-free interfaces

After merging the current crop of PRs that fix compilation for all code gallery programs (and replace deprecated function calls), there remain a few places where programs use deprecated matrix-free functions with which I am not familiar. @kronbichler @peterrum -- would you be willing to look at these? The warnings I get are as follows:

[ 50%] Building CXX object CMakeFiles/NS_TRBDF2_DG.dir/navier_stokes_TRBDF2_DG.cc.o
/home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc: In instantiation of ‘void NS_TRBDF2::NavierStokesProjectionOperator<dim, fe_degree_p, fe_degree_v, n_q_points_1d_p, n_q_points_1d_v, Vec>::assemble_diagonal_cell_term_velocity(const dealii::MatrixFree<dim, typename Vec::value_type>&, Vec&, const unsigned int&, const std::pair<unsigned int, unsigned int>&) const [with int dim = 2; int fe_degree_p = 1; int fe_degree_v = 2; int n_q_points_1d_p = 2; int n_q_points_1d_v = 3; Vec = dealii::LinearAlgebra::distributed::Vector<double>; typename Vec::value_type = double]’:
/home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc:2019:17:   required from ‘NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)> [with auto:84 = dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >; auto:85 = dealii::LinearAlgebra::distributed::Vector<double>; auto:86 = unsigned int; auto:87 = std::pair<unsigned int, unsigned int>]’
/scratch/local/gcc-11.2.0/include/c++/11.2.0/type_traits:2466:26:   required by substitution of ‘template<class _Fn, class ... _Args> static std::__result_of_success<decltype (declval<_Fn>()((declval<_Args>)()...)), std::__invoke_other> std::__result_of_other_impl::_S_test(int) [with _Fn = NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>&; _Args = {const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::Host>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&}]’
/scratch/local/gcc-11.2.0/include/c++/11.2.0/type_traits:2477:55:   required from ‘struct std::__result_of_impl<false, false, NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>&, const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::Host>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&>’
/scratch/local/gcc-11.2.0/include/c++/11.2.0/bits/std_function.h:334:9:   recursively required by substitution of ‘template<class _Result, class _Ret> struct std::__is_invocable_impl<_Result, _Ret, true, std::__void_t<typename _CTp::type> > [with _Result = std::__invoke_result<NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>&, const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::Host>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&>; _Ret = void]’
/scratch/local/gcc-11.2.0/include/c++/11.2.0/bits/std_function.h:334:9:   required from ‘struct std::function<void(const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&)>::_Callable<NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>, std::__invoke_result<NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>&, const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::Host>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&> >’
/scratch/local/gcc-11.2.0/include/c++/11.2.0/bits/std_function.h:344:8:   required by substitution of ‘template<class _Res, class ... _ArgTypes> template<class _Cond, class _Tp> using _Requires = typename std::enable_if<_Cond::value, _Tp>::type [with _Cond = std::function<void(const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&)>::_Callable<NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>, std::__invoke_result<NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>&, const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::Host>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&> >; _Tp = void; _Res = void; _ArgTypes = {const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double, dealii::MemorySpace::Host>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&}]’
/scratch/local/gcc-11.2.0/include/c++/11.2.0/bits/std_function.h:413:9:   required by substitution of ‘template<class _Functor, class, class> std::function<void(const dealii::MatrixFree<2, double, dealii::VectorizedArray<double, 2> >&, dealii::LinearAlgebra::distributed::Vector<double>&, const unsigned int&, const std::pair<unsigned int, unsigned int>&)>::function(_Functor) [with _Functor = NS_TRBDF2::NavierStokesProjectionOperator<2, 1, 2, 2, 3, dealii::LinearAlgebra::distributed::Vector<double> >::compute_diagonal()::<lambda(const auto:84&, auto:85&, const auto:86&, const auto:87&)>; <template-parameter-1-2> = void; <template-parameter-1-3> = void]’
/home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc:2016:7:   required from ‘void NS_TRBDF2::NavierStokesProjectionOperator<dim, fe_degree_p, fe_degree_v, n_q_points_1d_p, n_q_points_1d_v, Vec>::compute_diagonal() [with int dim = 2; int fe_degree_p = 1; int fe_degree_v = 2; int n_q_points_1d_p = 2; int n_q_points_1d_v = 3; Vec = dealii::LinearAlgebra::distributed::Vector<double>]’
/home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc:2450:42:   required from ‘void NS_TRBDF2::NavierStokesProjection<dim>::diffusion_step() [with int dim = 2]’
/home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc:2940:7:   required from ‘void NS_TRBDF2::NavierStokesProjection<dim>::run(bool, unsigned int) [with int dim = 2]’
/home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc:3035:13:   required from here
/home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc:1439:37: warning: ‘void dealii::FEEvaluation<dim, fe_degree, n_q_points_1d, n_components_, Number, VectorizedArrayType>::gather_evaluate(const VectorType&, bool, bool, bool) [with VectorType = dealii::LinearAlgebra::distributed::Vector<double>; int dim = 2; int fe_degree = 2; int n_q_points_1d = 3; int n_components_ = 2; Number = double; VectorizedArrayType = dealii::VectorizedArray<double, 2>]’ is deprecated [-Wdeprecated-declarations]
 1439 |         phi_old_extr.gather_evaluate(u_extr, true, false);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /raid/bangerth/p/deal.II/1/install/include/deal.II/matrix_free/operators.h:30,
                 from /home/fac/g/bangerth/p/deal.II/1/dealii/code-gallery/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc:47:
/raid/bangerth/p/deal.II/1/install/include/deal.II/matrix_free/fe_evaluation.h:7883:1: note: declared here
 7883 | FEEvaluation<
      | ^~~~~~~~~~~~~
 7884 |   dim,
      |   ~~~~
 7885 |   fe_degree,
      |   ~~~~~~~~~~
 7886 |   n_q_points_1d,
      |   ~~~~~~~~~~~~~~
 7887 |   n_components_,
      |   ~~~~~~~~~~~~~~
 7888 |   Number,
      |   ~~~~~~~
 7889 |   VectorizedArrayType>::gather_evaluate(const VectorType &input_vector,
      |   ~~~~~~~~~~~~~~~~~~~~

This goes on for several more pages, but github only allows me to attach up to 64kB of text :-)

`nonlinear-heat_transfer_with_AD_NOX`: needs an open source license

@magomedovs Thanks a lot again for your code contribution. In order to properly integrate it into the code gallery we would need an open source license that applies to your code contribution. You can read more about it here: https://github.com/dealii/code-gallery/blob/master/LICENSE.md

We recommend that you publish your code under the same license terms that apply to deal.II, which is dual-licensed under
Apache License 2.0 with LLVM Exception and the GNU Lesser General Public License v2.1 or later.

If you are OK with it then we would add the following license header to all source files:

/* -----------------------------------------------------------------------------
 *
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
 * Copyright (C) XXXX by <YOUR NAME>
 *
 * This file is part of the deal.II code gallery.
 *
 * -----------------------------------------------------------------------------
 */

Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity: Deprecation warnings with deal.II 9.0

/home/tamiko/workspace/dealii/code-gallery/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc:1321:22: warning: 'set_manifold' is deprecated
      [-Wdeprecated-declarations]
    tria_2d_not_flat.set_manifold(10); // Clear manifold
                     ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc:1321:22: warning: 'set_manifold' is deprecated
      [-Wdeprecated-declarations]
    tria_2d_not_flat.set_manifold(10); // Clear manifold
                     ^
/home/tamiko/workspace/dealii/code-gallery/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc:1036:5: note: in instantiation of member function
      'ViscoElasStripHole::Solid<2>::make_2d_quarter_plate_with_hole' requested here
    make_2d_quarter_plate_with_hole(triangulation,
    ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc:1321:22: warning: 'set_manifold' is deprecated
      [-Wdeprecated-declarations]
    tria_2d_not_flat.set_manifold(10); // Clear manifold
                     ^
/home/tamiko/workspace/dealii/code-gallery/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc:1111:5: note: in instantiation of member function
      'ViscoElasStripHole::Solid<3>::make_2d_quarter_plate_with_hole' requested here
    make_2d_quarter_plate_with_hole(tria_2d,
    ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^

Use of deprecated QTrapez in Parallel In Time

On building the project, one gets a deprecation warning for QTrapez. Seems like it is used in the file /src/HeatEquationImplem.hh

The warning:

In file included from /home/jerett/bin/dealii/code-gallery/parallel_in_time/src/HeatEquation.hh:181,
from /home/jerett/bin/dealii/code-gallery/parallel_in_time/src/BraidFuncs.hh:24,
from /home/jerett/bin/dealii/code-gallery/parallel_in_time/src/BraidFuncs.cc:1:
/home/jerett/bin/dealii/code-gallery/parallel_in_time/src/HeatEquationImplem.hh: In member function ‘void HeatEquation::process_solution(double, int, const dealii::Vector&)’:
/home/jerett/bin/dealii/code-gallery/parallel_in_time/src/HeatEquationImplem.hh:337:20: warning: ‘using QTrapez = class dealii::QTrapezoid<1>’ is deprecated [-Wdeprecated-declarations]
337 | const QTrapez<1> q_trapez;
| ^~~~~~~
In file included from /home/jerett/bin/dealii/install/include/deal.II/fe/mapping_q.h:24,
from /home/jerett/bin/dealii/install/include/deal.II/fe/mapping_q1.h:22,
from /home/jerett/bin/dealii/install/include/deal.II/hp/mapping_collection.h:24,
from /home/jerett/bin/dealii/install/include/deal.II/numerics/vector_tools_boundary.h:24,
from /home/jerett/bin/dealii/install/include/deal.II/numerics/vector_tools.h:22,
from /home/jerett/bin/dealii/code-gallery/parallel_in_time/src/BraidFuncs.hh:18,
from /home/jerett/bin/dealii/code-gallery/parallel_in_time/src/BraidFuncs.cc:1:
/home/jerett/bin/dealii/install/include/deal.II/base/quadrature_lib.h:142:7: note: declared here
142 | using QTrapez DEAL_II_DEPRECATED = QTrapezoid;
| ^~~~~~~

update to latest deal.II release

Many of the examples require older version of deal.II and no longer compile. I think it might be worth bumping the minimum version and updating at least to 9.1:

cdr/CMakeLists.txt:FIND_PACKAGE(deal.II 8.4 QUIET
CeresFE/CMakeLists.txt:FIND_PACKAGE(deal.II 8.3 QUIET
Distributed_LDG_Method/CMakeLists.txt:FIND_PACKAGE(deal.II 8.0 QUIET
ElastoplasticTorsion/CMakeLists.txt:FIND_PACKAGE(deal.II 8.0 QUIET
goal_oriented_elastoplasticity/CMakeLists.txt:FIND_PACKAGE(deal.II 8.0 QUIET
Linear_Elastic_Active_Skeletal_Muscle_Model/CMakeLists.txt:FIND_PACKAGE(deal.II 8.5 QUIET
MultipointFluxMixedFiniteElementMethods/CMakeLists.txt:FIND_PACKAGE(deal.II 9.0.0 QUIET
Quasi_static_Finite_strain_Compressible_Elasticity/CMakeLists.txt:FIND_PACKAGE(deal.II 8.5 QUIET
Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/CMakeLists.txt:FIND_PACKAGE(deal.II 8.5 QUIET
time_dependent_navier_stokes/CMakeLists.txt:FIND_PACKAGE(deal.II 9.0.0 QUIET
two_phase_flow/CMakeLists.txt:FIND_PACKAGE(deal.II 8.4 QUIET

Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity still uses old way to filter for cells with DataOut

This program still uses the old way to select which cells to produce output on:

  template<int dim>
  class FilteredDataOut : public DataOut<dim>
  {
  public:
    FilteredDataOut (const unsigned int subdomain_id)
      :
      subdomain_id (subdomain_id)
    {}

    virtual ~FilteredDataOut() {}

    virtual typename DataOut<dim>::cell_iterator
    first_cell ()
    {
      auto cell = this->dofs->begin_active();
      while ((cell != this->dofs->end()) &&
             (cell->subdomain_id() != subdomain_id))
        ++cell;
      return cell;
    }

    virtual typename DataOut<dim>::cell_iterator
    next_cell (const typename DataOut<dim>::cell_iterator &old_cell)
    {
      if (old_cell != this->dofs->end())
        {
          const IteratorFilters::SubdomainEqualTo predicate(subdomain_id);
          return
            ++(FilteredIterator
               <typename DataOut<dim>::cell_iterator>
               (predicate,old_cell));
        }
      else
        return old_cell;
    }

  private:
    const unsigned int subdomain_id;
  };

This needs to be updated.

Fix init vector in LDG example

In line
394 of LDG example, locally relevant solution is reinited as

locally_relevant_solution.reinit(locally_relevant_dofs,
                                     MPI_COMM_WORLD);

Shouldn't it be

locally_relevant_solution.reinit(locally_owned_dofs, locally_relevant_dofs,
                                     MPI_COMM_WORLD);

Quasi-Static Finite-Strain Compressible Elasticity

  1.   The index should be 2 for z coordinate in make_grid()
       
            else if (std::abs(std::abs(cell->face(face)->center()[**0**]) - 0.5) < tol_boundary)
               cell->face(face)->set_boundary_id(2); // +Z and -Z faces 
    
  2.  In make_constraints(), the conditional statement seems not to work as the if block and else block are the same.
    
               if (apply_dirichlet_bc == true)
                         block
               else
                         same block
    
  3. In print_vertical_tip_displacement(), the following line triggers an error in case 3D and debug mode.
    
               Point<dim> soln_pt (48.0*parameters.scale,60.0*parameters.scale);
    

CDR code: Run time error

@drwells Does the CDR example still run for you? I get an error message when I try to run it (Trilinos 12.18.1)

<PATH>/cdr/build $ cp ../parameters.prm .
<PATH>/cdr/build $ make run
[100%] Run with Debug configuration
Number of degrees of freedom: 2720

*********************************************************
ML failed to compute the multigrid preconditioner. The
most common problem is an incorrect  data type in ML's
parameter list (e.g. 'int' instead of 'bool').

Note: List.set("ML print initial list",X) might help
figure out the bad one on pid X.

The following exception was thrown:
Error!  An attempt was made to access parameter "initialize random seed" of type "bool"
in the parameter (sub)list "SA default values"
using the incorrect type "bool"!

Throw number = 1

*********************************************************

ML::ERROR:: -1, /<PATH>/trilinos-12.18.1-l7t2hzrmefrv5zd4crr4a2ukhx2jgtuw/spack-src/packages/ml/src/Utils/ml_MultiLevelPreconditioner.cpp, line 2566
ML::ERROR::
*********************************************************
ML failed to compute the multigrid preconditioner. The
most common problem is an incorrect  data type in ML's
parameter list (e.g. 'int' instead of 'bool').

Note: List.set("ML print initial list",X) might help
figure out the bad one on pid X.

The following exception was thrown:
Error!  An attempt was made to access parameter "initialize random seed" of type "bool"
in the parameter (sub)list "SA default values"
using the incorrect type "bool"!

Throw number = 2

*********************************************************

Update linear solver in MCMC-Laplace

@kronbichler took a stab at making the linear solver in MCMC-Laplace faster and made me look like an amateur :-) He reports that this patch

   template <int dim>
   void PoissonSolver<dim>::solve()
   {
-    SparseDirectUMFPACK solver;
-    solver.factorize(system_matrix);
-    solver.vmult(solution, system_rhs);
+    SparseILU<double> ilu;
+    ilu.initialize(system_matrix);
+    SolverControl control(100, 1e-8*system_rhs.l2_norm());
+    SolverCG<> solver(control);
+    solver.solve(system_matrix, solution, system_rhs, ilu);
   } 

makes the solver run faster by about a factor of 3.

I don't have the time to deal with this right now, but will get to testing that this works as intended (and yields the desired accuracy in the output) at some point.

`TravelingWaves`: needs an open source license

@magomedovs Thanks a lot again for your code contribution. In order to properly integrate it into the code gallery we would need an open source license that applies to your code contribution. You can read more about it here: https://github.com/dealii/code-gallery/blob/master/LICENSE.md

We recommend that you publish your code under the same license terms that apply to deal.II, which is dual-licensed under
Apache License 2.0 with LLVM Exception and the GNU Lesser General Public License v2.1 or later.

If you are OK with it then we would add the following license header to all source files:

/* -----------------------------------------------------------------------------
 *
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
 * Copyright (C) XXXX by <YOUR NAME>
 *
 * This file is part of the deal.II code gallery.
 *
 * -----------------------------------------------------------------------------
 */

goal_oriented_elastoplasticity: Deprecation warnings with deal.II 9.0

code-gallery/goal_oriented_elastoplasticity % make
Scanning dependencies of target elastoplastic
[ 50%] Building CXX object CMakeFiles/elastoplastic.dir/elastoplastic.cc.o
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:3790:28: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
          triangulation_2d.set_manifold (10);
                           ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:7219:23: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
        triangulation.set_manifold (0);
                      ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:7255:17: note: in instantiation of member function 'ElastoPlastic::ElastoPlasticProblem<3>::run'
      requested here
        problem.run();
                ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:7220:23: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
        triangulation.set_manifold (1);
                      ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:7224:23: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
        triangulation.set_manifold (10);
                      ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:3651:23: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
        triangulation.set_manifold (0);
                      ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:7090:5: note: in instantiation of member function
      'ElastoPlastic::ElastoPlasticProblem<3>::make_grid' requested here
    make_grid();
    ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:7255:17: note: in instantiation of member function 'ElastoPlastic::ElastoPlasticProblem<3>::run'
      requested here
        problem.run();
                ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:3652:23: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
        triangulation.set_manifold (1);
                      ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:3790:28: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
          triangulation_2d.set_manifold (10);
                           ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]
                             ^
/home/tamiko/workspace/dealii/code-gallery/goal_oriented_elastoplasticity/elastoplastic.cc:3871:23: warning: 'set_manifold' is deprecated [-Wdeprecated-declarations]
        triangulation.set_manifold (10);
                      ^
/usr/include/deal.II/grid/tria.h:1811:3: note: 'set_manifold' has been explicitly marked deprecated here
  DEAL_II_DEPRECATED
  ^
/usr/include/deal.II/base/config.h:95:30: note: expanded from macro 'DEAL_II_DEPRECATED'
#define DEAL_II_DEPRECATED [[deprecated]]

ElastoPlasticTorsion uses removed interface

This program uses the following virtual function:

  template <int dim>
  class ComputeMultiplier : public DataPostprocessor<dim>
  {
  private:
    double p;
  public:
    ComputeMultiplier (double pe);

    virtual
    void compute_derived_quantities_scalar (
      const std::vector< double > &,
      const std::vector< Tensor< 1, dim > > &,
      const std::vector< Tensor< 2, dim > > &,
      const std::vector< Point< dim > > &,
      const std::vector< Point< dim > > &,
      std::vector< Vector< double > > &
    ) const;

    virtual std::vector<std::string> get_names () const override;

    virtual
    std::vector<DataComponentInterpretation::DataComponentInterpretation>
    get_data_component_interpretation () const;
    virtual UpdateFlags get_needed_update_flags () const override;
  };

But the compute_derived_quantities_scalar () function has been removed. The class here should instead derive from DataPostprocessorScalar.

git commands in code-gallery/goal_oriented_elastoplasticity/readme.md can not work

code-gallery/goal_oriented_elastoplasticity/readme.md
seems to imply that the directory is its-self a git repository when it says:

The code contains several examples consisting of the three examples presented in the aforementioned paper. To run each of them you can switch to them, e.g.
```bash
git checkout Thick_tube_internal_pressure

git checkout  Perforated_strip_displacement_3d

git checkout  Cantiliver_II_beam_3d

Since the directory is in fact not a git repository trying those commands results in git not finding the files to check out:

$ pwd
/home/mgesing/Documents/dealii/code-gallery/goal_oriented_elastoplasticity
$ ls
Cantiliver_II_beam_3d.prm  CMakeLists.txt  doc  elastoplastic.cc  readme.md  Thick_tube_internal_pressure.prm
$ git checkout Thick_tube_internal_pressure
error: pathspec 'Thick_tube_internal_pressure' did not match any file(s) known to git.

I suppose that the git repository that those git commands are supposed to interact with exists somewhere, and there should be a line above the git checkout commands saying something like "clone the repository with git clone https://..."

Do you know where the git repo is?

Parallel In Time c++ standard issue

The Parallel in time example code does not work out of the box. On following the compilation steps listed in the documentation for the code, one gets the errors listed here.

A workaround that I used was to simply change the line SET(CMAKE_CXX_STANDARD 14) to SET(CMAKE_CXX_STANDARD 17) in the CMakeLists.txt file, and this worked.

The errors I saw before the fix are of the following flavor, and the full error I got is in the attached file. This is only a sample of the erros you get, but all are of similar composition.
error: ‘apply’ is not a member of ‘dealii::std_cxx17’

error messages

Can't seem to set up a top level CMakeLists.txt for the entire code gallery

This might need @tamiko 's input:

I've gotten tired of configuring and compiling each code gallery program individually, so I tried to set up this CMakeLists.txt file in the top level of the code gallery:

cmake_minimum_required(VERSION 3.13.4)
project(code-gallery)

add_subdirectory(advection_reaction_estimator)

Interestingly, this does not work. When I create a build directory and call cmake .. from there, the output is the following:

-- The CXX compiler identification is GNU 4.8.5
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - broken
CMake Error at /raid/bangerth/bin/share/cmake-3.20/Modules/CMakeTestCXXCompiler.cmake:59 (message):
  The C++ compiler

    "/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/fac/g/bangerth/p/deal.II/1/code-gallery/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f0d54/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_f0d54.dir/build.make CMakeFiles/cmTC_f0d54.dir/build
    gmake[1]: Entering directory `/raid/bangerth/p/deal.II/1/code-gallery/build/CMakeFiles/CMakeTmp'
    gmake[1]: Warning: File `CMakeFiles/cmTC_f0d54.dir/progress.make' has modification time 0.0017 s in the future
    Building CXX object CMakeFiles/cmTC_f0d54.dir/testCXXCompiler.cxx.o
    /usr/bin/c++   -std=c++20  -o CMakeFiles/cmTC_f0d54.dir/testCXXCompiler.cxx.o -c /home/fac/g/bangerth/p/deal.II/1/code-gallery/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    c++: error: unrecognized command line option ‘-std=c++20’
    gmake[1]: *** [CMakeFiles/cmTC_f0d54.dir/testCXXCompiler.cxx.o] Error 1
    gmake[1]: Leaving directory `/raid/bangerth/p/deal.II/1/code-gallery/build/CMakeFiles/CMakeTmp'
    gmake: *** [cmTC_f0d54/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:8 (project)


-- Configuring incomplete, errors occurred!

That is, it errors out while trying to identify a C++ compiler, which it takes from /usr/bin, but this is not the one I want it to use nor the one it should find via my $PATH:

 which c++
/scratch/local/gcc-11.2.0/bin/c++

It is also not the one it should inherit from the deal.II configuration system. (The specific error you see above is because I do `export CXXFLAGS=-std=c++20 which the system compiler predictably does not understand, it being GCC 4.8.)

Curiously, if I call cmake from the subdirectory into which I asked cmake to recurse (namely, advection_reaction_estimator), then this all works:

code-gallery/build> cd ../advection_reaction_estimator/
reaction_estimator> cmake .
-- The CXX compiler identification is GNU 11.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /scratch/local/gcc-11.2.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using the deal.II-9.5.0-pre installation found at /home/fac/g/bangerth/p/deal.II/1/install
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_deal_ii_add_test.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_deal_ii_initialize_cached_variables.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_deal_ii_pickup_tests.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_deal_ii_query_git_information.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_deal_ii_setup_target.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_shell_escape_option_groups.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_target_compile_flags.cmake
-- Include macro /home/fac/g/bangerth/p/deal.II/1/install/share/deal.II/macros/macro_target_link_flags.cmake
###
#
#  WARNING:
#
#  CMAKE_BUILD_TYPE "" unsupported by current installation!
#  deal.II was configured with "DebugRelease".
#
#  CMAKE_BUILD_TYPE was forced to "Debug".
#
###
-- The C compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /scratch/local/gcc-11.2.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Autopilot invoked
###
#
#  Project  DG_advection_reaction_estimator  set up with  deal.II-9.5.0-pre  found at
#      /home/fac/g/bangerth/p/deal.II/1/install
#
#  CMAKE_BUILD_TYPE:          Debug
#
#  You can now run
#       $ make                - to compile and link the program
#       $ make run            - to (compile, link and) run the program
#
#       $ make debug          - to switch the build type to 'Debug'
#       $ make release        - to switch the build type to 'Release'
#
#       $ make edit_cache     - to change (cached) configuration variables
#                               and rerun the configure and generate phases of CMake
#
#       $ make strip_comments - to strip the source files in this
#                               directory off their comments; this is irreversible
#       $ make clean          - to remove the generated executable as well as
#                               all intermediate compilation files
#       $ make runclean       - to remove all output generated by the program
#       $ make distclean      - to clean the directory from _all_ generated
#                               files (includes clean, runclean and the removal
#                               of the generated build system)
#       $ make info           - to view this message again
#
#  Have a nice day!
#
###
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fac/g/bangerth/p/deal.II/1/code-gallery/advection_reaction_estimator

How do we make this work? Or is setting up multiple deal.II-based projects at once just not supported?

Licensing: `CeresFE` contains files of unknown origin

The following files:

have the following headers:

/*
 * config_in.h
 *
 *  Created on: Aug 17, 2015
 *      Author: antonermakov
 */
/*
 * ellipsoid_fit.h
 *
 *  Created on: Jul 24, 2015
 *      Author: antonermakov
 */

which does not appear to be the main author of the code gallery contribution.

Fix dim dependent definitions in one-field elasticity example

The material tangent in the cook membrane problem is not quite correct for the 2-d case.
The contribution

SymmetricTensor<4, dim> get_Jc_iso() const
{
  const SymmetricTensor<2, dim> tau_bar = get_tau_bar();
  const SymmetricTensor<2, dim> tau_iso = get_tau_iso();
  const SymmetricTensor<4, dim> tau_iso_x_I
    = outer_product(tau_iso,
                    StandardTensors<dim>::I);
  const SymmetricTensor<4, dim> I_x_tau_iso
    = outer_product(StandardTensors<dim>::I,
                    tau_iso);
  const SymmetricTensor<4, dim> c_bar = get_c_bar();
  return (2.0 / 3.0) * trace(tau_bar)
         * StandardTensors<dim>::dev_P
         - (2.0 / 3.0) * (tau_iso_x_I + I_x_tau_iso)
         + StandardTensors<dim>::dev_P * c_bar
         * StandardTensors<dim>::dev_P;
}

should in fact read

SymmetricTensor<4, dim> get_Jc_iso() const
{
  const SymmetricTensor<2, dim> tau_bar = get_tau_bar();
  const SymmetricTensor<2, dim> tau_iso = get_tau_iso();
  const SymmetricTensor<4, dim> tau_iso_x_I
    = outer_product(tau_iso,
                    StandardTensors<dim>::I);
  const SymmetricTensor<4, dim> I_x_tau_iso
    = outer_product(StandardTensors<dim>::I,
                    tau_iso);
  const SymmetricTensor<4, dim> c_bar = get_c_bar();
  return (2.0 / dim) * trace(tau_bar) // <---------
         * StandardTensors<dim>::dev_P
         - (2.0 / dim) * (tau_iso_x_I + I_x_tau_iso)  // <---------
         + StandardTensors<dim>::dev_P * c_bar
         * StandardTensors<dim>::dev_P;
}

This example was probably not updated to dimension independent form when step-44 was. It should therefore be checked from top to bottom and the equivalent changes made. See dealii/dealii#2205

`Crystal_Growth_Phase_Field_Model`: needs an open source license

@umairhussaincmm Thanks a lot again for your code contribution. In order to properly integrate it into the code gallery we would need an open source license that applies to your code contribution. You can read more about it here: https://github.com/dealii/code-gallery/blob/master/LICENSE.md

We recommend that you publish your code under the same license terms that apply to deal.II, which is dual-licensed under
Apache License 2.0 with LLVM Exception and the GNU Lesser General Public License v2.1 or later.

If you are OK with it then we would add the following license header to all source files:

/* -----------------------------------------------------------------------------
 *
 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
 * Copyright (C) XXXX by <YOUR NAME>
 *
 * This file is part of the deal.II code gallery.
 *
 * -----------------------------------------------------------------------------
 */

Time dependent Navier Stokes example diverges with deal.II 9.2

As reported on the mailing list (https://groups.google.com/g/dealii/c/kI-Ii8N0kFU).

Time step = 206, at t = 2.060000e-01
 GMRES_ITR = 8   GMRES_RES = 7.647033e-07
************************************************************************************************
Time step = 207, at t = 2.070000e-01
 GMRES_ITR = 8   GMRES_RES = 3.355695e-04
************************************************************************************************
Time step = 208, at t = 2.080000e-01
 GMRES_ITR = 8   GMRES_RES = 5.007715e+01
************************************************************************************************
Time step = 209, at t = 2.090000e-01
 GMRES_ITR = 8   GMRES_RES = 1.262003e+12
************************************************************************************************
Time step = 210, at t = 2.100000e-01
 GMRES_ITR = 8   GMRES_RES = 1.279221e+33

Do not use doxygen formulas `@f` in README

Blunt LaTeX syntax will be displayed correctly in both GitHub Readme and Doxygen. @f is only displayed nicely in Doxygen.

We should choose the format which works nicely in both.

I will upload an example here after #147 gets merged.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.