PeakableRegion.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 
22 #ifndef __PeakableRegion_hpp__
23 #define __PeakableRegion_hpp__
24 
25 
26 #include "peakableRegion.hpp"
27 #include "dictionary.hpp"
28 
29 namespace pFlow
30 {
31 
32 
33 
34 
35 template<typename RegionType>
37 :
38  public peakableRegion
39 {
40 protected:
41 
42  RegionType region_;
43 
44 public:
45 
46  // type info
47  TypeInfoTemplate("peakableRegion", RegionType);
48 
50  PeakableRegion(const word& type, const dictionary& dict);
51 
52  add_vCtor(
55  word
56  );
57 
58  virtual uniquePtr<peakableRegion> clone()const override
59  {
60  return makeUnique<PeakableRegion<RegionType>>(*this);
61  }
62 
63  virtual peakableRegion* clonePtr()const override
64  {
65  return new PeakableRegion<RegionType>(*this);
66  }
67 
68 
69  virtual ~PeakableRegion() = default;
70 
72 
73  virtual bool isInside(const realx3& point)const override;
74 
75  virtual realx3 peek()const override;
76 
77 
79 
80  virtual bool read(const dictionary& dict) override;
81 
82  virtual bool write(dictionary& dict)const override;
83 
84 };
85 
86 } // pFlow
87 
88 #include "PeakableRegion.cpp"
89 
90 #endif
pFlow::PeakableRegion::~PeakableRegion
virtual ~PeakableRegion()=default
pFlow::PeakableRegion::read
virtual bool read(const dictionary &dict) override
Definition: PeakableRegion.cpp:52
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::PeakableRegion::TypeInfoTemplate
TypeInfoTemplate("peakableRegion", RegionType)
pFlow::PeakableRegion::PeakableRegion
PeakableRegion(const word &type, const dictionary &dict)
Definition: PeakableRegion.cpp:24
pFlow::PeakableRegion::add_vCtor
add_vCtor(peakableRegion, PeakableRegion, word)
pFlow
Definition: demComponent.hpp:28
pFlow::PeakableRegion::region_
RegionType region_
Definition: PeakableRegion.hpp:42
dictionary.hpp
PeakableRegion.cpp
pFlow::PeakableRegion::clone
virtual uniquePtr< peakableRegion > clone() const override
Definition: PeakableRegion.hpp:58
pFlow::PeakableRegion::clonePtr
virtual peakableRegion * clonePtr() const override
Definition: PeakableRegion.hpp:63
peakableRegion.hpp
pFlow::PeakableRegion::isInside
virtual bool isInside(const realx3 &point) const override
Definition: PeakableRegion.cpp:37
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::triple< real >
pFlow::PeakableRegion::write
virtual bool write(dictionary &dict) const override
Definition: PeakableRegion.cpp:58
pFlow::PeakableRegion::peek
virtual realx3 peek() const override
Definition: PeakableRegion.cpp:46
pFlow::PeakableRegion
Definition: PeakableRegion.hpp:36
pFlow::peakableRegion
Definition: peakableRegion.hpp:35
pFlow::dictionary
Definition: dictionary.hpp:38