LCOV - code coverage report
Current view: top level - include/bcs - PorousFlowHalfCubicSink.h (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 1 1 100.0 %
Date: 2017-11-18 13:30:36 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /* MOOSE - Multiphysics Object Oriented Simulation Environment  */
       3             : /*                                                              */
       4             : /*          All contents are licensed under LGPL V2.1           */
       5             : /*             See LICENSE for full restrictions                */
       6             : /****************************************************************/
       7             : 
       8             : #ifndef POROUSFLOWHALFCUBICSINK_H
       9             : #define POROUSFLOWHALFCUBICSINK_H
      10             : 
      11             : #include "PorousFlowSinkPTDefiner.h"
      12             : 
      13             : // Forward Declarations
      14             : class PorousFlowHalfCubicSink;
      15             : 
      16             : template <>
      17             : InputParameters validParams<PorousFlowHalfCubicSink>();
      18             : 
      19             : /**
      20             :  * Applies a flux sink to a boundary.  The base flux
      21             :  * defined by PorousFlowSink is multiplied by a cubic.
      22             :  * Denote x = porepressure - center, or in the case of
      23             :  * heat fluxes with no fluid, x = temperature - center.  Then
      24             :  * Then Flux out = (max/cutoff^3)*(2x + cutoff)(x - cutoff)^2 for cutoff < x < 0.
      25             :  * Flux out = max for x >= 0.
      26             :  * Flux out = 0 for x <= cutoff.
      27             :  * This is typically used for modelling evapotranspiration
      28             :  * from the top of a groundwater model
      29             :  */
      30           2 : class PorousFlowHalfCubicSink : public PorousFlowSinkPTDefiner
      31             : {
      32             : public:
      33             :   PorousFlowHalfCubicSink(const InputParameters & parameters);
      34             : 
      35             : protected:
      36             :   /// maximum of the cubic sink
      37             :   const Real _maximum;
      38             : 
      39             :   /// Denote x = porepressure - center.  Then Flux out = (max/cutoff^3)*(2x + cutoff)(x - cutoff)^2 for cutoff < x < 0.  Flux out = max for x >= 0.  Flux out = 0 for x <= cutoff.
      40             :   Function & _cutoff;
      41             : 
      42             :   /// center of the cubic sink
      43             :   const Real _center;
      44             : 
      45             :   virtual Real multiplier() const override;
      46             : 
      47             :   virtual Real dmultiplier_dvar(unsigned int pvar) const override;
      48             : };
      49             : 
      50             : #endif // POROUSFLOWHALFCUBICSINK_H

Generated by: LCOV version 1.11