https://mooseframework.inl.gov
Loading...
Searching...
No Matches
StitchedMesh.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 "MooseMesh.h"
13
14namespace libMesh
15{
16class ReplicatedMesh;
17}
18
23class StitchedMesh : public MooseMesh
24{
25public:
27
29 StitchedMesh(const StitchedMesh & other_mesh);
30
31 virtual std::unique_ptr<MooseMesh> safeClone() const override;
32
33 virtual void buildMesh() override;
34
35protected:
37 const std::vector<MeshFileName> & _files;
38
41
43 const std::vector<BoundaryName> & _stitch_boundaries;
44
46 std::vector<std::pair<BoundaryName, BoundaryName>> _stitch_boundaries_pairs;
47
48 // Pointer to the original "real" mesh to be stitched into
49 ReplicatedMesh * _original_mesh;
50
52 std::vector<std::unique_ptr<ReplicatedMesh>> _meshes;
53};
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
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition MooseMesh.h:95
Reads an arbitrary set of meshes and attempts to "stitch" (join) them along boundaries.
const std::vector< BoundaryName > & _stitch_boundaries
The raw data from the input file.
virtual void buildMesh() override
Must be overridden by child classes.
ReplicatedMesh * _original_mesh
static InputParameters validParams()
const std::vector< MeshFileName > & _files
The mesh files to read.
std::vector< std::pair< BoundaryName, BoundaryName > > _stitch_boundaries_pairs
A transformed version of _stitch_boundaries into a more logical "pairwise" structure.
virtual std::unique_ptr< MooseMesh > safeClone() const override
A safer version of the clone() method that hands back an allocated object wrapped in a smart pointer.
const bool & _clear_stitched_boundary_ids
Whether or not to clear (remove) the stitched boundary IDs.
std::vector< std::unique_ptr< ReplicatedMesh > > _meshes
The meshes to be stitched together. The first entry will be the "real" mesh.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...