https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BoundaryMeshBuilder.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
12#include "GeneralUserObject.h"
13#include "SurfaceElementSet.h"
14
15#include "libmesh/mesh_base.h"
16
17#include <memory>
18
35{
36public:
39
40 virtual void initialSetup() override;
41 virtual void initialize() override {}
42 virtual void execute() override {}
43 virtual void finalize() override {}
44
48 MeshBase & mesh() const;
49
54
55protected:
60 virtual void buildDefaultSet() const;
61
67 bool checkWatertightness() const;
68
70 std::unique_ptr<MeshBase> _mesh;
71
73 mutable std::unique_ptr<SurfaceElementSet> _set;
74
76 const std::string _bnd_mesh_name;
77
80
81private:
83 const unsigned int _dim_embedding_mesh;
84};
Owns a saved boundary (surface) mesh and the SurfaceElementSet wrapping it.
static InputParameters validParams()
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job.
virtual void buildDefaultSet() const
Build the default (whole-mesh) SurfaceElementSet.
MeshBase & mesh() const
The owned boundary mesh.
std::unique_ptr< MeshBase > _mesh
The owned boundary mesh, kept alive so SurfaceElement pointers stay valid.
const unsigned int _dim_embedding_mesh
The dimension of the embedding (background) mesh.
const bool _check_watertightness
Whether to check watertightness of the mesh (informational only).
virtual void execute() override
Execute method.
const SurfaceElementSet & surfaceElementSet() const
The whole-mesh SurfaceElementSet, built lazily on first call.
const std::string _bnd_mesh_name
The name of a mesh saved via a MeshGenerator's save_mesh_as parameter.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::unique_ptr< SurfaceElementSet > _set
The whole-mesh SurfaceElementSet, lazily cached on first use.
virtual void finalize() override
Finalize.
bool checkWatertightness() const
Whether the boundary mesh is "closed" – i.e.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
A group of surface elements wrapped for point-containment / distance queries.