+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2014 - 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.
-//
-// ---------------------------------------------------------------------
-
-
-#ifndef dealii_occ_boundary_lib_h
-# define dealii_occ_boundary_lib_h
-
-# include <deal.II/base/config.h>
-
-# ifdef DEAL_II_WITH_OPENCASCADE
-
-# include <deal.II/opencascade/manifold_lib.h>
-
-DEAL_II_NAMESPACE_OPEN
-
-/**
- * @addtogroup OpenCASCADE
- * @{
- */
-
-namespace OpenCASCADE
-{
- /**
- * A Manifold object based on OpenCASCADE TopoDS_Shape where new points are
- * first computed by averaging the surrounding points in the same way as
- * FlatManifold does, and are then projected in the normal direction using
- * OpenCASCADE utilities.
- *
- * This class makes no assumptions on the shape you pass to it, and the
- * topological dimension of the Manifold is inferred from the TopoDS_Shape
- * itself. In debug mode there is a sanity check to make sure that the
- * surrounding points (the ones used in project_to_manifold()) actually live
- * on the Manifold, i.e., calling OpenCASCADE::closest_point() on those
- * points leaves them untouched. If this is not the case, an
- * ExcPointNotOnManifold is thrown.
- *
- * This could happen, for example, if you are trying to use a shape of type
- * TopoDS_Edge when projecting on a face. In this case, the vertices of the
- * face would be collapsed to the edge, and your surrounding points would
- * not be lying on the given shape, raising an exception.
- *
- *
- * @deprecated Use NormalProjectionManifold instead, which is identical to
- * this class but satisfies the modern Manifold-based naming convention.
- */
- template <int dim, int spacedim>
- class DEAL_II_DEPRECATED NormalProjectionBoundary
- : public NormalProjectionManifold<dim, spacedim>
- {
- public:
- /**
- * Inherit all constructors.
- */
- using NormalProjectionManifold<dim, spacedim>::NormalProjectionManifold;
-
- /**
- * Clone the current Manifold.
- */
- virtual std::unique_ptr<Manifold<dim, spacedim>>
- clone() const override;
- };
-
- /**
- * A Manifold object based on OpenCASCADE TopoDS_Shape where new points are
- * first computed by averaging the surrounding points in the same way as
- * FlatManifold does, and then projecting them onto the manifold along the
- * direction specified at construction time using OpenCASCADE utilities.
- *
- * This class makes no assumptions on the shape you pass to it, and the
- * topological dimension of the Manifold is inferred from the TopoDS_Shape
- * itself. In debug mode there is a sanity check to make sure that the
- * surrounding points (the ones used in project_to_manifold()) actually live
- * on the Manifold, i.e., calling OpenCASCADE::closest_point() on those
- * points leaves them untouched. If this is not the case, an
- * ExcPointNotOnManifold is thrown.
- *
- * Notice that this type of Manifold descriptor may fail to give results if
- * the triangulation to be refined is close to the boundary of the given
- * TopoDS_Shape, or when the direction you use at construction time does not
- * intersect the shape. An exception is thrown when this happens.
- *
- *
- * @deprecated Use DirectionalProjectionManifold instead, which is identical to
- * this class but satisfies the modern Manifold-based naming convention.
- */
- template <int dim, int spacedim>
- class DEAL_II_DEPRECATED DirectionalProjectionBoundary
- : public DirectionalProjectionManifold<dim, spacedim>
- {
- public:
- /**
- * Inherit all constructors.
- */
- using DirectionalProjectionManifold<dim, spacedim>::
- DirectionalProjectionManifold;
-
- /**
- * Clone the current Manifold.
- */
- virtual std::unique_ptr<Manifold<dim, spacedim>>
- clone() const override;
- };
-
-
- /**
- * A Manifold object based on OpenCASCADE TopoDS_Shape where new points are
- * first computed by averaging the surrounding points in the same way as
- * FlatManifold does, and then projecting them using OpenCASCADE utilities
- * onto the manifold along a direction which is an estimation of the
- * surrounding points (hence mesh cell) normal.
- *
- * The direction normal to the mesh is particularly useful because it is the
- * direction in which the mesh is missing nodes. For instance, during the
- * refinement of a cell a new node is initially created around the
- * baricenter of the cell. This location somehow ensures a uniform distance
- * from the nodes of the old cell. Projecting such cell baricenter onto the
- * CAD surface in the direction normal to the original cell will then retain
- * uniform distance from the points of the original cell. Of course, at the
- * stage of mesh generation, no dof handler nor finite element are defined,
- * and such direction has to be estimated. For the case in which 8
- * surrounding points are present, 4 different triangles are identified with
- * the points assigned, and the normals of such triangles are averaged to
- * obtain the approximation of the normal to the cell.
- *
- * The case in which 2 surrounding points are present (i.e.:a cell edge is
- * being refined) is of course more tricky. The average of the CAD surface
- * normals at the 2 surrounding points is first computed, and then projected
- * onto the plane normal to the segment linking the surrounding points. This
- * again is an attempt to have the new point with equal distance with
- * respect to the surrounding points
- *
- * This class only operates with CAD faces and makes the assumption that the
- * shape you pass to it contains at least one face. If that is not the case,
- * an Exception is thrown. In debug mode there is a sanity check to make
- * sure that the surrounding points (the ones used in project_to_manifold())
- * actually live on the Manifold, i.e., calling OpenCASCADE::closest_point()
- * on those points leaves them untouched. If this is not the case, an
- * ExcPointNotOnManifold is thrown.
- *
- *
- * Notice that this type of Manifold descriptor may fail to give results if
- * the triangulation to be refined is close to the boundary of the given
- * TopoDS_Shape, or when the normal direction estimated from the surrounding
- * points does not intersect the shape. An exception is thrown when this
- * happens.
- *
- *
- * @deprecated Use NormalToMeshProjectionManifold instead, which is identical to
- * this class but satisfies the modern Manifold-based naming convention.
- */
- template <int dim, int spacedim>
- class DEAL_II_DEPRECATED NormalToMeshProjectionBoundary
- : public NormalToMeshProjectionManifold<dim, spacedim>
- {
- public:
- /**
- * Inherit all constructors.
- */
- using NormalToMeshProjectionManifold<dim, spacedim>::
- NormalToMeshProjectionManifold;
-
- /**
- * Clone the current Manifold.
- */
- virtual std::unique_ptr<Manifold<dim, spacedim>>
- clone() const override;
- };
-} // namespace OpenCASCADE
-
-/*@}*/
-
-DEAL_II_NAMESPACE_CLOSE
-
-
-# endif // DEAL_II_WITH_OPENCASCADE
-
-#endif // dealii_occ_boundary_lib_h
-/*---------------------------- occ_boundary_lib.h ---------------------------*/
SET(_src
utilities.cc
- boundary_lib.cc
manifold_lib.cc
)
SET(_inst
- boundary_lib.inst.in
manifold_lib.inst.in
utilities.inst.in
)
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2014 - 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.
-//
-// ---------------------------------------------------------------------
-
-
-#include <deal.II/opencascade/boundary_lib.h>
-
-#ifdef DEAL_II_WITH_OPENCASCADE
-
-DEAL_II_NAMESPACE_OPEN
-
-namespace OpenCASCADE
-{
- template <int dim, int spacedim>
- std::unique_ptr<Manifold<dim, spacedim>>
- NormalProjectionBoundary<dim, spacedim>::clone() const
- {
- return std::unique_ptr<Manifold<dim, spacedim>>(
- new NormalProjectionBoundary(this->sh, this->tolerance));
- }
-
-
-
- template <int dim, int spacedim>
- std::unique_ptr<Manifold<dim, spacedim>>
- DirectionalProjectionBoundary<dim, spacedim>::clone() const
- {
- return std::unique_ptr<Manifold<dim, spacedim>>(
- new DirectionalProjectionBoundary(this->sh,
- this->direction,
- this->tolerance));
- }
-
-
-
- template <int dim, int spacedim>
- std::unique_ptr<Manifold<dim, spacedim>>
- NormalToMeshProjectionBoundary<dim, spacedim>::clone() const
- {
- return std::unique_ptr<Manifold<dim, spacedim>>(
- new NormalToMeshProjectionBoundary(this->sh, this->tolerance));
- }
-// Explicit instantiations
-# include "boundary_lib.inst"
-} // namespace OpenCASCADE
-
-DEAL_II_NAMESPACE_CLOSE
-
-#endif
+++ /dev/null
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2014 - 2020 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.
-//
-// ---------------------------------------------------------------------
-
-
-
-for (deal_II_dimension : DIMENSIONS)
- {
- template class NormalProjectionBoundary<deal_II_dimension, 3>;
- template class DirectionalProjectionBoundary<deal_II_dimension, 3>;
- template class NormalToMeshProjectionBoundary<deal_II_dimension, 3>;
-#if deal_II_dimension <= 2
- template class NormalProjectionBoundary<deal_II_dimension, 2>;
- template class DirectionalProjectionBoundary<deal_II_dimension, 2>;
- template class NormalToMeshProjectionBoundary<deal_II_dimension, 2>;
-#endif
- }
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <Standard_Stream.hxx>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include "../tests.h"
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <Standard_Stream.hxx>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <Standard_Stream.hxx>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <Standard_Stream.hxx>
// ---------------------------------------------------------------------
-// Test the class DirectionalProjectionBoundary
+// Test the class DirectionalProjectionManifold
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <BRepFill.hxx>
TopoDS_Face face = BRepFill::Face(edge1, edge2);
- DirectionalProjectionBoundary<2, 3> manifold(face, Point<3>(0, 0, 1));
+ DirectionalProjectionManifold<2, 3> manifold(face, Point<3>(0, 0, 1));
Triangulation<2, 3> tria;
GridGenerator::hyper_cube(tria);
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
extract_geometrical_shapes(sh, faces, edges, vertices);
// Create a boundary projector on the first face.
- NormalProjectionBoundary<2, 3> boundary(faces[0]);
+ NormalProjectionManifold<2, 3> boundary(faces[0]);
// Create a Triangulation with a single cell
Triangulation<2, 3> tria;
#include <deal.II/grid/grid_out.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <BRepPrimAPI_MakeRevol.hxx>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <BRepFill.hxx>
TopoDS_Face face = BRepFill::Face(edge1, edge2);
- DirectionalProjectionBoundary<1, 3> manifold(face, Point<3>(0, 1, 0));
+ DirectionalProjectionManifold<1, 3> manifold(face, Point<3>(0, 1, 0));
Triangulation<1, 3> tria;
GridGenerator::hyper_cube(tria);
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
TopoDS_Shape shape = interpolation_curve(vertices, Point<3>(), true);
// Create a boundary projector.
- NormalProjectionBoundary<2, 3> boundary_line(shape);
+ NormalProjectionManifold<2, 3> boundary_line(shape);
// The unit square.
Triangulation<2, 3> tria;
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
// checks that the renamed manifolds are not just aliases but, when cloned,
// give the correct object type.
-#include <deal.II/opencascade/boundary_lib.h>
#include <deal.II/opencascade/manifold_lib.h>
#include <boost/core/demangle.hpp>
Handle(Geom_Circle) circle = make_circle.Value();
TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(circle);
- NormalProjectionBoundary<2, 3> manifold_b(edge);
- std::unique_ptr<Manifold<2, 3>> clone_b = manifold_b.clone();
- const auto & deref_clone_b = *clone_b;
- deallog << "typeid of NormalProjectionBoundary<2, 3> is "
- << boost::core::demangle(typeid(deref_clone_b).name()) << std::endl;
-
NormalProjectionManifold<2, 3> manifold_m(edge);
std::unique_ptr<Manifold<2, 3>> clone_m = manifold_m.clone();
const auto & deref_clone_m = *clone_m;
TopoDS_Face face = BRepFill::Face(edge1, edge2);
- DirectionalProjectionBoundary<2, 3> manifold_b(face, Point<3>(0, 0, 1));
-
- std::unique_ptr<Manifold<2, 3>> clone_b = manifold_b.clone();
- const auto & deref_clone_b = *clone_b;
- deallog << "typeid of DirectionalProjectionBoundary<2, 3> is "
- << boost::core::demangle(typeid(deref_clone_b).name()) << std::endl;
-
DirectionalProjectionManifold<2, 3> manifold_m(face, Point<3>(0, 0, 1));
-
- std::unique_ptr<Manifold<2, 3>> clone_m = manifold_m.clone();
- const auto & deref_clone_m = *clone_m;
+ std::unique_ptr<Manifold<2, 3>> clone_m = manifold_m.clone();
+ const auto & deref_clone_m = *clone_m;
deallog << "typeid of DirectionalProjectionManifold<2, 3> is "
<< boost::core::demangle(typeid(deref_clone_m).name()) << std::endl;
}
TopoDS_Face face = BRepFill::Face(edge1, edge2);
- NormalToMeshProjectionBoundary<1, 3> manifold_b(face);
-
- std::unique_ptr<Manifold<1, 3>> clone_b = manifold_b.clone();
- const auto & deref_clone_b = *clone_b;
- deallog << "typeid of NormalProjectionBoundary<2, 3> is "
- << boost::core::demangle(typeid(deref_clone_b).name()) << std::endl;
-
NormalToMeshProjectionManifold<1, 3> manifold_m(face);
std::unique_ptr<Manifold<1, 3>> clone_m = manifold_m.clone();
const auto & deref_clone_m = *clone_m;
-DEAL::typeid of NormalProjectionBoundary<2, 3> is dealii::OpenCASCADE::NormalProjectionBoundary<2, 3>
DEAL::typeid of NormalProjectionManifold<2, 3> is dealii::OpenCASCADE::NormalProjectionManifold<2, 3>
-DEAL::typeid of DirectionalProjectionBoundary<2, 3> is dealii::OpenCASCADE::DirectionalProjectionBoundary<2, 3>
DEAL::typeid of DirectionalProjectionManifold<2, 3> is dealii::OpenCASCADE::DirectionalProjectionManifold<2, 3>
-DEAL::typeid of NormalProjectionBoundary<2, 3> is dealii::OpenCASCADE::NormalToMeshProjectionBoundary<1, 3>
DEAL::typeid of NormalProjectionManifold<2, 3> is dealii::OpenCASCADE::NormalToMeshProjectionManifold<1, 3>
DEAL::OK
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
TopoDS_Face face = BRepPrimAPI_MakeSphere(center, radius);
// Create a boundary projector.
- NormalProjectionBoundary<3, 3> sphere(face);
+ NormalProjectionManifold<3, 3> sphere(face);
// The unit cube.
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <BRepFill.hxx>
TopoDS_Face face = BRepFill::Face(edge1, edge2);
- NormalToMeshProjectionBoundary<1, 3> manifold(face);
+ NormalToMeshProjectionManifold<1, 3> manifold(face);
Triangulation<1, 3> tria;
GridGenerator::hyper_cube(tria);
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <BRepFill.hxx>
TopoDS_Face face = BRepFill::Face(edge1, edge2);
- NormalToMeshProjectionBoundary<2, 3> manifold(face);
+ NormalToMeshProjectionManifold<2, 3> manifold(face);
Triangulation<2, 3> tria;
GridGenerator::hyper_cube(tria);
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/tria.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <BRepFill.hxx>
TopoDS_Face face = BRepFill::Face(edge1, edge2);
- NormalToMeshProjectionBoundary<2, 3> manifold(face);
+ NormalToMeshProjectionManifold<2, 3> manifold(face);
Triangulation<2, 3> tria;
GridGenerator::hyper_cube(tria);
// Read goteborg.iges and dump its topological structure to the
// logfile.
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <deal.II/opencascade/utilities.h>
#include <Standard_Stream.hxx>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
-#include <deal.II/opencascade/boundary_lib.h>
+#include <deal.II/opencascade/manifold_lib.h>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
// Create a boundary projector on the first face.
- NormalProjectionBoundary<2, 3> boundary(faces[0]);
+ NormalProjectionManifold<2, 3> boundary(faces[0]);
// Create a Triangulation with a single cell
Triangulation<2, 3> tria;