www.cemf.ir
integration.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 "integration.hpp"
22 #include "pointStructure.hpp"
23 #include "repository.hpp"
24 
26 (
27  const word& baseName,
29  const word&,
30  const realx3Field_D&
31 )
32 :
33  owner_(*pStruct.owner()),
34  pStruct_(pStruct),
35  baseName_(baseName)
36 {}
37 
38 
41 (
42  const word& baseName,
44  const word& method,
45  const realx3Field_D& initialValField
46 )
47 {
48  if( wordvCtorSelector_.search(method) )
49  {
50  return wordvCtorSelector_[method] (baseName, pStruct, method, initialValField);
51  }
52  else
53  {
54  printKeys
55  (
56  fatalError << "Ctor Selector "<< method << " dose not exist. \n"
57  <<"Avaiable ones are: \n\n"
58  ,
59  wordvCtorSelector_
60  );
61  fatalExit;
62  }
63  return nullptr;
64 }
fatalExit
#define fatalExit
Fatal exit.
Definition: error.hpp:98
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::printKeys
iOstream & printKeys(iOstream &os, const wordHashMap< T > &m)
pFlow::Field< realx3 >
pFlow::baseName
word baseName(const word &w, char sep='.')
Find the base in a group separated by "." and return it.
Definition: bTypesFunctions.cpp:185
repository.hpp
pFlow::pointStructure
Definition: pointStructure.hpp:34
pFlow::integration::integration
integration(const word &baseName, pointStructure &pStruct, const word &method, const realx3Field_D &initialValField)
Construct from components.
Definition: integration.cpp:26
fatalError
#define fatalError
Report a fatal error and exit the applicaiton.
Definition: error.hpp:70
pStruct
auto & pStruct
Definition: setPointStructure.hpp:24
pFlow::uniquePtr< pFlow::integration >
integration.hpp
pFlow::integration::create
static uniquePtr< integration > create(const word &baseName, pointStructure &pStruct, const word &method, const realx3Field_D &initialValField)
Create the polymorphic object based on inputs.
Definition: integration.cpp:41
pointStructure.hpp