LCOV - code coverage report
Current view: top level - include/actioncomponents - ComponentMeshTransformHelper.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 2 3 66.7 %
Date: 2026-05-29 20:35:17 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 "ActionComponent.h"
      13             : #include "InputParameters.h"
      14             : #include "MooseTypes.h"
      15             : 
      16             : /**
      17             :  * Helper class to help Components be located with the orientation and position we want.
      18             :  * The template argument is the dimension: 0D components don't need to be re-oriented,
      19             :  * while 1D, 2D and 3D components could need this feature.
      20             :  */
      21             : class ComponentMeshTransformHelper : public virtual ActionComponent
      22             : {
      23             : public:
      24             :   static InputParameters validParams();
      25             : 
      26             :   ComponentMeshTransformHelper(const InputParameters & params);
      27             : 
      28             :   /// Return the direction (axis for a cylinder for example) of the component
      29         112 :   RealVectorValue direction() const
      30             :   {
      31             :     mooseAssert(_direction, "No direction specified");
      32         112 :     return *_direction;
      33             :   }
      34             :   /// Return the XZX angle rotation for the component
      35             :   /// NOTE: it is often easier to work with the direction instead
      36             :   RealVectorValue rotation() const
      37             :   {
      38             :     mooseAssert(_rotation, "No rotation specified");
      39             :     return *_rotation;
      40             :   }
      41             :   /// Return the translation of the component
      42             :   /// The default translation is the null vector
      43           0 :   virtual Point translation() const { return _translation; }
      44             : 
      45             : protected:
      46             :   virtual void addMeshGenerators() override;
      47             : 
      48             :   /// Rotation angles
      49             :   const RealVectorValue * const _rotation;
      50             :   /// Direction vector (easier to conceptualize than rotation)
      51             :   const RealVectorValue * const _direction;
      52             :   /// Translation vector
      53             :   const Point _translation;
      54             : };

Generated by: LCOV version 1.14