LCOV - code coverage report
Current view: top level - include/vectorpostprocessors - SidesetInfoVectorPostprocessor.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 6 7 85.7 %
Date: 2025-07-17 01:28:37 Functions: 1 2 50.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             : #pragma once
      11             : 
      12             : #include "SideVectorPostprocessor.h"
      13             : 
      14             : /**
      15             :  * Computes and outputs information (area, centroid, bounding box) about sidesets
      16             :  */
      17             : class SidesetInfoVectorPostprocessor : public SideVectorPostprocessor
      18             : {
      19             : public:
      20             :   static InputParameters validParams();
      21             : 
      22             :   SidesetInfoVectorPostprocessor(const InputParameters & parameters);
      23             : 
      24             :   virtual void initialize() override;
      25             :   virtual void execute() override;
      26             :   virtual void finalize() override;
      27           0 :   virtual void meshChanged() override { initialize(); }
      28             : 
      29             :   virtual void threadJoin(const UserObject & y) override;
      30             : 
      31             :   struct BoundaryData
      32             :   {
      33         144 :     BoundaryData()
      34         144 :       : area(0),
      35         144 :         centroid(Point()),
      36         144 :         min(Point(std::numeric_limits<Real>::max(),
      37             :                   std::numeric_limits<Real>::max(),
      38             :                   std::numeric_limits<Real>::max())),
      39         144 :         max(Point(std::numeric_limits<Real>::lowest(),
      40             :                   std::numeric_limits<Real>::lowest(),
      41             :                   std::numeric_limits<Real>::lowest()))
      42             :     {
      43         144 :     }
      44             :     Real area;
      45             :     Point centroid;
      46             :     Point min;
      47             :     Point max;
      48             :   };
      49             : 
      50             : protected:
      51             :   /// a helper function for retrieving data from _boundary_info
      52             :   Real dataHelper(BoundaryID bid, std::string mdat_tpe) const;
      53             : 
      54             :   /// the type of meta data that is written to file
      55             :   MultiMooseEnum _meta_data_types;
      56             : 
      57             :   /// the type of meta data that is written to file
      58             :   std::vector<std::string> _vpp_entry_names;
      59             : 
      60             :   /// the sideset id
      61             :   VectorPostprocessorValue & _sideset_ids;
      62             : 
      63             :   /// the vpp data is stored here
      64             :   std::vector<VectorPostprocessorValue *> _meta_data;
      65             : 
      66             :   /// all data available through the meta_data_types is always accumulated
      67             :   std::map<BoundaryID, BoundaryData> _boundary_data;
      68             : };

Generated by: LCOV version 1.14