26 params.
addParam<
bool>(
"heal_always",
false,
"Heal previous cuts at every time step");
31 params.
set<
int>(
"execution_order_group") = 1;
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);
const std::vector< double > y
void dataStore(std::ostream &stream, Xfem::CutFace &cf, void *context)
void dataLoad(std::istream &stream, Xfem::CutFace &cf, void *context)
void dataLoad(std::istream &stream, LineSegment &l, void *context)
void dataStore(std::ostream &stream, LineSegment &l, void *context)
const ExecFlagType EXEC_XFEM_MARK
Exec flag used to execute MooseObjects while elements are being marked for cutting by XFEM.
unsigned int CutSubdomainID
Base class for crack front points provider.
static InputParameters validParams()
virtual unsigned int numFragments() const
virtual bool isFinalCut() const
virtual bool isFinalCut() const
const Elem *const & _current_elem
void addAvailableFlags(const ExecFlagType &flag, Args... flags)
std::shared_ptr< XFEMInterface > getXFEM()
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
virtual GeometricSearchData & geomSearchData() override
std::map< unsigned int, std::vector< Xfem::GeomMarkedElemInfo3D > > _marked_elems_3d
virtual void threadJoin(const UserObject &y) override
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.
static InputParameters validParams()
Factory constructor, takes parameters so that all derived classes can be built using the same constru...
virtual void execute() override
unsigned int _interface_id
Associated interface id.
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...
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.
GeometricCutUserObject(const InputParameters ¶meters, const bool uses_mesh=false)
void deserialize(std::vector< std::string > &serialized_buffers)
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.
virtual void initialize() override
virtual CutSubdomainID getCutSubdomainID(const Node *) const
Get CutSubdomainID telling which side the node belongs to relative to the cut.
virtual void finalize() override
std::shared_ptr< XFEM > _xfem
Pointer to the XFEM controller object.
void addElementPairLocator(BoundaryID interface_id, std::shared_ptr< ElementPairLocator > epl)
void mooseError(Args &&... args) const
void allgather(const T &send_data, std::vector< T, A > &recv_data) const
FEProblemBase & _fe_problem
const Parallel::Communicator & _communicator
processor_id_type processor_id() const
processor_id_type n_processors() const
Data structure defining a cut through a face.
unsigned int _face_id
ID of the cut face.
std::vector< Real > _position
Fractional distance along the cut edges where the cut is located.
std::vector< unsigned int > _face_edge
IDs of all cut faces.
Data structure describing geometrically described cut through 2D element.
std::vector< CutNode > _elem_cut_nodes
Container for data about all cut nodes in this element.
std::vector< CutEdge > _frag_cut_edges
Container for data about all cut fragments in this element.
std::vector< CutEdge > _elem_cut_edges
Container for data about all cut edges in this element.
std::vector< std::vector< Point > > _frag_edges
Container for data about all cut edges in cut fragments in this element.
Data structure describing geometrically described cut through 3D element.
std::vector< CutFace > _frag_cut_faces
Container for data about all faces this element's fragment.
std::vector< CutFace > _elem_cut_faces
Container for data about all cut faces in this element.
std::vector< std::vector< Point > > _frag_faces
Container for data about all cut faces in cut fragments in this element.