https://mooseframework.inl.gov
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 #include "MFEMSubMesh.h"
14 #include "MFEMBlockRestrictable.h"
15 
23 {
24 public:
27 
28 protected:
29  virtual void buildSubMesh() override;
30 
32  void labelMesh(mfem::ParMesh & parent_mesh);
33 
35  void setAttributes(mfem::ParMesh & parent_mesh, mfem::Array<int> & transition_els);
36 
38  bool isInDomain(const int & el, const mfem::Array<int> & subdomains, const mfem::ParMesh & mesh);
39 
41  mfem::Vector findFaceNormal(const mfem::ParMesh & mesh, const int & face);
42 
44  int sideOfCut(const int & el, const int & el_vertex_on_cut, mfem::ParMesh & mesh);
45 
46  const BoundaryName & _cut_boundary;
47  std::shared_ptr<mfem::ParSubMesh> _cut_submesh{nullptr};
48  const BoundaryName & _transition_subdomain_boundary;
49  const SubdomainName & _transition_subdomain;
50  const SubdomainName & _closed_subdomain;
51  mfem::Vector _cut_normal;
52 };
53 
54 #endif
const BoundaryName & _cut_boundary
Modifies the MFEM Mesh to label a subdomain consisting of elements adjacent to an interior surface on...
const SubdomainName & _closed_subdomain
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
MeshBase & mesh
virtual void buildSubMesh() override
Constructs the submesh.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const BoundaryName & _transition_subdomain_boundary
void labelMesh(mfem::ParMesh &parent_mesh)
Add attributes to the parent mesh representing the cut transition region.
int sideOfCut(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. ...
MFEMCutTransitionSubMesh(const InputParameters &parameters)
const SubdomainName & _transition_subdomain
Base class for construction of a mfem::ParSubMesh object.
Definition: MFEMSubMesh.h:22
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.
std::shared_ptr< mfem::ParSubMesh > _cut_submesh
void setAttributes(mfem::ParMesh &parent_mesh, mfem::Array< int > &transition_els)
Set new attributes for the provided transition region elements.
mfem::Vector findFaceNormal(const mfem::ParMesh &mesh, const int &face)
Finds the normal vector of a face in the mesh from its vertices.
static InputParameters validParams()
Base class for construction of an object that is restricted to a subset of subdomains of the problem ...