30 std::unique_ptr<MeshBase>
generate()
override;
59 static Real
quadQuality(
const std::array<Point, 4> & quad_points);
69 static std::vector<RecombineCandidate>
70 greedyMatching(std::vector<RecombineCandidate> & candidates,
const Real eta_min);
109 buildCandidate(
const Elem & elem,
const unsigned int side,
const Elem & neighbor);
118 void subdivide(ReplicatedMesh & mesh)
const;
124 void recombine(ReplicatedMesh & mesh)
const;
134 const subdomain_id_type scratch_subdomain_id)
const;
MeshGenerators are objects that can modify or add to an existing mesh.
const InputParameters & parameters() const
Get the parameters of the object.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
This TriToQuadConverter object converts a mesh made of TRI3 elements into a mesh made of QUAD4 elemen...
static std::vector< RecombineCandidate > greedyMatching(std::vector< RecombineCandidate > &candidates, const Real eta_min)
Select the pairs of triangles to merge, taking the highest scoring candidates first and consuming eac...
const SubdomainName _tri_subdomain_name_suffix
Suffix appended to the name of a subdomain to name the one its surviving triangles move into.
void subdivide(ReplicatedMesh &mesh) const
Replace every element of the mesh by one quadrilateral per corner, built on its centroid and its edge...
std::unique_ptr< MeshBase > & _input
Mesh that possibly comes from another generator.
const bool _all_quad
Whether the triangles that survive recombination are eliminated.
const Real _eta_min
Score below which a pair of adjacent triangles is not recombined.
static std::vector< QuadCorners > triSubdivisionTemplate()
The three quadrilaterals that a triangle is split into, one per corner, each of them built on that co...
std::array< unsigned int, 4 > QuadCorners
The four corners of one quadrilateral, as indices into the point list of a template.
static Real quadQuality(const std::array< Point, 4 > &quad_points)
Compute the quality score of a planar quadrilateral, eta = max(0, 1 - (2 / pi) * max_k |pi / 2 - alph...
void moveSurvivingTriangles(ReplicatedMesh &mesh, const subdomain_id_type scratch_subdomain_id) const
Move the triangles that recombination did not consume out of the subdomains they came from,...
const MooseEnum _algorithm
Algorithm used to build the quadrilaterals.
void recombine(ReplicatedMesh &mesh) const
Replace the highest scoring pairs of adjacent triangles of the mesh by quadrilaterals.
static InputParameters validParams()
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
static RecombineCandidate buildCandidate(const Elem &elem, const unsigned int side, const Elem &neighbor)
Build the merge candidate for the two triangles that share a side.
static std::vector< QuadCorners > quadSubdivisionTemplate()
The four quadrilaterals that a quadrilateral is split into, one per corner, each of them built on tha...
A pair of adjacent triangles that the recombination algorithm can merge into one quadrilateral.
dof_id_type first_elem_id
Id of the lower numbered triangle of the pair.
std::array< dof_id_type, 4 > quad_node_ids
Node ids of the quadrilateral, in counter-clockwise order.
dof_id_type second_elem_id
Id of the higher numbered triangle of the pair.
Real eta
Quality score of the quadrilateral that the two triangles would form.