LCOV - code coverage report
Current view: top level - include/bcs - BoundaryCondition.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 1 1 100.0 %
Date: 2025-07-17 01:28:37 Functions: 1 1 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             : #pragma once
      11             : 
      12             : // MOOSE
      13             : #include "ResidualObject.h"
      14             : #include "ParallelUniqueId.h"
      15             : #include "DistributionInterface.h"
      16             : #include "GeometricSearchInterface.h"
      17             : #include "BoundaryRestrictableRequired.h"
      18             : 
      19             : /**
      20             :  * Base class for creating new types of boundary conditions.
      21             :  */
      22             : class BoundaryCondition : public ResidualObject,
      23             :                           public BoundaryRestrictableRequired,
      24             :                           public DistributionInterface,
      25             :                           public GeometricSearchInterface
      26             : {
      27             : public:
      28             :   /**
      29             :    * Class constructor.
      30             :    * @param parameters The InputParameters for the object
      31             :    * @param nodal Whether this BC is applied to nodes or not
      32             :    */
      33             :   BoundaryCondition(const InputParameters & parameters, bool nodal);
      34             : 
      35             :   static InputParameters validParams();
      36             : 
      37             :   /**
      38             :    * Hook for turning the boundary condition on and off.
      39             :    *
      40             :    * It is not safe to use variable values in this function, since:
      41             :    * (a) this is not called inside a quadrature loop,
      42             :    * (b) reinit() is not called, thus the variables values are not computed.
      43             :    * NOTE: In NodalBC-derived classes, we can use the variable values, since renitNodeFace() was
      44             :    * called before calling
      45             :    * this method. However, one has to index into the values manually, i.e. not using _qp.
      46             :    * NOTE: In IntegratedBCBase-derived classes, this is relied on for skipping execution when the
      47             :    * variable is not defined next to the boundary. If you override `shouldApply` you should either
      48             :    * suppress this option in the parameters, or call `IntegratedBCBase::shouldApply()` in your
      49             :    * override
      50             :    * @return true if the boundary condition should be applied, otherwise false
      51             :    */
      52    64910929 :   virtual bool shouldApply() const { return true; }
      53             : };

Generated by: LCOV version 1.14