21 "the name of the new interface. Cannot be used whit `split_interface=true`");
22 params.
addParam<
bool>(
"split_interface",
24 "If true, it creates a " 25 "different interface for each block pair.");
27 "mesh by blocks pairs");
34 _interface_name(getParam<
std::string>(
"interface_name")),
35 _split_interface(getParam<bool>(
"split_interface"))
40 mooseError(
"if split_interface == true, the new interface_name" 41 " cannot be specified by the user. It will be automatically assigned");
48 const std::set<boundary_id_type> & currentBoundaryIds =
49 mesh.get_boundary_info().get_boundary_ids();
50 bool freeBoundaryNotFound =
true;
54 if (currentBoundaryIds.count(freeId) == 0)
57 freeBoundaryNotFound =
false;
62 if (freeBoundaryNotFound)
63 mooseError(
"Too many boundaries. Maximum limit exceeded!");
73 std::string primary_block_name =
mesh.subdomain_name(primaryBlockID);
74 std::string secondary_block_name =
mesh.subdomain_name(secondaryBlockID);
75 if (primary_block_name.empty())
76 primary_block_name =
"Block" + std::to_string(primaryBlockID);
77 if (secondary_block_name.empty())
78 secondary_block_name =
"Block" + std::to_string(secondaryBlockID);
80 return primary_block_name +
"_" + secondary_block_name;
85 const std::string & boundaryName)
87 _bName_bID_set.insert(std::pair<std::string, int>(boundaryName, boundaryID));
94 std::string & boundaryName,
96 BoundaryInfo & boundary_info)
106 bool checkBoundaryAlreadyExist =
false;
109 if (b.first.compare(boundaryName) == 0)
111 boundaryID = b.second;
112 checkBoundaryAlreadyExist =
true;
116 if (checkBoundaryAlreadyExist)
126 boundary_info.sideset_name(boundaryID) = boundaryName;
void findBoundaryNameAndInd(MeshBase &mesh, const subdomain_id_type &, const subdomain_id_type &, std::string &, boundary_id_type &, BoundaryInfo &)
given the primary and secondary blocks this method return the appropriate boundary id and name ...
auto max(const L &left, const R &right)
std::set< std::pair< std::string, BoundaryID > > _bName_bID_set
static InputParameters validParams()
BreakMeshByBlockGeneratorBase(const InputParameters ¶meters)
static InputParameters validParams()
void mapBoundaryIdAndBoundaryName(boundary_id_type &, const std::string &)
this method save the boundary name/id pair
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & _pars
Parameters of this object, references the InputParameters stored in the InputParametersWarehouse.
BoundaryID findFreeBoundaryId(MeshBase &mesh)
this method finds the first free boundary id
std::string generateBoundaryName(MeshBase &mesh, const subdomain_id_type &, const subdomain_id_type &)
this method generate the boundary name by assembling subdomain names
MeshGenerators are objects that can modify or add to an existing mesh.