https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMCutTransitionSubMesh.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#ifdef MOOSE_MFEM_ENABLED
11
12#pragma once
13
14#include "MFEMSubMesh.h"
16
24{
25public:
28
29protected:
30 virtual void buildSubMesh() override;
31
33 void labelMesh(mfem::ParMesh & parent_mesh);
34
36 void setAttributes(mfem::ParMesh & parent_mesh, mfem::Array<int> & transition_els);
37
39 bool isInDomain(const int & el, const mfem::Array<int> & subdomains, const mfem::ParMesh & mesh);
40
42 mfem::Vector findFaceNormal(const mfem::ParMesh & mesh, const int & face);
43
45 bool isPositiveSideOfCut(const int & el, const int & el_vertex_on_cut, mfem::ParMesh & mesh);
46
47 const BoundaryName & _cut_boundary;
48 std::shared_ptr<mfem::ParSubMesh> _cut_submesh{nullptr};
49 const BoundaryName & _transition_subdomain_boundary;
50 const SubdomainName & _transition_subdomain;
51 const SubdomainName & _closed_subdomain;
52 mfem::Vector _cut_normal;
53};
54
55#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for construction of an object that is restricted to a subset of subdomains of the problem ...
Modifies the MFEM Mesh to label a subdomain consisting of elements adjacent to an interior surface on...
static InputParameters validParams()
const SubdomainName & _transition_subdomain
const SubdomainName & _closed_subdomain
const BoundaryName & _transition_subdomain_boundary
void labelMesh(mfem::ParMesh &parent_mesh)
Add attributes to the parent mesh representing the cut transition region.
void setAttributes(mfem::ParMesh &parent_mesh, mfem::Array< int > &transition_els)
Set new attributes for the provided transition region elements.
bool isInDomain(const int &el, const mfem::Array< int > &subdomains, const mfem::ParMesh &mesh)
Checks whether a given element is within a certain domain or vector of domains.
mfem::Vector findFaceNormal(const mfem::ParMesh &mesh, const int &face)
Finds the normal vector of a face in the mesh from its vertices.
virtual void buildSubMesh() override
Constructs the submesh.
std::shared_ptr< mfem::ParSubMesh > _cut_submesh
bool isPositiveSideOfCut(const int &el, const int &el_vertex_on_cut, mfem::ParMesh &mesh)
Checks whether an element lies on the positive or negative side of the cut plane.
Base class for construction of a mfem::ParSubMesh object.
Definition MFEMSubMesh.h:21
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
MeshBase & mesh