www.cemf.ir
stationaryWall.cpp
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 #include "stationaryWall.hpp"
22 
23 
25 (
26  const objectFile &objf,
27  repository *owner
28 )
29 :
30  fileDictionary(objf, owner)
31 {
32 
33  if(!impl_readDictionary(*this) )
34  {
36  fatalExit;
37  }
38 }
39 
41 (
42  const objectFile &objf,
43  const dictionary &dict,
44  repository *owner
45 )
46 :
47  fileDictionary(objf, dict, owner)
48 {
49  if(!impl_readDictionary(*this) )
50  {
52  fatalExit;
53  }
54 }
55 
57 (
58  iOstream &os,
59  const IOPattern &iop
60 ) const
61 {
62  // a global dictionary
63  dictionary newDict(fileDictionary::dictionary::name(), true);
64  if( iop.thisProcWriteData() )
65  {
66  if( !this->impl_writeDictionary(newDict) ||
67  !newDict.write(os))
68  {
70  " error in writing to dictionary "<< newDict.globalName()<<endl;
71  return false;
72  }
73  }
74  return true;
75 }
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
pFlow::stationaryWall::stationaryWall
stationaryWall(const objectFile &objf, repository *owner)
Definition: stationaryWall.cpp:25
pFlow::dictionary::globalName
virtual word globalName() const
global name of entry, separated with dots
Definition: dictionary.cpp:356
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
fatalErrorInFunction
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
Definition: error.hpp:77
pFlow::IOPattern
Definition: IOPattern.hpp:32
pFlow::dictionary::write
bool write(iOstream &os) const override
write to stream
Definition: dictionary.cpp:793
pFlow::IOPattern::thisProcWriteData
bool thisProcWriteData() const
Definition: IOPattern.hpp:146
pFlow::objectFile
Definition: objectFile.hpp:30
pFlow::stationaryWall::write
bool write(iOstream &os, const IOPattern &iop) const override
Definition: stationaryWall.cpp:57
stationaryWall.hpp
pFlow::fileDictionary
Definition: fileDictionary.hpp:29
pFlow::repository
Definition: repository.hpp:34
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
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