www.mooseframework.org
BreakMeshByBlockBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "MeshModifier.h"
13 
14 // forward declaration
16 
17 template <>
19 
21 {
22 public:
24 
25  // method to override to implement other mesh splitting algorithms
26  virtual void modify() override;
27 
28 protected:
30  std::string _file_name;
32  std::string _interface_name;
33 
36 
40  void checkInputParameter();
41 
44  void findBoundaryNameAndInd(const subdomain_id_type & /*masterBlockID*/,
45  const subdomain_id_type & /*slaveBlockID*/,
46  std::string & /*boundaryName*/,
47  BoundaryID & /*boundaryID*/,
48  BoundaryInfo & /*boundary_info*/);
49 
50  std::set<std::pair<std::string, BoundaryID>> _bName_bID_set;
51 
54 
55 private:
57  std::string generateBoundaryName(const subdomain_id_type & /*masterBlockID*/,
58  const subdomain_id_type & /*slaveBlockID*/);
59 
61  void mapBoundaryIdAndBoundaryName(BoundaryID & /*boundaryID*/,
62  const std::string & /*boundaryName*/);
63 };
64 
InputParameters validParams< BreakMeshByBlockBase >()
std::string _interface_name
the name of the new interface
MeshModifiers are objects that can modify or add to an existing mesh.
Definition: MeshModifier.h:25
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::string _file_name
the file_name from whence this mesh came
bool _split_interface
the flag to split the interface by block
BoundaryID findFreeBoundaryId()
this method finds the first free boundary id
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
void checkInputParameter()
check that if split_interface==true interface_id and interface_name are not set by the user...
boundary_id_type BoundaryID
std::string generateBoundaryName(const subdomain_id_type &, const subdomain_id_type &)
this method generate the boundary name by assembling subdomain names
virtual void modify() override
Pure virtual modify function MUST be overridden by children classes.
BreakMeshByBlockBase(const InputParameters &parameters)
void mapBoundaryIdAndBoundaryName(BoundaryID &, const std::string &)
this method save the boundary name/id pair
void findBoundaryNameAndInd(const subdomain_id_type &, const subdomain_id_type &, std::string &, BoundaryID &, BoundaryInfo &)
given the master and slave blocks this method return the appropriate boundary id and name ...
std::set< std::pair< std::string, BoundaryID > > _bName_bID_set