insertionRegion.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 #ifndef __insertionRegion_hpp__
22 #define __insertionRegion_hpp__
23 
24 #include "timeFlowControl.hpp"
25 #include "shapeMixture.hpp"
26 #include "peakableRegions.hpp"
27 #include "setFieldList.hpp"
28 
29 namespace pFlow
30 {
31 
32 class dictionary;
33 
35 :
36  public timeFlowControl
37 {
38 protected:
39 
40  // - name of the region
42 
43  // - type of insertion region
45 
46  // peakable region of points
48 
49  // mixture of shapes
51 
52  // setFields for insertion region
54 
55 
56  bool readInsertionRegion(const dictionary& dict);
57 
58  bool writeInsertionRegion(dictionary& dict) const;
59 
60 
61 public:
62 
63  TypeInfoNV("insertionRegion");
64 
66 
67  insertionRegion(const dictionary& dict);
68 
69  insertionRegion(const insertionRegion& src);
70 
71  insertionRegion(insertionRegion&&) = default;
72 
74 
76 
77 
78  ~insertionRegion() = default;
79 
80 
82  const auto& setFields()const
83  {
84  return setFields_();
85  }
86 
87  const auto& name()const
88  {
89  return name_;
90  }
91 
92 
94 
95  bool read(const dictionary& dict)
96  {
97  if(!timeFlowControl::read(dict))return false;
98 
99  return readInsertionRegion(dict);
100  }
101 
102  bool write(dictionary& dict)const
103  {
104  if(!timeFlowControl::write(dict)) return false;
105 
106  return writeInsertionRegion(dict);
107  }
108 
109 
110 };
111 
112 } //pFlow
113 
114 #endif //__insertionRegion_hpp__
pFlow::insertionRegion::setFields
const auto & setFields() const
Definition: insertionRegion.hpp:82
pFlow::insertionRegion::TypeInfoNV
TypeInfoNV("insertionRegion")
setFieldList.hpp
pFlow::insertionRegion::type_
word type_
Definition: insertionRegion.hpp:44
pFlow::insertionRegion::insertionRegion
insertionRegion(const dictionary &dict)
Definition: insertionRegion.cpp:95
pFlow::timeFlowControl::read
bool read(const dictionary &dict)
Definition: timeFlowControl.hpp:84
timeFlowControl.hpp
pFlow::insertionRegion::operator=
insertionRegion & operator=(const insertionRegion &)
Definition: insertionRegion.cpp:122
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::insertionRegion::setFields_
uniquePtr< setFieldList > setFields_
Definition: insertionRegion.hpp:53
pFlow::insertionRegion::read
bool read(const dictionary &dict)
Definition: insertionRegion.hpp:95
pFlow::timeFlowControl
Definition: timeFlowControl.hpp:32
pFlow::insertionRegion
Definition: insertionRegion.hpp:34
pFlow::insertionRegion::write
bool write(dictionary &dict) const
Definition: insertionRegion.hpp:102
pFlow::insertionRegion::mixture_
uniquePtr< shapeMixture > mixture_
Definition: insertionRegion.hpp:50
pFlow
Definition: demComponent.hpp:28
shapeMixture.hpp
pFlow::insertionRegion::name
const auto & name() const
Definition: insertionRegion.hpp:87
pFlow::insertionRegion::name_
word name_
Definition: insertionRegion.hpp:41
pFlow::timeFlowControl::write
bool write(dictionary &dict) const
Definition: timeFlowControl.hpp:89
pFlow::insertionRegion::writeInsertionRegion
bool writeInsertionRegion(dictionary &dict) const
Definition: insertionRegion.cpp:65
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::insertionRegion::pRegion_
uniquePtr< peakableRegion > pRegion_
Definition: insertionRegion.hpp:47
pFlow::insertionRegion::readInsertionRegion
bool readInsertionRegion(const dictionary &dict)
Definition: insertionRegion.cpp:26
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::insertionRegion::~insertionRegion
~insertionRegion()=default
peakableRegions.hpp