LCOV - code coverage report
Current view: top level - include/dirackernels - PorousFlowLineGeometry.h (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 1 1 100.0 %
Date: 2017-11-21 14:47:27 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 POROUSFLOWLINEGEOMETRY_H
       9             : #define POROUSFLOWLINEGEOMETRY_H
      10             : 
      11             : #include "DiracKernel.h"
      12             : 
      13             : class PorousFlowLineGeometry;
      14             : 
      15             : template <>
      16             : InputParameters validParams<PorousFlowLineGeometry>();
      17             : 
      18             : /**
      19             :  * Approximates a borehole by a sequence of Dirac Points
      20             :  */
      21          32 : class PorousFlowLineGeometry : public DiracKernel
      22             : {
      23             : public:
      24             :   /**
      25             :    * Creates a new PorousFlowLineGeometry
      26             :    * This reads the file containing the lines of the form
      27             :    * weight x y z
      28             :    * that defines the line geometry.
      29             :    * It also calculates segment-lengths between the points
      30             :    */
      31             :   PorousFlowLineGeometry(const InputParameters & parameters);
      32             : 
      33             : protected:
      34             :   /// line length.  This is only used if there is only one borehole point
      35             :   const Real _line_length;
      36             : 
      37             :   /// line direction.  This is only used if there is only one borehole point
      38             :   const RealVectorValue _line_direction;
      39             : 
      40             :   /**
      41             :    * File defining the geometry of the borehole.   Each row has format
      42             :    * weight x y z
      43             :    * and the list of such points defines a polyline that is the line sink
      44             :    */
      45             :   const std::string _point_file;
      46             : 
      47             :   /// radii of the borehole
      48             :   std::vector<Real> _rs;
      49             : 
      50             :   /// x points of the borehole
      51             :   std::vector<Real> _xs;
      52             : 
      53             :   /// y points of the borehole
      54             :   std::vector<Real> _ys;
      55             : 
      56             :   /// z points of borehole
      57             :   std::vector<Real> _zs;
      58             : 
      59             :   /// the bottom point of the borehole (where bottom_pressure is defined)
      60             :   Point _bottom_point;
      61             : 
      62             :   /// 0.5*(length of polyline segments between points)
      63             :   std::vector<Real> _half_seg_len;
      64             : 
      65             :   /// Add Dirac Points to the line sink
      66             :   virtual void addPoints() override;
      67             : 
      68             :   /// reads a space-separated line of floats from ifs and puts in myvec
      69             :   bool parseNextLineReals(std::ifstream & ifs, std::vector<Real> & myvec);
      70             : };
      71             : 
      72             : #endif // POROUSFLOWLINEGEOMETRY_H

Generated by: LCOV version 1.11