www.cemf.ir
includeMask.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 __includeMask_hpp__
22 #define __includeMask_hpp__
23 
24 #include "virtualConstructor.hpp"
25 #include "readFromTimeFolder.hpp"
26 #include "dictionary.hpp"
27 
28 
29 namespace pFlow
30 {
31 
32 
34 {
35 protected:
37 
39 
41 
43 
44  static
45  bool getFieldType(const dictionary& dict, readFromTimeFolder& timeFolder, word& fName, word& fType);
46 
47 public:
48 
49  TypeInfo("includeMask");
50 
51  includeMask(const dictionary& dict, const word& opType, readFromTimeFolder& timeFolder);
52 
53  virtual ~includeMask() = default;
54 
57  dictionary,
58  (
59  const dictionary& dict,
60  const word& opType,
62  ),
63  (dict, opType, timeFolder)
64  );
65 
66  word fieldName()const
67  {
68  return fieldName_;
69  }
70 
71  word fieldType()const
72  {
73  return fieldType_;
74  }
75 
77  {
78  return operatorType_;
79  }
80 
81  auto& timeFolder()
82  {
83  return timeFolder_;
84  }
85 
86  virtual bool isIncluded(int32 n) const = 0;
87 
88  virtual uint32 size()const = 0;
89 
90  bool operator()(int32 n) const
91  {
92  return isIncluded(n);
93  }
94 
95  static
97  const dictionary& dict,
98  const word& opType,
100 
101 };
102 
103 
104 
105 } // pFlow
106 
107 #endif //__IncludeMask_hpp__
108 
109 
pFlow::includeMask::create_vCtor
create_vCtor(includeMask, dictionary,(const dictionary &dict, const word &opType, readFromTimeFolder &timeFolder),(dict, opType, timeFolder))
pFlow::includeMask::create
static uniquePtr< includeMask > create(const dictionary &dict, const word &opType, readFromTimeFolder &timeFolder)
Definition: includeMask.cpp:68
pFlow::includeMask::fieldName_
word fieldName_
Definition: includeMask.hpp:36
pFlow::readFromTimeFolder
Definition: readFromTimeFolder.hpp:31
pFlow::includeMask::fieldType
word fieldType() const
Definition: includeMask.hpp:71
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::includeMask::getFieldType
static bool getFieldType(const dictionary &dict, readFromTimeFolder &timeFolder, word &fName, word &fType)
Definition: includeMask.cpp:41
pFlow::includeMask::isIncluded
virtual bool isIncluded(int32 n) const =0
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
readFromTimeFolder.hpp
pFlow::includeMask
Definition: includeMask.hpp:33
pFlow::includeMask::timeFolder_
readFromTimeFolder & timeFolder_
Definition: includeMask.hpp:42
pFlow
Definition: demGeometry.hpp:27
pFlow::includeMask::TypeInfo
TypeInfo("includeMask")
pFlow::int32
int int32
Definition: builtinTypes.hpp:50
dictionary.hpp
pFlow::includeMask::timeFolder
auto & timeFolder()
Definition: includeMask.hpp:81
pFlow::includeMask::operatorType_
word operatorType_
Definition: includeMask.hpp:40
virtualConstructor.hpp
pFlow::includeMask::~includeMask
virtual ~includeMask()=default
pFlow::includeMask::operator()
bool operator()(int32 n) const
Definition: includeMask.hpp:90
n
uint32 n
Definition: NBSLoop.hpp:24
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::includeMask::size
virtual uint32 size() const =0
pFlow::includeMask::fieldName
word fieldName() const
Definition: includeMask.hpp:66
pFlow::includeMask::operatorType
word operatorType() const
Definition: includeMask.hpp:76
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67
pFlow::includeMask::fieldType_
word fieldType_
Definition: includeMask.hpp:38
pFlow::timeFolder
Definition: timeFolder.hpp:32
pFlow::includeMask::includeMask
includeMask(const dictionary &dict, const word &opType, readFromTimeFolder &timeFolder)
Definition: includeMask.cpp:24