https://mooseframework.inl.gov
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 
14 namespace libMesh
15 {
16 class ReplicatedMesh;
17 }
18 
23 class StitchedMesh : public MooseMesh
24 {
25 public:
27 
29  StitchedMesh(const StitchedMesh & other_mesh);
30 
31  virtual std::unique_ptr<MooseMesh> safeClone() const override;
32 
33  virtual void buildMesh() override;
34 
35 protected:
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 };
const bool & _clear_stitched_boundary_ids
Whether or not to clear (remove) the stitched boundary IDs.
Definition: StitchedMesh.h:40
ReplicatedMesh * _original_mesh
Definition: StitchedMesh.h:49
std::vector< std::unique_ptr< ReplicatedMesh > > _meshes
The meshes to be stitched together. The first entry will be the "real" mesh.
Definition: StitchedMesh.h:52
virtual void buildMesh() override
Must be overridden by child classes.
Definition: StitchedMesh.C:83
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Reads an arbitrary set of meshes and attempts to "stitch" (join) them along boundaries.
Definition: StitchedMesh.h:23
StitchedMesh(const InputParameters &parameters)
Definition: StitchedMesh.C:46
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
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...
Definition: StitchedMesh.C:77
const InputParameters & parameters() const
Get the parameters of the object.
static InputParameters validParams()
Definition: StitchedMesh.C:23
const std::vector< BoundaryName > & _stitch_boundaries
The raw data from the input file.
Definition: StitchedMesh.h:43
const std::vector< MeshFileName > & _files
The mesh files to read.
Definition: StitchedMesh.h:37
std::vector< std::pair< BoundaryName, BoundaryName > > _stitch_boundaries_pairs
A transformed version of _stitch_boundaries into a more logical "pairwise" structure.
Definition: StitchedMesh.h:46