26 params.
addParam<
bool>(
"heal_always",
false,
"Heal previous cuts at every time step");
41 mooseError(
"Problem casting to XFEM in GeometricCutUserObject");
43 _xfem->addGeometricCut(
this);
50 auto new_xfem_epl2 = std::make_shared<XFEMElementPairLocator>(
_xfem,
_interface_id,
true);
68 std::vector<Xfem::CutEdge> elem_cut_edges;
69 std::vector<Xfem::CutNode> elem_cut_nodes;
70 std::vector<Xfem::CutEdge> frag_cut_edges;
71 std::vector<std::vector<Point>> frag_edges;
99 std::vector<Xfem::CutFace> elem_cut_faces;
100 std::vector<Xfem::CutFace> frag_cut_faces;
101 std::vector<std::vector<Point>> frag_faces;
134 for (
const auto & it : gcuo._marked_elems_2d)
137 "Element already inserted in map from a different thread");
140 for (
const auto & it : gcuo._marked_elems_3d)
143 "Element already inserted in map from a different thread");
210 std::ostringstream oss;
215 serialized_buffer.assign(oss.str());
222 "Unexpected size of serialized_buffers: " << serialized_buffers.size());
225 std::istringstream iss;
228 for (
unsigned int rank = 0; rank < serialized_buffers.size(); ++rank)
236 iss.str(serialized_buffers[rank]);
239 std::map<unsigned int, std::vector<Xfem::GeomMarkedElemInfo2D>> other_marked_elems_2d;
240 std::map<unsigned int, std::vector<Xfem::GeomMarkedElemInfo3D>> other_marked_elems_3d;
241 dataLoad(iss, other_marked_elems_2d,
this);
242 dataLoad(iss, other_marked_elems_3d,
this);
245 _marked_elems_2d.insert(other_marked_elems_2d.begin(), other_marked_elems_2d.end());
246 _marked_elems_3d.insert(other_marked_elems_3d.begin(), other_marked_elems_3d.end());
257 std::string send_buffer;
260 std::vector<std::string> recv_buffers;
273 for (
const auto & gmei : it.second)
277 for (
const auto & gmei : it.second)
287 return _xfem->getCutSubdomainID(
this, elem);
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo2D > > _marked_elems_2d
Containers with information about all 2D and 3D elements marked for cutting by this object...
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
virtual void initialize() override
Data structure describing geometrically described cut through 3D element.
static InputParameters validParams()
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
void dataLoad(std::istream &stream, Xfem::CutFace &cf, void *context)
unsigned int _interface_id
Associated interface id.
virtual void finalize() override
virtual void threadJoin(const UserObject &y) override
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
const std::vector< double > y
GeometricCutUserObject(const InputParameters ¶meters, const bool uses_mesh=false)
const Parallel::Communicator & _communicator
std::vector< Real > _position
Fractional distance along the cut edges where the cut is located.
void dataStore(std::ostream &stream, Xfem::CutFace &cf, void *context)
virtual unsigned int numFragments() const
virtual void execute() override
std::vector< CutNode > _elem_cut_nodes
Container for data about all cut nodes in this element.
Data structure defining a cut through a face.
std::vector< CutEdge > _elem_cut_edges
Container for data about all cut edges in this element.
unsigned int CutSubdomainID
virtual GeometricSearchData & geomSearchData() override
static InputParameters validParams()
virtual bool cutFragmentByGeometry(std::vector< std::vector< Point >> &frag_edges, std::vector< Xfem::CutEdge > &cut_edges) const =0
Check to see whether a fragment of a 2D element should be cut based on geometric conditions.
std::vector< std::vector< Point > > _frag_edges
Container for data about all cut edges in cut fragments in this element.
processor_id_type n_processors() const
void addElementPairLocator(BoundaryID interface_id, std::shared_ptr< ElementPairLocator > epl)
Base class for crack front points provider.
virtual bool isFinalCut() const
void deserialize(std::vector< std::string > &serialized_buffers)
std::vector< CutEdge > _frag_cut_edges
Container for data about all cut fragments in this element.
Data structure describing geometrically described cut through 2D element.
virtual CutSubdomainID getCutSubdomainID(const Node *) const
Get CutSubdomainID telling which side the node belongs to relative to the cut.
void serialize(std::string &serialized_buffer)
Methods to pack/unpack the _marked_elems_2d and _marked_elems_3d data into a structure suitable for p...
const ExecFlagType EXEC_XFEM_MARK
Exec flag used to execute MooseObjects while elements are being marked for cutting by XFEM...
std::shared_ptr< XFEM > _xfem
Pointer to the XFEM controller object.
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
const Elem *const & _current_elem
FEProblemBase & _fe_problem
std::shared_ptr< XFEMInterface > getXFEM()
void mooseError(Args &&... args) const
std::vector< CutFace > _frag_cut_faces
Container for data about all faces this element's fragment.
std::vector< std::vector< Point > > _frag_faces
Container for data about all cut faces in cut fragments in this element.
processor_id_type processor_id() const
std::vector< CutFace > _elem_cut_faces
Container for data about all cut faces in this element.
virtual bool cutElementByGeometry(const Elem *elem, std::vector< Xfem::CutEdge > &cut_edges, std::vector< Xfem::CutNode > &cut_nodes) const =0
Check to see whether a specified 2D element should be cut based on geometric conditions.
std::vector< unsigned int > _face_edge
IDs of all cut faces.
unsigned int _face_id
ID of the cut face.
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo3D > > _marked_elems_3d
virtual bool isFinalCut() const