www.mooseframework.org
SmoothCircleFromFileIC.h
Go to the documentation of this file.
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 #ifndef SMOOTHCIRCLEFROMFILE_H
8 #define SMOOTHCIRCLEFROMFILE_H
9 
10 #include <array>
11 
12 #include "SmoothCircleBaseIC.h"
13 #include "DelimitedFileReader.h"
14 
15 // Forward Declarations
17 
18 template <>
19 InputParameters validParams<SmoothCircleFromFileIC>();
20 
28 {
29 public:
30  SmoothCircleFromFileIC(const InputParameters & parameters);
31 
32 protected:
33  virtual void computeCircleRadii();
34  virtual void computeCircleCenters();
35 
36  enum COLS
37  {
38  X,
39  Y,
40  Z,
41  R
42  };
43  // Double braces in array initializer are workaround for bug in gcc 4.9.2
44  std::array<int, 4> _col_map = {{-1, -1, -1, -1}};
45  std::vector<std::vector<Real>> _data;
46  FileName _file_name;
47  MooseUtils::DelimitedFileReader _txt_reader;
48  std::vector<std::string> _col_names;
49  unsigned int _n_circles;
50 };
51 
52 #endif // SMOOTHCIRCLEFROMFILE_H
SmoothcircleBaseIC is the base class for all initial conditions that create circles.
MooseUtils::DelimitedFileReader _txt_reader
std::vector< std::string > _col_names
SmoothCircleFromFileIC(const InputParameters &parameters)
Reads multiple circles from a text file with the columns labeled x y z r.
std::array< int, 4 > _col_map
InputParameters validParams< SmoothCircleFromFileIC >()
std::vector< std::vector< Real > > _data