https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComboCutUserObject.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
13
15{
16public:
18
20
29 virtual bool cutElementByGeometry(const Elem * elem,
30 std::vector<Xfem::CutEdge> & cut_edges,
31 std::vector<Xfem::CutNode> & cut_nodes) const override;
32
41 virtual bool cutElementByGeometry(const Elem * elem,
42 std::vector<Xfem::CutFace> & cut_faces) const override;
43
52 virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_edges,
53 std::vector<Xfem::CutEdge> & cut_edges) const override;
54
63 virtual bool cutFragmentByGeometry(std::vector<std::vector<Point>> & frag_faces,
64 std::vector<Xfem::CutFace> & cut_faces) const override;
65
67 virtual const std::vector<Point> getCrackFrontPoints(unsigned int) const override
68 {
69 mooseError("getCrackFrontPoints() is not implemented for this object.");
70 }
71
72 virtual const std::vector<RealVectorValue> getCrackPlaneNormals(unsigned int) const override
73 {
74 mooseError("getCrackPlaneNormals() is not implemented for this object.");
75 }
76
77 // Get the CutSubdomainID for each provided geometric cut, then lookup the resulting
78 // combo CutSubdomainID in the user-specified dictionary.
79 virtual CutSubdomainID getCutSubdomainID(const Node * node) const override;
80
81protected:
82private:
84 void buildMap();
85
87 const std::vector<UserObjectName> _cut_names;
88
90 unsigned int _num_cuts;
91
93 std::vector<const GeometricCutUserObject *> _cuts;
94
96 const std::vector<std::vector<CutSubdomainID>> _keys;
97
99 const std::vector<CutSubdomainID> _vals;
100
105 std::map<std::vector<CutSubdomainID>, CutSubdomainID> _combo_ids;
106};
unsigned int CutSubdomainID
virtual const std::vector< RealVectorValue > getCrackPlaneNormals(unsigned int) const override
get a set of normal vectors along a crack front from a XFEM GeometricCutUserObject
virtual CutSubdomainID getCutSubdomainID(const Node *node) const override
const std::vector< CutSubdomainID > _vals
Values read from the input file, to be parsed by buildMap()
unsigned int _num_cuts
Number of geometric cuts to be combined.
virtual bool cutElementByGeometry(const Elem *elem, std::vector< Xfem::CutEdge > &cut_edges, std::vector< Xfem::CutNode > &cut_nodes) const override
Loop over all the provided GeometricCutUserObjects, fill the data structures based on each cut that w...
void buildMap()
Helper function to build the dictionary for composite CutSubdomainID look-up.
virtual const std::vector< Point > getCrackFrontPoints(unsigned int) const override
The ComboCutUserObject shouldn't be used to provided crack front data.
const std::vector< UserObjectName > _cut_names
Vector of names of GeometricCutUserObjects to be combined.
std::vector< const GeometricCutUserObject * > _cuts
Vector of points to the GeometricCutUserObjects to be combined.
const std::vector< std::vector< CutSubdomainID > > _keys
Keys read from the input file, to be parsed by buildMap()
virtual bool cutFragmentByGeometry(std::vector< std::vector< Point > > &frag_edges, std::vector< Xfem::CutEdge > &cut_edges) const override
Loop over all the provided GeometricCutUserObjects, fill the data structures based on each cut that w...
std::map< std::vector< CutSubdomainID >, CutSubdomainID > _combo_ids
The dictionary for composite CutSubdomainID look-up.
static InputParameters validParams()
const InputParameters & parameters() const
void mooseError(Args &&... args) const