www.cemf.ir
boundaryIntegrationList.cpp
Go to the documentation of this file.
2 #include "integration.hpp"
3 
5  const pointStructure &pStruct,
6  const word &method,
7  integration &intgrtn
8 )
9 :
11  boundaries_(pStruct.boundaries())
12 {
13 
14  for(uint32 i=0; i<6; i++)
15  {
16  this->set(
17  i,
19  boundaries_[i],
20  pStruct,
21  method,
22  intgrtn
23  )
24  );
25  }
26 
27 }
28 
30 {
31  for(auto& bndry:*this)
32  {
33  if(!bndry->correct(dt, y, dy))
34  {
35  fatalErrorInFunction<<"Error in correcting boundary "<<
36  bndry->boundaryName()<<endl;
37  return false;
38  }
39 
40  }
41  return true;
42 }
43 
45  real dt,
47  const realx3PointField_D &vel)
48 {
49  for(auto& bndry:*this)
50  {
51  if(!bndry->correctPStruct(dt, vel))
52  {
53  fatalErrorInFunction<<"Error in correcting boundary "<<
54  bndry->boundaryName()<<" in pointStructure."<<endl;
55  return false;
56  }
57  }
58  return true;
59 }
pFlow::boundaryIntegrationList::boundaries_
const boundaryList & boundaries_
Definition: boundaryIntegrationList.hpp:22
pFlow::ListPtr
Definition: ListPtr.hpp:37
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::integration
Base class for integrating the first order ODE (IVP)
Definition: integration.hpp:51
pFlow::boundaryIntegrationList::correctPStruct
bool correctPStruct(real dt, pointStructure &pStruct, const realx3PointField_D &vel)
Definition: boundaryIntegrationList.cpp:44
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::endl
iOstream & endl(iOstream &os)
Add newline and flush stream.
Definition: iOstream.hpp:341
pFlow::pointField
Definition: pointField.hpp:33
pFlow::pointStructure
Definition: pointStructure.hpp:34
fatalErrorInFunction
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
Definition: error.hpp:77
pFlow::boundaryIntegrationList::boundaryIntegrationList
boundaryIntegrationList(const pointStructure &pStruct, const word &method, integration &intgrtn)
Definition: boundaryIntegrationList.cpp:4
pStruct
auto & pStruct
Definition: setPointStructure.hpp:24
pFlow::boundaryIntegration
Definition: boundaryIntegration.hpp:15
integration.hpp
pFlow::boundaryIntegration::create
static uniquePtr< boundaryIntegration > create(const boundaryBase &boundary, const pointStructure &pStruct, const word &method, integration &intgrtn)
Definition: boundaryIntegration.cpp:16
boundaryIntegrationList.hpp
pFlow::boundaryIntegrationList::correct
bool correct(real dt, realx3PointField_D &y, realx3PointField_D &dy)
Definition: boundaryIntegrationList.cpp:29
pFlow::ListPtr< boundaryIntegration >::set
uniquePtr< boundaryIntegration > set(size_t i, boundaryIntegration *ptr)
Definition: ListPtrI.hpp:155