From a6486b959ec49d7f20f3426f90b996b1ccda2e64 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 28 Oct 2006 03:30:02 +0000 Subject: [PATCH] More text git-svn-id: https://svn.dealii.org/trunk@14111 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-21/step-21.cc | 58 +++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/deal.II/examples/step-21/step-21.cc b/deal.II/examples/step-21/step-21.cc index 55aa57d565..da07625896 100644 --- a/deal.II/examples/step-21/step-21.cc +++ b/deal.II/examples/step-21/step-21.cc @@ -289,6 +289,52 @@ InitialValues::vector_value (const Point &p, // easy later to replace use of one by the // other in the code. + // @sect4{Single curving crack permeability} + + // The first function for the permeability + // was the one that models a single curving + // crack. It was already used at the end of + // step-20, and its functional form is given + // in the introduction of the present + // tutorial program: +namespace SingleCurvingCrack +{ + template + class KInverse : public TensorFunction<2,dim> + { + public: + virtual void value_list (const std::vector > &points, + std::vector > &values) const; + }; + + + template + void + KInverse::value_list (const std::vector > &points, + std::vector > &values) const + { + Assert (points.size() == values.size(), + ExcDimensionMismatch (points.size(), values.size())); + + for (unsigned int p=0; p::vector_value (const Point &p, // more ground to cover, after all, if we // want to keep the distance between centers // roughly equal), so we choose 40 in 2d and - // 150 in 3d. For any other dimension, the + // 100 in 3d. For any other dimension, the // function does presently not know what to // do so simply throws an exception // indicating exactly this. @@ -369,13 +415,13 @@ namespace RandomMedium const unsigned int N = (dim == 2 ? 40 : (dim == 3 ? - 150 : + 100 : throw ExcNotImplemented())); std::vector > centers_list (N); for (unsigned int i=0; i(rand())/RAND_MAX; return centers_list; } @@ -539,7 +585,7 @@ TwoPhaseFlowProblem::TwoPhaseFlowProblem (const unsigned int degree) FE_DGQ(degree), 1, FE_DGQ(degree), 1), dof_handler (triangulation), - n_refinement_steps (4), + n_refinement_steps (5), time_step (10.0/std::pow(2.0, double(n_refinement_steps))/6), viscosity (0.2) @@ -568,9 +614,7 @@ void TwoPhaseFlowProblem::make_grid_and_dofs () triangulation.refine_global (n_refinement_steps); - dof_handler.distribute_dofs (fe); - - + dof_handler.distribute_dofs (fe); DoFRenumbering::component_wise (dof_handler); -- 2.39.5