modifications for MPI+CUDA run
This commit is contained in:
parent
4e8b921514
commit
d5ff1d7906
|
@ -7,8 +7,8 @@ contactSearch/methods/cellBased/NBS/NBS.cpp
|
|||
contactSearch/methods/cellBased/NBS/cellsWallLevel0.cpp
|
||||
|
||||
contactSearch/boundaries/boundaryContactSearch/boundaryContactSearch.cpp
|
||||
#contactSearch/boundaries/twoPartContactSearch/twoPartContactSearchKernels.cpp
|
||||
#contactSearch/boundaries/twoPartContactSearch/twoPartContactSearch.cpp
|
||||
contactSearch/boundaries/twoPartContactSearch/twoPartContactSearchKernels.cpp
|
||||
contactSearch/boundaries/twoPartContactSearch/twoPartContactSearch.cpp
|
||||
contactSearch/boundaries/periodicBoundaryContactSearch/ppwBndryContactSearchKernels.cpp
|
||||
contactSearch/boundaries/periodicBoundaryContactSearch/ppwBndryContactSearch.cpp
|
||||
contactSearch/boundaries/periodicBoundaryContactSearch/wallBoundaryContactSearch.cpp
|
||||
|
|
|
@ -21,3 +21,80 @@ Licence:
|
|||
|
||||
#include "wordVectorHost.hpp"
|
||||
|
||||
bool pFlow::VectorSingle<pFlow::word,pFlow::HostSpace>::insertSetElement(
|
||||
const uint32IndexContainer& indices,
|
||||
const word& val
|
||||
)
|
||||
{
|
||||
if(indices.empty()) return true;
|
||||
|
||||
auto maxInd = indices.max();
|
||||
|
||||
if(this->empty() || maxInd > size()-1 )
|
||||
{
|
||||
resize(maxInd+1);
|
||||
}
|
||||
|
||||
auto ind = indices.hostView();
|
||||
auto s = indices.size();
|
||||
|
||||
for(uint32 i=0; i< s; i++)
|
||||
{
|
||||
container_[ind[i]] = val;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::VectorSingle<pFlow::word,pFlow::HostSpace>::insertSetElement(
|
||||
const uint32IndexContainer& indices,
|
||||
const std::vector<word>& vals
|
||||
)
|
||||
{
|
||||
if(indices.empty())return true;
|
||||
if(indices.size() != vals.size())return false;
|
||||
|
||||
auto maxInd = indices.max();
|
||||
|
||||
if(this->empty() || maxInd > size()-1 )
|
||||
{
|
||||
resize(maxInd+1);
|
||||
}
|
||||
|
||||
auto ind = indices.hostView();
|
||||
auto s = indices.size();
|
||||
|
||||
for(uint32 i=0; i< s; i++)
|
||||
{
|
||||
container_[ind[i]] = vals[i];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::VectorSingle<pFlow::word,pFlow::HostSpace>::insertSetElement(
|
||||
const uint32IndexContainer& indices,
|
||||
const ViewType1D<word, memory_space> vals
|
||||
)
|
||||
{
|
||||
if(indices.empty())return true;
|
||||
if(indices.size() != vals.size())return false;
|
||||
|
||||
auto maxInd = indices.max();
|
||||
|
||||
if(this->empty() || maxInd > size()-1 )
|
||||
{
|
||||
resize(maxInd+1);
|
||||
}
|
||||
|
||||
auto ind = indices.hostView();
|
||||
auto s = indices.size();
|
||||
|
||||
for(uint32 i=0; i< s; i++)
|
||||
{
|
||||
container_[ind[i]] = vals[i];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -372,28 +372,20 @@ public:
|
|||
return span<word>(const_cast<word*>(container_.data()), container_.size());
|
||||
}
|
||||
|
||||
INLINE_FUNCTION_H
|
||||
bool insertSetElement(const uint32IndexContainer& indices, const word& val)
|
||||
{
|
||||
notImplementedFunction;
|
||||
return false;
|
||||
}
|
||||
|
||||
INLINE_FUNCTION_H
|
||||
bool insertSetElement(const uint32IndexContainer& indices, const std::vector<word>& vals)
|
||||
{
|
||||
notImplementedFunction;
|
||||
return false;
|
||||
}
|
||||
bool insertSetElement(const uint32IndexContainer& indices, const word& val);
|
||||
|
||||
|
||||
|
||||
bool insertSetElement(const uint32IndexContainer& indices, const std::vector<word>& vals);
|
||||
|
||||
|
||||
|
||||
INLINE_FUNCTION_H
|
||||
bool insertSetElement(
|
||||
const uint32IndexContainer& indices,
|
||||
const ViewType1D<word, memory_space> vals)
|
||||
{
|
||||
notImplementedFunction;
|
||||
return false;
|
||||
}
|
||||
const ViewType1D<word, memory_space> vals
|
||||
);
|
||||
|
||||
|
||||
INLINE_FUNCTION_H
|
||||
bool reorderItems(const uint32IndexContainer& indices)
|
||||
|
|
|
@ -92,8 +92,11 @@ pFlow::boundaryList::boundaryList(pointStructure& pStruct)
|
|||
: ListPtr<boundaryBase>(pStruct.simDomain().sizeOfBoundaries()),
|
||||
pStruct_(pStruct),
|
||||
neighborListUpdateInterval_(
|
||||
max(
|
||||
pStruct.simDomain().subDict("boundaries").getVal<uint32>(
|
||||
"neighborListUpdateInterval"
|
||||
),
|
||||
1u
|
||||
)
|
||||
)
|
||||
{
|
||||
|
|
|
@ -32,9 +32,12 @@ bool pFlow::regularSimulationDomain::createBoundaryDicts()
|
|||
auto& rbBoundaries = this->subDict("regularBoundaries");
|
||||
|
||||
auto neighborLength = boundaries.getVal<real>("neighborLength");
|
||||
auto boundaryExtntionLengthRatio =
|
||||
boundaries.getValOrSet<real>("boundaryExtntionLengthRatio", 0.1);
|
||||
auto updateIntercal = boundaries.getValOrSet<uint32>("updateInterval", 1u);
|
||||
auto boundaryExtntionLengthRatio = max(
|
||||
boundaries.getValOrSet<real>("boundaryExtntionLengthRatio", 0.1),
|
||||
0.0);
|
||||
auto updateIntercal = max(
|
||||
boundaries.getValOrSet<uint32>("updateInterval", 1u),
|
||||
1u);
|
||||
|
||||
for(uint32 i=0; i<sizeOfBoundaries(); i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue