LCOV - code coverage report
Current view: top level - src/meshgenerators - PatternedCartesianPeripheralModifier.C (source / functions) Hit Total Coverage
Test: idaholab/moose reactor: #32971 (54bef8) with base c6cf66 Lines: 18 18 100.0 %
Date: 2026-05-29 20:39:24 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #include "PatternedCartesianPeripheralModifier.h"
      11             : 
      12             : #include "MooseMeshUtils.h"
      13             : 
      14             : registerMooseObject("ReactorApp", PatternedCartesianPeripheralModifier);
      15             : 
      16             : InputParameters
      17         132 : PatternedCartesianPeripheralModifier::validParams()
      18             : {
      19         132 :   InputParameters params = PatternedPolygonPeripheralModifierBase::validParams();
      20         132 :   return params;
      21             : }
      22             : 
      23          62 : PatternedCartesianPeripheralModifier::PatternedCartesianPeripheralModifier(
      24          62 :     const InputParameters & parameters)
      25          62 :   : PatternedPolygonPeripheralModifierBase(parameters)
      26             : {
      27          62 :   _num_sides = SQUARE_NUM_SIDES;
      28          62 :   declareMeshProperty<bool>("square_peripheral_trimmability", false);
      29          62 :   declareMeshProperty<bool>("square_center_trimmability", false);
      30          62 : }
      31             : 
      32             : std::unique_ptr<MeshBase>
      33          62 : PatternedCartesianPeripheralModifier::generate()
      34             : {
      35         124 :   if (hasMeshProperty<bool>("square_center_trimmability", _input_name))
      36         120 :     setMeshProperty("square_center_trimmability",
      37             :                     getMeshProperty<bool>("square_center_trimmability", _input_name));
      38             : 
      39             :   // Check if the input mesh is compatible
      40          62 :   if (!getMeshProperty<bool>("peripheral_modifier_compatible", _input_name))
      41           2 :     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         120 :   if (!hasMeshProperty<bool>("square_center_trimmability", _input_name))
      46           2 :     paramError("input", "The input mesh is not declared as center-trimmable in its metadata.");
      47             : 
      48          58 :   return PatternedPolygonPeripheralModifierBase::generate();
      49             : }

Generated by: LCOV version 1.14