www.mooseframework.org
PorousFlowLineGeometry.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "DiracKernel.h"
13 #include "ReporterInterface.h"
14 
19 {
20 public:
29 
31 
32  void virtual initialSetup() override;
33 
34 protected:
37 
40 
46  const std::string _point_file;
47 
49  std::vector<Real> _rs;
50 
52  std::vector<Real> _xs;
53 
55  std::vector<Real> _ys;
56 
58  std::vector<Real> _zs;
59 
62 
64  std::vector<Real> _half_seg_len;
65 
67  virtual void addPoints() override;
68 
70  virtual void meshChanged() override;
71 
73  bool parseNextLineReals(std::ifstream & ifs, std::vector<Real> & myvec);
74 
77  const std::vector<Real> * const _x_coord;
78  const std::vector<Real> * const _y_coord;
79  const std::vector<Real> * const _z_coord;
80  const std::vector<Real> * const _weight;
81  const bool _usingReporter;
83 private:
84  void calcLineLengths();
85  void regenPoints();
86 
88  std::vector<Real> _line_base;
89 };
virtual void addPoints() override
Add Dirac Points to the line sink.
const std::vector< Real > *const _weight
const std::vector< Real > *const _y_coord
virtual void meshChanged() override
regenerate points in each cell if using line_base
bool parseNextLineReals(std::ifstream &ifs, std::vector< Real > &myvec)
Reads a space-separated line of floats from ifs and puts in myvec.
const Real _line_length
Line length. This is only used if there is only one borehole point.
Approximates a borehole by a sequence of Dirac Points.
std::vector< Real > _ys
y points of the borehole
std::vector< Real > _half_seg_len
0.5*(length of polyline segments between points)
const RealVectorValue _line_direction
Line direction. This is only used if there is only one borehole point.
PorousFlowLineGeometry(const InputParameters &parameters)
virtual void initialSetup() override
std::vector< Real > _zs
z points of borehole
std::vector< Real > _line_base
alternative (to the point file data) line weight and start point.
const std::vector< Real > *const _x_coord
static InputParameters validParams()
Creates a new PorousFlowLineGeometry This reads the file containing the lines of the form weight x y ...
const std::vector< Real > *const _z_coord
const std::string _point_file
File defining the geometry of the borehole.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const InputParameters & parameters() const
std::vector< Real > _xs
x points of the borehole
std::vector< Real > _rs
Radii of the borehole.
Point _bottom_point
The bottom point of the borehole (where bottom_pressure is defined)