changes in contactSearch and timeControl and timeInfo
This commit is contained in:
parent
42b024e1ed
commit
f98a696fc8
|
@ -134,7 +134,7 @@ public:
|
|||
ppwContactSearch_ =
|
||||
makeUnique<SearchMethodType>
|
||||
(
|
||||
dict(),
|
||||
csDict,
|
||||
this->extendedDomainBox(),
|
||||
minD,
|
||||
maxD,
|
||||
|
@ -154,10 +154,8 @@ public:
|
|||
ContactSearch,
|
||||
dictionary);
|
||||
|
||||
bool enterBroadSearchBoundary(const timeInfo& ti, bool force=false)const override
|
||||
{
|
||||
return enterBroadSearch(ti, force) || csBoundaries_.boundariesUpdated();
|
||||
}
|
||||
bool enterBroadSearchBoundary(const timeInfo& ti, bool force=false)const override;
|
||||
|
||||
|
||||
real sizeRatio()const override
|
||||
{
|
||||
|
@ -171,7 +169,12 @@ public:
|
|||
|
||||
};
|
||||
|
||||
template <class searchMethod>
|
||||
inline bool ContactSearch<searchMethod>::enterBroadSearchBoundary(const timeInfo &ti, bool force) const
|
||||
{
|
||||
return performSearch(ti.iter(),force) || csBoundaries_.boundariesUpdated();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif //__ContactSearch_hpp__
|
||||
|
|
|
@ -35,8 +35,7 @@ pFlow::contactSearch::contactSearch(
|
|||
particles_(prtcl),
|
||||
geometry_(geom),
|
||||
bTimer_("Boundary particles contact search", &timers),
|
||||
ppTimer_("Internal particles contact search", &timers),
|
||||
dict_(dict)
|
||||
ppTimer_("Internal particles contact search", &timers)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -70,6 +69,7 @@ bool pFlow::contactSearch::broadSearch
|
|||
}
|
||||
ppTimer_.end();
|
||||
performedSearch_ = true;
|
||||
lastUpdated_ = ti.currentIter();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -67,8 +67,6 @@ private:
|
|||
|
||||
Timer ppTimer_;
|
||||
|
||||
dictionary dict_;
|
||||
|
||||
virtual
|
||||
bool BroadSearch(
|
||||
const timeInfo& ti,
|
||||
|
@ -150,12 +148,6 @@ public:
|
|||
return updateInterval_;
|
||||
}
|
||||
|
||||
inline
|
||||
const dictionary& dict()const
|
||||
{
|
||||
return dict_;
|
||||
}
|
||||
|
||||
inline
|
||||
const box& extendedDomainBox()const
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ public:
|
|||
|
||||
}
|
||||
|
||||
int32 currentIter()const
|
||||
uint32 currentIter()const
|
||||
{
|
||||
return ti_.currentIter();
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
}
|
||||
|
||||
static
|
||||
int32 timePrecision()
|
||||
uint32 timePrecision()
|
||||
{
|
||||
return timeInfo::precision();
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ private:
|
|||
friend class timeControl;
|
||||
|
||||
// - current iteration number (for this execution)
|
||||
int32 currentIter_;
|
||||
uint32 currentIter_;
|
||||
|
||||
// - current time of simulation
|
||||
timeValue currentTime_;
|
||||
|
@ -41,11 +41,11 @@ private:
|
|||
// - integration time step
|
||||
timeValue dt_;
|
||||
|
||||
inline static int32 presicion_ = 5;
|
||||
inline static uint32 presicion_ = 5;
|
||||
|
||||
public:
|
||||
|
||||
timeInfo(int32 cIter, timeValue cTime, timeValue dt)
|
||||
timeInfo(uint32 cIter, timeValue cTime, timeValue dt)
|
||||
: currentIter_(cIter),
|
||||
currentTime_(cTime),
|
||||
dt_(dt)
|
||||
|
@ -58,7 +58,7 @@ public:
|
|||
currentTime_(dict.getVal<timeValue>("startTime")),
|
||||
dt_( dict.getVal<timeValue>("dt"))
|
||||
{
|
||||
presicion_ = dict.getValOrSet<int32>("timePrecision",5);
|
||||
presicion_ = dict.getValOrSet<uint32>("timePrecision",5);
|
||||
}
|
||||
|
||||
timeInfo(timeValue currentTime, const dictionary& dict)
|
||||
|
@ -83,12 +83,12 @@ public:
|
|||
{
|
||||
return dt_;
|
||||
}
|
||||
inline const int32& iter() const
|
||||
inline const uint32& iter() const
|
||||
{
|
||||
return currentIter_;
|
||||
}
|
||||
|
||||
inline const int32& currentIter() const
|
||||
inline const uint32& currentIter() const
|
||||
{
|
||||
return currentIter_;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public:
|
|||
}
|
||||
|
||||
static
|
||||
int32 precision()
|
||||
uint32 precision()
|
||||
{
|
||||
return presicion_;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue