https://mooseframework.inl.gov
PatternedCartesianPeripheralModifier.C
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 
11 
12 #include "MooseMeshUtils.h"
13 
15 
18 {
20  return params;
21 }
22 
24  const InputParameters & parameters)
26 {
28  declareMeshProperty<bool>("square_peripheral_trimmability", false);
29  declareMeshProperty<bool>("square_center_trimmability", false);
30 }
31 
32 std::unique_ptr<MeshBase>
34 {
35  if (hasMeshProperty<bool>("square_center_trimmability", _input_name))
36  setMeshProperty("square_center_trimmability",
37  getMeshProperty<bool>("square_center_trimmability", _input_name));
38 
39  // Check if the input mesh is compatible
40  if (!getMeshProperty<bool>("peripheral_modifier_compatible", _input_name))
41  paramError("input",
42  "The input mesh is generated by a mesh generator that is not compatible with "
43  "PatternedCartesianPeripheralModifier.");
44  // Whether the input mesh is cartesian
45  if (!hasMeshProperty<bool>("square_center_trimmability", _input_name))
46  paramError("input", "The input mesh is not declared as center-trimmable in its metadata.");
47 
49 }
const MeshGeneratorName _input_name
Name of the input mesh that needs the modification.
std::unique_ptr< MeshBase > generate() override
T & setMeshProperty(const std::string &data_name, Args &&... args)
registerMooseObject("ReactorApp", PatternedCartesianPeripheralModifier)
unsigned int _num_sides
Number of sides of the mesh to be generated.
This PatternedCartesianPeripheralModifier object removes the outmost layer of the input mesh and add ...
void paramError(const std::string &param, Args... args) const
This PatternedPolygonPeripheralModifierBase is the base class for PatternedCartesianPeripheralModifie...
PatternedCartesianPeripheralModifier(const InputParameters &parameters)