https://mooseframework.inl.gov
GeometricCut3DUserObject.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "GeometricCutUserObject.h"
13 
14 using namespace libMesh;
15 
17 {
18 public:
20 
21  GeometricCut3DUserObject(const InputParameters & parameters);
22 
23  virtual bool cutElementByGeometry(const Elem * elem,
24  std::vector<Xfem::CutEdge> & cut_edges,
25  std::vector<Xfem::CutNode> & cut_nodes) const override;
26  virtual bool cutElementByGeometry(const Elem * elem,
27  std::vector<Xfem::CutFace> & cut_faces) const override;
28 
29  virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_edges,
30  std::vector<Xfem::CutEdge> & cut_edges) const override;
31  virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_faces,
32  std::vector<Xfem::CutFace> & cut_faces) const override;
33 
34 protected:
37 
38  virtual bool intersectWithEdge(const Point & p1, const Point & p2, Point & pint) const;
39 
40  virtual bool isInsideCutPlane(Point p) const = 0;
41 
42  bool isInsideEdge(const Point & p1, const Point & p2, const Point & p) const;
43 
44  Real getRelativePosition(const Point & p1, const Point & p2, const Point & p) const;
45 };
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
Real getRelativePosition(const Point &p1, const Point &p2, const Point &p)
Get the relative position of p from p1 respect to the total length of the line segment.
Definition: XFEMFuncs.C:991
InputParameters validParams()
bool intersectWithEdge(const Point &p1, const Point &p2, const std::vector< Point > &vertices, Point &pint)
check if a line intersects with an element defined by vertices calculate the distance from a point to...
Definition: XFEMFuncs.C:948
bool isInsideCutPlane(const std::vector< Point > &vertices, const Point &p)
Check if point p is inside a plane.
Definition: XFEMFuncs.C:999
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool isInsideEdge(const Point &p1, const Point &p2, const Point &p)
check if point is inside the straight edge p1-p2
Definition: XFEMFuncs.C:983