Insertion.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 __Insertion_hpp__
23 #define __Insertion_hpp__
24 
25 
26 #include "insertion.hpp"
27 #include "ListPtr.hpp"
28 #include "InsertionRegion.hpp"
29 #include "particles.hpp"
30 
31 namespace pFlow
32 {
33 
34 template<typename ShapeType>
35 class Insertion
36 :
37  public insertion
38 {
39 protected:
40 
41  const ShapeType& shapes_;
42 
43  // - insertion regions
45 
46 
47  bool readInsertionDict(const dictionary& dict);
48 
49  bool writeInsertionDict(dictionary& dict)const;
50 
51 public:
52 
53  TypeInfoTemplateNV("Insertion",ShapeType);
54 
55  Insertion(particles& prtcl, const ShapeType& shapes);
56 
57  Insertion(fileSystem file, particles& prtcl, const ShapeType& shapes);
58 
59 
60  bool insertParticles(real currentTime, real dt);
61 
62  virtual bool read(iIstream& is) override;
63 
64  virtual bool write(iOstream& os)const override;
65 
66 };
67 
68 }
69 
70 #include "Insertion.cpp"
71 
72 #endif
pFlow::Insertion::TypeInfoTemplateNV
TypeInfoTemplateNV("Insertion", ShapeType)
pFlow::ListPtr
Definition: ListPtr.hpp:38
ListPtr.hpp
pFlow::real
float real
Definition: builtinTypes.hpp:46
pFlow::Insertion::insertParticles
bool insertParticles(real currentTime, real dt)
Definition: Insertion.cpp:103
pFlow::Insertion::read
virtual bool read(iIstream &is) override
Definition: Insertion.cpp:171
Insertion.cpp
insertion.hpp
pFlow::Insertion::Insertion
Insertion(particles &prtcl, const ShapeType &shapes)
Definition: Insertion.cpp:71
particles.hpp
pFlow
Definition: demComponent.hpp:28
pFlow::Insertion::regions_
ListPtr< InsertionRegion< ShapeType > > regions_
Definition: Insertion.hpp:44
pFlow::fileSystem
Definition: fileSystem.hpp:63
pFlow::Insertion::shapes_
const ShapeType & shapes_
Definition: Insertion.hpp:41
pFlow::Insertion::write
virtual bool write(iOstream &os) const override
Definition: Insertion.cpp:198
pFlow::iIstream
Definition: iIstream.hpp:33
pFlow::particles
Definition: particles.hpp:33
InsertionRegion.hpp
pFlow::Insertion::writeInsertionDict
bool writeInsertionDict(dictionary &dict) const
Definition: Insertion.cpp:49
pFlow::Insertion::readInsertionDict
bool readInsertionDict(const dictionary &dict)
Definition: Insertion.cpp:23
pFlow::Insertion
Definition: Insertion.hpp:35
pFlow::iOstream
Definition: iOstream.hpp:53
pFlow::dictionary
Definition: dictionary.hpp:38
pFlow::insertion
Definition: insertion.hpp:33