From 435f039e2ad0cb1131a8c997a2df70859af3e369 Mon Sep 17 00:00:00 2001 From: Ralf Hartmann Date: Fri, 5 Jun 2009 04:07:48 +0000 Subject: [PATCH] New Triangulation::set_mesh_smoothing function (5478). git-svn-id: https://svn.dealii.org/trunk@18908 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/grid/tria.h | 10 ++++++++++ deal.II/deal.II/source/grid/tria.cc | 13 ++++++++++++- deal.II/doc/news/changes.h | 19 +++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/deal.II/deal.II/include/grid/tria.h b/deal.II/deal.II/include/grid/tria.h index 6bda44b5da..499c592d15 100644 --- a/deal.II/deal.II/include/grid/tria.h +++ b/deal.II/deal.II/include/grid/tria.h @@ -1430,6 +1430,16 @@ class Triangulation : public Subscriptor * using it. */ void clear (); + + /** + * Sets the mesh smoothing to @p + * mesh_smoothing. This overrides + * the MeshSmoothing given to the + * constructor. It is allow to + * call this function only if + * triangulation is empty. + */ + void set_mesh_smoothing(const MeshSmoothing mesh_smoothing); /** * If @p dim==spacedim, assign a boundary diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 414e493ce3..f16a9ce32f 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -9711,6 +9711,17 @@ void Triangulation::clear () } + +template +void +Triangulation::set_mesh_smoothing(const MeshSmoothing mesh_smoothing) +{ + Assert (n_levels() == 0, ExcTriangulationNotEmpty ()); + smooth_grid=mesh_smoothing; +} + + + template void Triangulation::set_boundary (const unsigned int number, diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 7558e3ae78..79123f86d3 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -93,6 +93,16 @@ inconvenience this causes.

base

    +
  1. +

    + Improved: The gamma function now returns a long double instead of an + unsigned int, otherwise we will get an overflow and thus meaningless + weights for higher QGaussLobatto quadrature rules. +
    + (Tobias Leicht, RH 2009/06/05) +

    +
  2. +
  3. New: The new function Utilities::duplicate_communicator can be used @@ -125,6 +135,15 @@ inconvenience this causes.

    deal.II

      +
    1. +

      + New: For empty triangulations the new Triangulation::set_mesh_smoothing + function allows to override the MeshSmoothing given to the constructor. +
      + (RH 2009/06/05) +

      +
    2. +
    3. New: The new function TriaAccessor::is_translation_of computes -- 2.39.5