Merge pull request #106 from PhasicFlow/develop
modification to the base code for MPI-developement up to processor bo…
This commit is contained in:
commit
9a69f510a5
|
@ -7,6 +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/periodicBoundaryContactSearch/ppwBndryContactSearchKernels.cpp
|
||||
contactSearch/boundaries/periodicBoundaryContactSearch/ppwBndryContactSearch.cpp
|
||||
contactSearch/boundaries/periodicBoundaryContactSearch/wallBoundaryContactSearch.cpp
|
||||
|
@ -22,6 +24,13 @@ sphereInteraction/sphereInteractionsNonLinearModels.cpp
|
|||
sphereInteraction/sphereInteractionsNonLinearModModels.cpp
|
||||
)
|
||||
|
||||
if(pFlow_Build_MPI)
|
||||
list(APPEND SourceFiles
|
||||
contactSearch/boundaries/processorBoundaryContactSearch/processorBoundaryContactSearch.cpp
|
||||
sphereInteraction/boundaries/processorBoundarySphereInteraction/processorBoundarySphereInteractions.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(link_libs Kokkos::kokkos phasicFlow Property Particles Geometry)
|
||||
|
||||
pFlow_add_library_install(Interaction SourceFiles link_libs)
|
||||
|
|
|
@ -130,9 +130,10 @@ public:
|
|||
csPairContainerType& pwPairs,
|
||||
bool force = false) override
|
||||
{
|
||||
|
||||
ppTimer().start();
|
||||
|
||||
Particles().boundingSphere().updateBoundaries(DataDirection::SlaveToMaster);
|
||||
|
||||
const auto& position = Particles().pointPosition().deviceViewAll();
|
||||
const auto& flags = Particles().dynPointStruct().activePointsMaskDevice();
|
||||
const auto& diam = Particles().boundingSphere().deviceViewAll();
|
||||
|
|
|
@ -36,15 +36,16 @@ public:
|
|||
using NextType = deviceViewType1D<uint32>;
|
||||
|
||||
private:
|
||||
cells searchCells_;
|
||||
|
||||
HeadType head_{"periodic::head", 1, 1, 1};
|
||||
cells searchCells_;
|
||||
|
||||
NextType next_{"periodic::next", 1};
|
||||
HeadType head_{ "periodic::head", 1, 1, 1 };
|
||||
|
||||
real sizeRatio_ = 1.0;
|
||||
NextType next_{ "periodic::next", 1 };
|
||||
|
||||
uint32 nextCapacity_ = 0;
|
||||
real sizeRatio_ = 1.0;
|
||||
|
||||
uint32 nextCapacity_ = 0;
|
||||
|
||||
void checkAllocateNext(uint32 n);
|
||||
|
||||
|
|
|
@ -143,7 +143,9 @@ public:
|
|||
) override
|
||||
{
|
||||
|
||||
notImplementedFunction;
|
||||
pOutput<<"Function (hearChanges in boundarySphereInteractions)is not implmented Message "<<
|
||||
msg <<endl<<" name "<< this->name() <<" type "<< this->type()<<endl;;
|
||||
//notImplementedFunction;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ namespace pFlow::periodicBoundarySIKernels
|
|||
{
|
||||
|
||||
template<typename ContactListType, typename ContactForceModel>
|
||||
inline
|
||||
void sphereSphereInteraction
|
||||
(
|
||||
real dt,
|
||||
|
@ -46,14 +47,6 @@ void sphereSphereInteraction
|
|||
|
||||
if( ovrlp >0.0 )
|
||||
{
|
||||
|
||||
/*auto Vi = thisVel[i];
|
||||
auto Vj = mirrorVel[j];
|
||||
auto wi = thisRVel[i];
|
||||
auto wj = mirrorRVel[j];
|
||||
auto Nij = (xj-xi)/dist;
|
||||
auto Vr = Vi - Vj + cross((Ri*wi+Rj*wj), Nij);*/
|
||||
|
||||
auto Nij = (xj-xi)/dist;
|
||||
auto wi = rVel[ind_i];
|
||||
auto wj = rVel[ind_j];
|
||||
|
|
|
@ -163,9 +163,16 @@ bool pFlow::sphereInteraction<cFM,gMM, cLT>::iterate()
|
|||
auto t = this->currentTime();
|
||||
auto dt = this->dt();
|
||||
|
||||
//output<<"iter, t, dt "<< iter<<" "<< t << " "<<dt<<endl;
|
||||
|
||||
bool broadSearch = contactSearch_().enterBroadSearch(iter, t, dt);
|
||||
|
||||
/*sphParticles_.diameter().updateBoundaries(DataDirection::SlaveToMaster);
|
||||
sphParticles_.velocity().updateBoundaries(DataDirection::SlaveToMaster);
|
||||
sphParticles_.rVelocity().updateBoundaries(DataDirection::SlaveToMaster);
|
||||
sphParticles_.mass().updateBoundaries(DataDirection::SlaveToMaster);
|
||||
sphParticles_.I().updateBoundaries(DataDirection::SlaveToMaster);
|
||||
sphParticles_.propertyId().updateBoundaries(DataDirection::SlaveToMaster);*/
|
||||
|
||||
|
||||
if(broadSearch)
|
||||
{
|
||||
|
|
|
@ -16,6 +16,11 @@ Insertion/shapeMixture/shapeMixture.cpp
|
|||
Insertion/Insertion/Insertions.cpp
|
||||
)
|
||||
|
||||
if(pFlow_Build_MPI)
|
||||
list(APPEND SourceFiles
|
||||
particles/MPIParticleIdHandler/MPIParticleIdHandler.cpp)
|
||||
endif()
|
||||
|
||||
set(link_libs Kokkos::kokkos phasicFlow Integration Property)
|
||||
|
||||
pFlow_add_library_install(Particles SourceFiles link_libs)
|
||||
|
|
|
@ -513,6 +513,14 @@ bool pFlow::sphereParticles::beforeIteration()
|
|||
dynPointStruct().predict(dt, accelertion());
|
||||
rVelIntegration_().predict(dt,rVelocity_, rAcceleration_);
|
||||
intPredictTimer_.end();
|
||||
|
||||
propertyId_.updateBoundariesSlaveToMasterIfRequested();
|
||||
diameter_.updateBoundariesSlaveToMasterIfRequested();
|
||||
mass_.updateBoundariesSlaveToMasterIfRequested();
|
||||
I_.updateBoundariesSlaveToMasterIfRequested();
|
||||
rVelocity_.updateBoundariesSlaveToMasterIfRequested();
|
||||
rAcceleration_.updateBoundariesSlaveToMasterIfRequested();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,12 @@ class particleIdHandler
|
|||
:
|
||||
public uint32PointField_D
|
||||
{
|
||||
|
||||
|
||||
private:
|
||||
|
||||
virtual
|
||||
bool initialIdCheck()=0;
|
||||
|
||||
public:
|
||||
|
||||
/// class info
|
||||
|
@ -53,7 +58,9 @@ public:
|
|||
Pair<uint32, uint32> getIdRange(uint32 nNewParticles)=0;
|
||||
|
||||
virtual
|
||||
bool initialIdCheck()=0;
|
||||
uint32 maxId()const = 0;
|
||||
|
||||
|
||||
|
||||
// heat change for possible insertion of particles
|
||||
// overrdie from internalField
|
||||
|
|
|
@ -78,7 +78,7 @@ pFlow::particles::particles(systemControl& control)
|
|||
{
|
||||
this->addToSubscriber(dynPointStruct_);
|
||||
|
||||
idHandler_().initialIdCheck();
|
||||
//idHandler_().initialIdCheck();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -87,7 +87,16 @@ pFlow::particles::beforeIteration()
|
|||
zeroForce();
|
||||
zeroTorque();
|
||||
|
||||
return dynPointStruct_.beforeIteration();
|
||||
if( !dynPointStruct_.beforeIteration())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
shapeIndex_.updateBoundariesSlaveToMasterIfRequested();
|
||||
accelertion_.updateBoundariesSlaveToMasterIfRequested();
|
||||
idHandler_().updateBoundariesSlaveToMasterIfRequested();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -181,6 +181,12 @@ public:
|
|||
return contactTorque_;
|
||||
}
|
||||
|
||||
inline
|
||||
uint maxId()const
|
||||
{
|
||||
return idHandler_().maxId();
|
||||
}
|
||||
|
||||
bool beforeIteration() override;
|
||||
|
||||
bool iterate() override;
|
||||
|
|
|
@ -9,6 +9,7 @@ pFlow::regularParticleIdHandler::regularParticleIdHandler
|
|||
:
|
||||
particleIdHandler(pStruct)
|
||||
{
|
||||
initialIdCheck();
|
||||
}
|
||||
|
||||
pFlow::Pair<pFlow::uint32, pFlow::uint32>
|
||||
|
|
|
@ -33,6 +33,7 @@ private:
|
|||
|
||||
uint32 maxId_ = -1;
|
||||
|
||||
bool initialIdCheck()override;
|
||||
public:
|
||||
|
||||
ClassInfo("particleIdHandler<regular>");
|
||||
|
@ -50,7 +51,10 @@ public:
|
|||
|
||||
Pair<uint32, uint32> getIdRange(uint32 nNewParticles)override;
|
||||
|
||||
bool initialIdCheck()override;
|
||||
uint32 maxId()const override
|
||||
{
|
||||
return maxId_;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ streams/TStream/oTstream.cpp
|
|||
streams/Fstream/iFstream.cpp
|
||||
streams/Fstream/oFstream.cpp
|
||||
streams/Fstream/fileStream.cpp
|
||||
streams/dataIO/dataIORegulars.cpp
|
||||
streams/streams.cpp
|
||||
|
||||
fileSystem/fileSystem.cpp
|
||||
|
@ -132,14 +133,14 @@ if(pFlow_Build_MPI)
|
|||
message(STATUS "Zoltan lib path: ${ZOLTAN_LIBRARY}")
|
||||
|
||||
list(APPEND SourceFiles
|
||||
MPIParallelization/partitioning.cpp
|
||||
MPIParallelization/rcb1DPartitioning.cpp
|
||||
MPIParallelization/domain/partitioning/partitioning.cpp
|
||||
MPIParallelization/domain/partitioning/rcb1DPartitioning.cpp
|
||||
MPIParallelization/domain/MPISimulationDomain.cpp
|
||||
#MPIParallelization/dataIOMPI.cpp
|
||||
MPIParallelization/procCommunication.cpp
|
||||
MPIParallelization/boundaryProcessor.cpp
|
||||
MPIParallelization/scatteredMasterDistributeChar.cpp
|
||||
MPIParallelization/processorBoundaryFields.cpp
|
||||
MPIParallelization/dataIOMPI/dataIOMPIs.cpp
|
||||
MPIParallelization/MPI/procCommunication.cpp
|
||||
MPIParallelization/MPI/scatteredMasterDistributeChar.cpp
|
||||
MPIParallelization/pointStructure/boundaries/boundaryProcessor.cpp
|
||||
MPIParallelization/pointField/processorBoundaryFields.cpp
|
||||
)
|
||||
|
||||
list(APPEND link_libs MPI::MPI_CXX ${ZOLTAN_LIBRARY} -lm )
|
||||
|
|
|
@ -36,6 +36,25 @@ pFlow::boundaryField<T, MemorySpace>::boundaryField
|
|||
internal_(internal)
|
||||
{}
|
||||
|
||||
template<class T, class MemorySpace>
|
||||
typename pFlow::boundaryField<T, MemorySpace>::ProcVectorType&
|
||||
pFlow::boundaryField<T, MemorySpace>::neighborProcField()
|
||||
{
|
||||
static ProcVectorType dummyVector{"dummyVector"};
|
||||
notImplementedFunction;
|
||||
fatalExit;
|
||||
return dummyVector;
|
||||
}
|
||||
|
||||
template<class T, class MemorySpace>
|
||||
const typename pFlow::boundaryField<T, MemorySpace>::ProcVectorType&
|
||||
pFlow::boundaryField<T, MemorySpace>::neighborProcField() const
|
||||
{
|
||||
static ProcVectorType dummyVector{"dummyVector"};
|
||||
notImplementedFunction;
|
||||
fatalExit;
|
||||
return dummyVector;
|
||||
}
|
||||
|
||||
template<class T, class MemorySpace>
|
||||
pFlow::uniquePtr<pFlow::boundaryField<T, MemorySpace>>
|
||||
|
|
|
@ -26,6 +26,18 @@ Licence:
|
|||
namespace pFlow
|
||||
{
|
||||
|
||||
|
||||
// forward
|
||||
template< class T, class MemorySpace>
|
||||
class boundaryFieldList;
|
||||
|
||||
enum class DataDirection
|
||||
{
|
||||
MasterToSlave,
|
||||
SlaveToMaster,
|
||||
TwoWay
|
||||
};
|
||||
|
||||
template< class T, class MemorySpace = void>
|
||||
class boundaryField
|
||||
:
|
||||
|
@ -43,12 +55,22 @@ public:
|
|||
|
||||
using FieldAccessType = scatteredFieldAccess<T, memory_space>;
|
||||
|
||||
protected:
|
||||
using ProcVectorType = VectorSingle<T,MemorySpace>;
|
||||
|
||||
private:
|
||||
|
||||
/// friend et al.
|
||||
friend class boundaryFieldList<T,MemorySpace>;
|
||||
|
||||
/// @brief a ref to the internal field
|
||||
InternalFieldType& internal_;
|
||||
|
||||
|
||||
virtual
|
||||
bool updateBoundary(int step, DataDirection direction)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
TypeInfoTemplate211("boundaryField","none" ,T, memory_space::name());
|
||||
|
@ -78,7 +100,6 @@ public:
|
|||
boundaryBase
|
||||
);
|
||||
|
||||
|
||||
bool hearChanges
|
||||
(
|
||||
real t,
|
||||
|
@ -116,6 +137,12 @@ public:
|
|||
this->mirrorBoundary().indexList().deviceViewAll(),
|
||||
internal_.deviceViewAll());
|
||||
}
|
||||
|
||||
virtual
|
||||
ProcVectorType& neighborProcField();
|
||||
|
||||
virtual
|
||||
const ProcVectorType& neighborProcField()const;
|
||||
|
||||
void fill(const std::any& val)override
|
||||
{
|
||||
|
|
|
@ -43,6 +43,8 @@ protected:
|
|||
|
||||
const boundaryList& boundaries_;
|
||||
|
||||
uint32 slaveToMasterUpdateIter_ = -1;
|
||||
|
||||
public:
|
||||
|
||||
boundaryFieldList(const boundaryList& boundaries, InternalFieldType& internal)
|
||||
|
@ -60,6 +62,29 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void updateBoundaries(uint32 iter, DataDirection direction)
|
||||
{
|
||||
if( direction == DataDirection::SlaveToMaster
|
||||
&& slaveToMasterUpdateIter_ == iter) return;
|
||||
|
||||
// first step
|
||||
for(auto b:*this)
|
||||
{
|
||||
b->updateBoundary(1, direction);
|
||||
}
|
||||
|
||||
// second step
|
||||
for(auto b:*this)
|
||||
{
|
||||
b->updateBoundary(2, direction);
|
||||
}
|
||||
|
||||
if(direction == DataDirection::SlaveToMaster)
|
||||
{
|
||||
slaveToMasterUpdateIter_ = iter;
|
||||
}
|
||||
}
|
||||
|
||||
void fill(const T& val)
|
||||
{
|
||||
for(auto& bf: *this)
|
||||
|
@ -68,6 +93,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool slaveToMasterUpdateRequested()const
|
||||
{
|
||||
return slaveToMasterUpdateIter_ != -1;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,8 @@ pFlow::generalBoundary::generalBoundary
|
|||
:
|
||||
observer(&boundary, defaultMessage_),
|
||||
boundary_(boundary),
|
||||
pStruct_(pStruct)
|
||||
pStruct_(pStruct),
|
||||
isBoundaryMaster_(boundary.isBoundaryMaster())
|
||||
{}
|
||||
|
||||
|
||||
|
|
|
@ -45,16 +45,10 @@ private:
|
|||
|
||||
const pointStructure& pStruct_;
|
||||
|
||||
const bool isBoundaryMaster_;
|
||||
|
||||
static inline
|
||||
const message defaultMessage_{message::BNDR_RESET};
|
||||
|
||||
template<typename BoundaryFieldType>
|
||||
inline
|
||||
bool checkForType()const
|
||||
{
|
||||
return typeName() == BoundaryFieldType::TYPENAME();
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
|
@ -68,7 +62,6 @@ public:
|
|||
|
||||
~generalBoundary()override = default;
|
||||
|
||||
|
||||
inline
|
||||
uint32 thisBoundaryIndex()const
|
||||
{
|
||||
|
@ -93,6 +86,24 @@ public:
|
|||
return boundary_.capacity();
|
||||
}
|
||||
|
||||
inline
|
||||
auto neighborProcSize()const
|
||||
{
|
||||
return boundary_.neighborProcSize();
|
||||
}
|
||||
|
||||
inline
|
||||
int neighborProcessorNo()const
|
||||
{
|
||||
return boundary_.neighborProcessorNo();
|
||||
}
|
||||
|
||||
inline
|
||||
int thisProcessorNo()const
|
||||
{
|
||||
return boundary_.thisProcessorNo();
|
||||
}
|
||||
|
||||
inline
|
||||
const auto& boundary()const
|
||||
{
|
||||
|
@ -129,22 +140,17 @@ public:
|
|||
return pStruct_;
|
||||
}
|
||||
|
||||
inline
|
||||
bool isBoundaryMaster()const
|
||||
{
|
||||
return isBoundaryMaster_;
|
||||
}
|
||||
|
||||
const Time& time()const;
|
||||
|
||||
virtual
|
||||
void fill(const std::any& val)=0;
|
||||
|
||||
/*template<typename BoundaryFieldType>
|
||||
BoundaryFieldType& thisField()
|
||||
{
|
||||
return static_cast<BoundaryFieldType&>(*this);
|
||||
}
|
||||
|
||||
template<typename BoundaryFieldType>
|
||||
const BoundaryFieldType& thisField()const
|
||||
{
|
||||
return static_cast<const BoundaryFieldType&>(*this);
|
||||
}*/
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -181,6 +181,11 @@ public:
|
|||
return field_.insertSetElement(indices, val);
|
||||
}
|
||||
|
||||
inline const Time& time()const
|
||||
{
|
||||
return internalPoints_.time();
|
||||
}
|
||||
|
||||
bool hearChanges
|
||||
(
|
||||
real t,
|
||||
|
|
|
@ -24,7 +24,7 @@ Licence:
|
|||
#include "pointStructure.hpp"
|
||||
#include "internalField.hpp"
|
||||
#include "boundaryFieldList.hpp"
|
||||
|
||||
#include "Time.hpp"
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
|
@ -103,6 +103,23 @@ public:
|
|||
return static_cast<const InternalFieldType&>(*this);
|
||||
}
|
||||
|
||||
void updateBoundaries(DataDirection direction)const
|
||||
{
|
||||
uint32 iter = this->time().currentIter();
|
||||
auto& bList = const_cast<boundaryFieldListType&>(boundaryFieldList_);
|
||||
bList.updateBoundaries(iter, direction);
|
||||
}
|
||||
|
||||
/// @brief update boundaries if it is requested previousely (slave to master).
|
||||
/// It only checks for SlaveToMaster direction.
|
||||
void updateBoundariesSlaveToMasterIfRequested()
|
||||
{
|
||||
if(boundaryFieldList_.slaveToMasterUpdateRequested())
|
||||
{
|
||||
updateBoundaries(DataDirection::SlaveToMaster);
|
||||
}
|
||||
}
|
||||
|
||||
const auto& boundaryFields()const
|
||||
{
|
||||
return boundaryFieldList_;
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/*------------------------------- phasicFlow ---------------------------------
|
||||
O C enter of
|
||||
O O E ngineering and
|
||||
O O M ultiscale modeling of
|
||||
OOOOOOO F luid flow
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C): www.cemf.ir
|
||||
email: hamid.r.norouzi AT gmail.com
|
||||
------------------------------------------------------------------------------
|
||||
Licence:
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
granular and multiphase flows. You can redistribute it and/or modify it under
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
#include "localProcessors.hpp"
|
||||
|
||||
pFlow::localProcessors::localProcessors(const word &name)
|
||||
|
@ -8,8 +27,8 @@ pFlow::localProcessors::localProcessors(const word &name)
|
|||
name_(name)
|
||||
{
|
||||
#ifdef pFlow_Build_MPI
|
||||
parrentCommunicator_ = pFlow::MPI::CommWorld;
|
||||
localCommunicator_ = pFlow::MPI::CommWorld;
|
||||
parrentCommunicator_ = MPI_COMM_WORLD;
|
||||
localCommunicator_ = MPI_COMM_WORLD;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -24,7 +43,7 @@ pFlow::localProcessors::localProcessors
|
|||
name_(name)
|
||||
{
|
||||
#ifdef pFlow_Build_MPI
|
||||
parrentCommunicator_ = pFlow::MPI::CommWorld;
|
||||
parrentCommunicator_ = MPI_COMM_WORLD;
|
||||
|
||||
if(ranks.size()> this->globalSize() )
|
||||
{
|
||||
|
@ -33,17 +52,17 @@ pFlow::localProcessors::localProcessors
|
|||
fatalExit;
|
||||
}
|
||||
|
||||
pFlow::MPI::Group globalGroup;
|
||||
MPI_Group globalGroup;
|
||||
MPI_Comm_group(parrentCommunicator_, &globalGroup);
|
||||
|
||||
pFlow::MPI::Group localGroup;
|
||||
MPI_Group localGroup;
|
||||
MPI_Group_incl(globalGroup, ranks.size(), ranks.data(), &localGroup);
|
||||
|
||||
// Create the new communicator from that group of processes.
|
||||
|
||||
CheckMPI( MPI_Comm_create(parrentCommunicator_, localGroup, &localCommunicator_), true);
|
||||
|
||||
isPartOfLocal_ = localCommunicator_ != MPI::CommNull;
|
||||
isPartOfLocal_ = localCommunicator_ != MPI_COMM_NULL;
|
||||
|
||||
if(isPartOfLocal_)
|
||||
{
|
||||
|
@ -71,7 +90,7 @@ pFlow::localProcessors::localProcessors
|
|||
|
||||
pFlow::localProcessors::localProcessors
|
||||
(
|
||||
pFlow::MPI::Comm parrentComm,
|
||||
MPI_Comm parrentComm,
|
||||
const word &name,
|
||||
const std::vector<int> &ranks
|
||||
)
|
||||
|
@ -92,17 +111,17 @@ pFlow::localProcessors::localProcessors
|
|||
fatalExit;
|
||||
}
|
||||
|
||||
pFlow::MPI::Group parGroup;
|
||||
MPI_Group parGroup;
|
||||
MPI_Comm_group(parrentCommunicator_, &parGroup);
|
||||
|
||||
pFlow::MPI::Group localGroup;
|
||||
MPI_Group localGroup;
|
||||
MPI_Group_incl(parGroup, ranks.size(), ranks.data(), &localGroup);
|
||||
|
||||
// Create the new communicator from that group of processes.
|
||||
|
||||
CheckMPI( MPI_Comm_create(parrentCommunicator_, localGroup, &localCommunicator_), true);
|
||||
|
||||
isPartOfLocal_ = localCommunicator_ != MPI::CommNull;
|
||||
isPartOfLocal_ = localCommunicator_ != MPI_COMM_NULL;
|
||||
|
||||
if(isPartOfLocal_)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ Licence:
|
|||
#include "types.hpp"
|
||||
|
||||
#ifdef pFlow_Build_MPI
|
||||
#include "mpiTypes.hpp"
|
||||
#include "mpi.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -39,9 +39,9 @@ class localProcessors
|
|||
private:
|
||||
|
||||
#ifdef pFlow_Build_MPI
|
||||
pFlow::MPI::Comm parrentCommunicator_;
|
||||
MPI_Comm parrentCommunicator_;
|
||||
|
||||
pFlow::MPI::Comm localCommunicator_;
|
||||
MPI_Comm localCommunicator_;
|
||||
#endif
|
||||
|
||||
int localSize_ = 1 ;
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
#ifdef pFlow_Build_MPI
|
||||
localProcessors(
|
||||
pFlow::MPI::Comm parrentComm,
|
||||
MPI_Comm parrentComm,
|
||||
const word& name,
|
||||
const std::vector<int>& ranks);
|
||||
#endif
|
||||
|
|
|
@ -58,11 +58,13 @@ void pFlow::processors::initProcessors(int argc, char *argv[])
|
|||
if(processors::globalParallel())
|
||||
{
|
||||
pFlow::pOutput.activatePrefix();
|
||||
pFlow::pOutput.setPrefixNum(processors::globalRank_);
|
||||
pFlow::pOutput.setPrefixNum(processors::globalRank_);
|
||||
pFlow::errReport.activatePrefix();
|
||||
pFlow::errReport.setPrefixNum(processors::globalRank_);
|
||||
}
|
||||
|
||||
pFlow::mOutput.setMasterSlave(processors::globalMaster());
|
||||
pFlow::errReport.setMasterSlave(processors::globalMaster());
|
||||
|
||||
|
||||
MPI_Type_contiguous(3, pFlow::MPI::Type<real>(), &pFlow::MPI::realx3Type__);
|
||||
MPI_Type_commit(&pFlow::MPI::realx3Type__);
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
*
|
||||
* MasterProcessorDistribute: Read is done on master processor, but
|
||||
* the data should be distributed between processors based on an externally
|
||||
* specified pattern. Write is done on master processors and the data is
|
||||
* specified pattern. Write is done on master processor and the data is
|
||||
* collected from all processors (collection is done based on the externally
|
||||
* specified pattern).
|
||||
*
|
||||
|
@ -146,7 +146,6 @@ public:
|
|||
bool thisProcWriteData()const
|
||||
{
|
||||
if(isAllProcessorsDifferent()) return true;
|
||||
if(isMasterProcessorDistribute())return true;
|
||||
return isMaster();
|
||||
}
|
||||
|
||||
|
|
|
@ -118,8 +118,9 @@ bool pFlow::IOobject::readObject(bool rdHdr)
|
|||
|
||||
bool pFlow::IOobject::writeObject() const
|
||||
{
|
||||
|
||||
if(implyWrite()&& ioPattern().thisCallWrite())
|
||||
if(!implyWrite()) return true;
|
||||
|
||||
if(ioPattern().thisCallWrite())
|
||||
{
|
||||
|
||||
if(auto ptrOS = outStream(); ptrOS )
|
||||
|
@ -160,7 +161,9 @@ bool pFlow::IOobject::readObject(iIstream& is, bool rdHdr)
|
|||
bool pFlow::IOobject::writeObject(iOstream& os) const
|
||||
{
|
||||
if(this->writeHeader() && ioPattern().thisProcWriteHeader())
|
||||
writeHeader(os, typeName());
|
||||
{
|
||||
writeHeader(os, typeName());
|
||||
}
|
||||
|
||||
if(ioPattern().thisCallWrite())
|
||||
{
|
||||
|
|
|
@ -199,7 +199,7 @@ bool pFlow::systemControl::operator++(int)
|
|||
|
||||
if (time().timersReportTime() && timersReport())
|
||||
{
|
||||
timers_.write(output, true);
|
||||
timers_.write(mOutput, true);
|
||||
}
|
||||
}
|
||||
else if (time().finalTime())
|
||||
|
@ -212,7 +212,7 @@ bool pFlow::systemControl::operator++(int)
|
|||
}
|
||||
writeToFileTimer_.end();
|
||||
|
||||
timers_.write(output, true);
|
||||
timers_.write(mOutput, true);
|
||||
}
|
||||
|
||||
return toContinue;
|
||||
|
|
|
@ -202,7 +202,7 @@ bool pFlow::dataIO<T>::writeData(iOstream& os, span<T> data)
|
|||
|
||||
if( ioPattern_.thisProcWriteData())
|
||||
{
|
||||
return writeDataAsciiBinary(os, data);
|
||||
return writeDataAsciiBinary(os, bufferSpan_);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ inline
|
|||
bool pFlow::dataIO<pFlow::word>::writeData(iOstream& os, span<word> data)
|
||||
{
|
||||
|
||||
if( ioPattern_.isParallel() )
|
||||
if( ioPattern_.isParallel() && ioPattern_.isMasterProcessorDistribute())
|
||||
{
|
||||
notImplementedFunction<<
|
||||
"data transfer for type word is not supported in parallel mode!"<<endl;
|
||||
|
@ -232,7 +232,7 @@ bool pFlow::dataIO<pFlow::word>::writeData(iOstream& os, span<word> data)
|
|||
|
||||
if( ioPattern_.thisProcWriteData())
|
||||
{
|
||||
return writeDataASCII(os, data);
|
||||
return writeDataASCII(os, bufferSpan_);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -31,8 +31,6 @@ Licence:
|
|||
#include "virtualConstructor.hpp"
|
||||
#include "pFlowProcessors.hpp"
|
||||
|
||||
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
#ifndef __datIOMPI_hpp__
|
||||
#define __datIOMPI_hpp__
|
||||
|
||||
#include "dataIO.hpp"
|
||||
#include "pFlowProcessors.hpp"
|
||||
|
||||
#ifdef pFlow_Build_MPI
|
||||
#include "gatherMaster.hpp"
|
||||
#endif
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class dataIOMPI
|
||||
:
|
||||
public dataIO<T>
|
||||
{
|
||||
protected:
|
||||
|
||||
bool gatherData(span<T> data ) override
|
||||
{
|
||||
|
||||
if(this->ioPattern_.isAllProcessorsDifferent())
|
||||
{
|
||||
this->bufferSpan_ = data;
|
||||
return true;
|
||||
}
|
||||
|
||||
if( this->ioPattern_.isMasterProcessorDistribute())
|
||||
{
|
||||
|
||||
#ifdef pFlow_Build_MPI
|
||||
|
||||
auto gatherT = pFlow::MPI::gatherMaster<T>(pFlowProcessors());
|
||||
|
||||
if(!gatherT.gatherData(data))
|
||||
{
|
||||
fatalErrorInFunction<<"Error in gathering data to master"<<endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
this->buffer_ = gatherT.moveData();
|
||||
|
||||
this->bufferSpan_ = makeSpan(this->buffer_);
|
||||
|
||||
return true;
|
||||
#else
|
||||
notImplementedFunction;
|
||||
fatalExit;
|
||||
return false;
|
||||
#endif //pFlow_Build_MPI
|
||||
|
||||
}
|
||||
|
||||
if( this->ioPattern_.isMasterProcessorOnly() || this->ioPattern_.isAllProcessorSimilar() )
|
||||
{
|
||||
if( this->ioPattern_.isMaster() )
|
||||
{
|
||||
this->bufferSpan_ = data;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->bufferSpan_ = span<T>(nullptr, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public:
|
||||
|
||||
TypeInfo("dataIO<MPI>");
|
||||
|
||||
dataIOMPI(const IOPattern& iop)
|
||||
:
|
||||
dataIO<T>(iop)
|
||||
{}
|
||||
|
||||
dataIOMPI(const dataIOMPI&) = default;
|
||||
|
||||
dataIOMPI(dataIOMPI&&) = default;
|
||||
|
||||
|
||||
dataIOMPI& operator=(const dataIOMPI&) = default;
|
||||
|
||||
dataIOMPI& operator=(dataIOMPI&&) = default;
|
||||
|
||||
~dataIOMPI() = default;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
|
@ -19,9 +19,15 @@ template class pFlow::dataIORegular<pFlow::int64>;
|
|||
template class pFlow::dataIO<pFlow::uint32>;
|
||||
template class pFlow::dataIORegular<pFlow::uint32>;
|
||||
|
||||
template class pFlow::dataIO<pFlow::uint32x3>;
|
||||
template class pFlow::dataIORegular<pFlow::uint32x3>;
|
||||
|
||||
template class pFlow::dataIO<pFlow::uint64>;
|
||||
template class pFlow::dataIORegular<pFlow::uint64>;
|
||||
|
||||
template class pFlow::dataIO<size_t>;
|
||||
template class pFlow::dataIORegular<size_t>;
|
||||
|
||||
template class pFlow::dataIO<pFlow::real>;
|
||||
template class pFlow::dataIORegular<pFlow::real>;
|
||||
|
||||
|
|
|
@ -260,6 +260,8 @@ inline iIstream& operator>>( iIstream& is, float& val);
|
|||
|
||||
inline iIstream& operator>>( iIstream& is, double& val);
|
||||
|
||||
inline iIstream& operator>>( iIstream& is, size_t& val);
|
||||
|
||||
|
||||
|
||||
} // pFlow
|
||||
|
|
|
@ -295,3 +295,35 @@ inline pFlow::iIstream& pFlow::operator>>( iIstream& is, double& val)
|
|||
return is;
|
||||
}
|
||||
|
||||
inline pFlow::iIstream& pFlow::operator>>( iIstream& is, size_t& val)
|
||||
{
|
||||
token t(is);
|
||||
if (!t.good())
|
||||
{
|
||||
ioErrorInFile(is.name(), is.lineNumber())
|
||||
<< "Bad token - could not get double value";
|
||||
fatalExit;
|
||||
is.setBad();
|
||||
return is;
|
||||
}
|
||||
|
||||
if (t.isNumber())
|
||||
{
|
||||
val = static_cast<size_t>(t.number());
|
||||
}
|
||||
else
|
||||
{
|
||||
ioErrorInFile(is.name(), is.lineNumber())
|
||||
<< "Wrong token type - expected double value, found "
|
||||
<< t;
|
||||
fatalExit;
|
||||
is.setBad();
|
||||
return is;
|
||||
}
|
||||
|
||||
is.check(FUNCTION_NAME);
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -9,5 +9,5 @@ pFlow::processorOstream pFlow::pOutput(cout, "pFlow processorOstream");
|
|||
|
||||
pFlow::Istream pFlow::input( std::cin, "sFlow Istream");
|
||||
|
||||
pFlow::masterOstream pFlow::errReport( std::cerr, "pFlow error report stream");
|
||||
pFlow::processorOstream pFlow::errReport( std::cerr, "pFlow error report stream");
|
||||
|
||||
|
|
|
@ -28,12 +28,12 @@ namespace pFlow
|
|||
|
||||
extern Istream input;
|
||||
|
||||
extern masterOstream errReport;
|
||||
extern processorOstream errReport;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#define INFORMATION pFlow::mOutput<<boldChar<<magentaColor<<"> INFO: "<<defaultColor<<magentaColor
|
||||
#define INFORMATION pFlow::pOutput<<boldChar<<magentaColor<<"> INFO: "<<defaultColor<<magentaColor
|
||||
#define END_INFO defaultColor<<pFlow::endl
|
||||
|
||||
#define REPORT(n) pFlow::mOutput.space(2*n)
|
||||
|
|
|
@ -191,7 +191,8 @@ pFlow::boundaryBase::boundaryBase
|
|||
internal_(internal),
|
||||
boundaries_(bndrs),
|
||||
thisBoundaryIndex_(thisIndex),
|
||||
mirrorProcessoNo_(dict.getVal<uint32>("mirrorProcessorNo")),
|
||||
neighborProcessorNo_(dict.getVal<int32>("neighborProcessorNo")),
|
||||
isBoundaryMaster_(thisProcessorNo()>=neighborProcessorNo()),
|
||||
name_(dict.name()),
|
||||
type_(dict.getVal<word>("type"))
|
||||
{
|
||||
|
@ -231,13 +232,22 @@ pFlow::boundaryBase::thisPoints()const
|
|||
|
||||
}
|
||||
|
||||
typename pFlow::boundaryBase::pointFieldAccessType
|
||||
pFlow::boundaryBase::neighborPoints()const
|
||||
pFlow::realx3Vector_D& pFlow::boundaryBase::neighborProcPoints()
|
||||
{
|
||||
notImplementedFunction;
|
||||
return pointFieldAccessType();
|
||||
static realx3Vector_D dummyVector{"dummyVector"};
|
||||
notImplementedFunction;
|
||||
fatalExit;
|
||||
return dummyVector;
|
||||
}
|
||||
|
||||
const pFlow::realx3Vector_D&
|
||||
pFlow::boundaryBase::neighborProcPoints()const
|
||||
{
|
||||
static realx3Vector_D dummyVector{"dummyVector"};
|
||||
notImplementedFunction;
|
||||
fatalExit;
|
||||
return dummyVector;
|
||||
}
|
||||
|
||||
pFlow::realx3 pFlow::boundaryBase::displacementVectroToMirror() const
|
||||
{
|
||||
|
|
|
@ -51,42 +51,48 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
// friend et al.
|
||||
// friend et al.
|
||||
friend boundaryList;
|
||||
|
||||
const plane& boundaryPlane_;
|
||||
const plane& boundaryPlane_;
|
||||
|
||||
/// list of particles indices on device
|
||||
uint32Vector_D indexList_;
|
||||
/// list of particles indices on device
|
||||
uint32Vector_D indexList_;
|
||||
|
||||
/// list of particles indieces on host
|
||||
mutable uint32Vector_H indexListHost_;
|
||||
mutable uint32Vector_H indexListHost_;
|
||||
|
||||
/// device and host list are sync
|
||||
mutable bool listsSync_ = false;
|
||||
mutable bool listsSync_ = false;
|
||||
|
||||
/// The length defined for creating neighbor list
|
||||
real neighborLength_;
|
||||
/// The length defined for creating neighbor list
|
||||
real neighborLength_;
|
||||
|
||||
/// a reference to internal points
|
||||
internalPoints& internal_;
|
||||
/// a reference to internal points
|
||||
internalPoints& internal_;
|
||||
|
||||
/// a reference to the list of boundaries
|
||||
/// a reference to the list of boundaries
|
||||
/// (never use this in the constructor).
|
||||
boundaryList& boundaries_;
|
||||
boundaryList& boundaries_;
|
||||
|
||||
uint32 thisBoundaryIndex_;
|
||||
uint32 thisBoundaryIndex_;
|
||||
|
||||
uint32 mirrorProcessoNo_;
|
||||
int neighborProcessorNo_;
|
||||
|
||||
word name_;
|
||||
bool isBoundaryMaster_;
|
||||
|
||||
word type_;
|
||||
word name_;
|
||||
|
||||
word type_;
|
||||
|
||||
protected:
|
||||
|
||||
/// @brief set the size of indexList
|
||||
void setSize(uint32 newSize);
|
||||
/// @brief Set the size of indexList.
|
||||
/// It is virtual to let derived classed to be aware of
|
||||
/// the fact that the size of boundary points has been changed.
|
||||
/// So, any drived class that override this method should call
|
||||
/// boundaryBase::setSize(newSize) too.
|
||||
virtual void setSize(uint32 newSize);
|
||||
|
||||
void setNewIndices(const uint32Vector_D& newIndices);
|
||||
|
||||
|
@ -116,6 +122,17 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
/// Update this boundary data in two steps (1 and 2).
|
||||
/// This is called after calling beforeIteration for
|
||||
/// all boundaries, so any particle addition, deletion,
|
||||
/// and transfer has been finished up to this point.
|
||||
/// This two-step update help to have a flexible mechanism
|
||||
/// for data transfer, mostly for MPI related jobs.
|
||||
virtual
|
||||
bool updataBoundary(int step)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
|
@ -213,6 +230,24 @@ public:
|
|||
return indexList_.capacity();
|
||||
}
|
||||
|
||||
inline
|
||||
int neighborProcessorNo()const
|
||||
{
|
||||
return neighborProcessorNo_;
|
||||
}
|
||||
|
||||
inline
|
||||
int thisProcessorNo()const
|
||||
{
|
||||
return pFlowProcessors().localRank();
|
||||
}
|
||||
|
||||
inline
|
||||
bool isBoundaryMaster()const
|
||||
{
|
||||
return isBoundaryMaster_;
|
||||
}
|
||||
|
||||
inline
|
||||
uint32 thisBoundaryIndex()const
|
||||
{
|
||||
|
@ -283,8 +318,22 @@ public:
|
|||
|
||||
pointFieldAccessType thisPoints()const;
|
||||
|
||||
/// @brief Return number of points in the neighbor processor boundary
|
||||
virtual
|
||||
uint32 neighborProcSize()const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// @brief Return a reference to point positions in the neighbor
|
||||
/// processor boundary.
|
||||
virtual
|
||||
pointFieldAccessType neighborPoints()const;
|
||||
realx3Vector_D& neighborProcPoints();
|
||||
|
||||
/// @brief Return a const reference to point positions in the
|
||||
/// neighbor processor boundary.
|
||||
virtual
|
||||
const realx3Vector_D& neighborProcPoints()const;
|
||||
|
||||
/// - static create
|
||||
static
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
O C enter of
|
||||
O O E ngineering and
|
||||
O O M ultiscale modeling of
|
||||
OOOOOOO F luid flow
|
||||
OOOOOOO F luid flow
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C): www.cemf.ir
|
||||
email: hamid.r.norouzi AT gmail.com
|
||||
------------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------------
|
||||
Licence:
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
granular and multiphase flows. You can redistribute it and/or modify it under
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
@ -21,49 +21,44 @@ Licence:
|
|||
#include "boundaryList.hpp"
|
||||
#include "pointStructure.hpp"
|
||||
|
||||
void pFlow::boundaryList::setExtendedDomain()
|
||||
void
|
||||
pFlow::boundaryList::setExtendedDomain()
|
||||
{
|
||||
if(!listSet_)
|
||||
if (!listSet_)
|
||||
{
|
||||
fatalErrorInFunction<<
|
||||
"boundary list is not set yet and you used the objects."<<endl;
|
||||
fatalErrorInFunction
|
||||
<< "boundary list is not set yet and you used the objects." << endl;
|
||||
fatalExit;
|
||||
}
|
||||
|
||||
realx3 lowerExt =
|
||||
boundary(0).boundaryExtensionLength() +
|
||||
boundary(2).boundaryExtensionLength() +
|
||||
boundary(4).boundaryExtensionLength();
|
||||
|
||||
realx3 upperExt =
|
||||
boundary(1).boundaryExtensionLength()+
|
||||
boundary(3).boundaryExtensionLength()+
|
||||
boundary(5).boundaryExtensionLength();
|
||||
|
||||
extendedDomain_ = pStruct_.simDomain().extendThisDomain
|
||||
(
|
||||
lowerExt,
|
||||
upperExt
|
||||
);
|
||||
|
||||
|
||||
|
||||
realx3 lowerExt = boundary(0).boundaryExtensionLength() +
|
||||
boundary(2).boundaryExtensionLength() +
|
||||
boundary(4).boundaryExtensionLength();
|
||||
|
||||
realx3 upperExt = boundary(1).boundaryExtensionLength() +
|
||||
boundary(3).boundaryExtensionLength() +
|
||||
boundary(5).boundaryExtensionLength();
|
||||
|
||||
extendedDomain_ = pStruct_.simDomain().extendThisDomain(lowerExt, upperExt);
|
||||
}
|
||||
|
||||
bool pFlow::boundaryList::resetLists()
|
||||
bool
|
||||
pFlow::boundaryList::resetLists()
|
||||
{
|
||||
clear();
|
||||
listSet_ = false;
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::boundaryList::updateLists()
|
||||
bool
|
||||
pFlow::boundaryList::updateNeighborLists()
|
||||
{
|
||||
if(!listSet_)
|
||||
if (!listSet_)
|
||||
{
|
||||
setLists();
|
||||
createBoundaries();
|
||||
}
|
||||
|
||||
std::array<real,6> dist;
|
||||
std::array<real, 6> dist;
|
||||
dist[0] = boundary(0).neighborLength();
|
||||
dist[1] = boundary(1).neighborLength();
|
||||
dist[2] = boundary(2).neighborLength();
|
||||
|
@ -71,71 +66,66 @@ bool pFlow::boundaryList::updateLists()
|
|||
dist[4] = boundary(4).neighborLength();
|
||||
dist[5] = boundary(5).neighborLength();
|
||||
|
||||
pStruct_.updateFlag(
|
||||
extendedDomain_,
|
||||
dist);
|
||||
pStruct_.updateFlag(extendedDomain_, dist);
|
||||
|
||||
const auto& maskD = pStruct_.activePointsMaskDevice();
|
||||
boundary(0).setSize( maskD.leftSize() );
|
||||
boundary(1).setSize( maskD.rightSize() );
|
||||
boundary(2).setSize( maskD.bottomSize() );
|
||||
boundary(3).setSize( maskD.topSize() );
|
||||
boundary(4).setSize( maskD.rearSize() );
|
||||
boundary(5).setSize( maskD.frontSize() );
|
||||
boundary(0).setSize(maskD.leftSize());
|
||||
boundary(1).setSize(maskD.rightSize());
|
||||
boundary(2).setSize(maskD.bottomSize());
|
||||
boundary(3).setSize(maskD.topSize());
|
||||
boundary(4).setSize(maskD.rearSize());
|
||||
boundary(5).setSize(maskD.frontSize());
|
||||
|
||||
pStruct_.fillNeighborsLists(
|
||||
boundary(0).indexList().deviceViewAll(),
|
||||
boundary(1).indexList().deviceViewAll(),
|
||||
boundary(2).indexList().deviceViewAll(),
|
||||
boundary(3).indexList().deviceViewAll(),
|
||||
boundary(4).indexList().deviceViewAll(),
|
||||
boundary(5).indexList().deviceViewAll());
|
||||
|
||||
|
||||
return true;
|
||||
boundary(0).indexList().deviceViewAll(),
|
||||
boundary(1).indexList().deviceViewAll(),
|
||||
boundary(2).indexList().deviceViewAll(),
|
||||
boundary(3).indexList().deviceViewAll(),
|
||||
boundary(4).indexList().deviceViewAll(),
|
||||
boundary(5).indexList().deviceViewAll()
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
pFlow::boundaryList::boundaryList
|
||||
(
|
||||
pointStructure& pStruct
|
||||
)
|
||||
:
|
||||
ListPtr<boundaryBase>(pStruct.simDomain().sizeOfBoundaries()),
|
||||
pStruct_(pStruct),
|
||||
timeControl_
|
||||
(
|
||||
pStruct.simDomain().subDict("boundaries"),
|
||||
"update",
|
||||
pStruct.currentTime()
|
||||
)
|
||||
{}
|
||||
|
||||
bool pFlow::boundaryList::updateLists(uint32 iter, real t, real dt)
|
||||
pFlow::boundaryList::boundaryList(pointStructure& pStruct)
|
||||
: ListPtr<boundaryBase>(pStruct.simDomain().sizeOfBoundaries()),
|
||||
pStruct_(pStruct),
|
||||
timeControl_(
|
||||
pStruct.simDomain().subDict("boundaries"),
|
||||
"update",
|
||||
pStruct.currentTime()
|
||||
)
|
||||
{
|
||||
if( timeControl_.timeEvent(iter, t, dt))
|
||||
}
|
||||
|
||||
bool
|
||||
pFlow::boundaryList::updateNeighborLists(uint32 iter, real t, real dt)
|
||||
{
|
||||
if (timeControl_.timeEvent(iter, t, dt))
|
||||
{
|
||||
return updateLists();
|
||||
return updateNeighborLists();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::boundaryList::setLists()
|
||||
bool
|
||||
pFlow::boundaryList::createBoundaries()
|
||||
{
|
||||
if(listSet_)return true;
|
||||
if (listSet_)
|
||||
return true;
|
||||
|
||||
for(auto i=0; i<pStruct_.simDomain().sizeOfBoundaries();i++)
|
||||
for (auto i = 0; i < pStruct_.simDomain().sizeOfBoundaries(); i++)
|
||||
{
|
||||
this->set
|
||||
(
|
||||
i,
|
||||
boundaryBase::create
|
||||
(
|
||||
pStruct_.simDomain().boundaryDict(i),
|
||||
pStruct_.simDomain().boundaryPlane(i),
|
||||
pStruct_,
|
||||
*this,
|
||||
i
|
||||
)
|
||||
this->set(
|
||||
i,
|
||||
boundaryBase::create(
|
||||
pStruct_.simDomain().boundaryDict(i),
|
||||
pStruct_.simDomain().boundaryPlane(i),
|
||||
pStruct_,
|
||||
*this,
|
||||
i
|
||||
)
|
||||
);
|
||||
}
|
||||
listSet_ = true;
|
||||
|
@ -146,81 +136,81 @@ bool pFlow::boundaryList::setLists()
|
|||
pFlow::box
|
||||
pFlow::boundaryList::internalDomainBox() const
|
||||
{
|
||||
const auto& thisBox = pStruct_.thisDomain().domainBox();
|
||||
|
||||
const auto& thisBox = pStruct_.thisDomain().domainBox();
|
||||
|
||||
const realx3 lowerPointDisplacement = {
|
||||
boundary(0).neighborLengthIntoInternal(),
|
||||
boundary(2).neighborLengthIntoInternal(),
|
||||
boundary(4).neighborLengthIntoInternal()};
|
||||
boundary(0).neighborLengthIntoInternal(),
|
||||
boundary(2).neighborLengthIntoInternal(),
|
||||
boundary(4).neighborLengthIntoInternal()
|
||||
};
|
||||
|
||||
const realx3 upperPointDisplacement = {
|
||||
boundary(1).neighborLengthIntoInternal(),
|
||||
boundary(3).neighborLengthIntoInternal(),
|
||||
boundary(5).neighborLengthIntoInternal()};
|
||||
|
||||
return {thisBox.minPoint() + lowerPointDisplacement,
|
||||
thisBox.maxPoint() - upperPointDisplacement};
|
||||
boundary(1).neighborLengthIntoInternal(),
|
||||
boundary(3).neighborLengthIntoInternal(),
|
||||
boundary(5).neighborLengthIntoInternal()
|
||||
};
|
||||
|
||||
return { thisBox.minPoint() + lowerPointDisplacement,
|
||||
thisBox.maxPoint() - upperPointDisplacement };
|
||||
}
|
||||
|
||||
bool
|
||||
pFlow::boundaryList::beforeIteration(uint32 iter, real t, real dt)
|
||||
{
|
||||
// it is time to update lists
|
||||
if(timeControl_.timeEvent(iter, t, dt))
|
||||
// it is time to update lists
|
||||
if (timeControl_.timeEvent(iter, t, dt) && !updateNeighborLists())
|
||||
{
|
||||
if(!updateLists())
|
||||
fatalErrorInFunction;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto bdry : *this)
|
||||
{
|
||||
if (!bdry->beforeIteration(iter, t, dt))
|
||||
{
|
||||
fatalErrorInFunction;
|
||||
fatalErrorInFunction << "Error in beforeIteration in boundary "
|
||||
<< bdry->name() << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for(auto& bdry:*this)
|
||||
for (auto bdry : *this)
|
||||
{
|
||||
if( !bdry->beforeIteration(iter, t, dt))
|
||||
{
|
||||
fatalErrorInFunction<<
|
||||
"Error in beforeIteration in boundary "<<bdry->name()<<endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
bdry->updataBoundary(1);
|
||||
}
|
||||
|
||||
return true;
|
||||
for (auto bdry : *this)
|
||||
{
|
||||
bdry->updataBoundary(2);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::boundaryList::iterate
|
||||
(
|
||||
uint32 iter,
|
||||
real t,
|
||||
real dt
|
||||
)
|
||||
bool
|
||||
pFlow::boundaryList::iterate(uint32 iter, real t, real dt)
|
||||
{
|
||||
for(auto& bdry:*this)
|
||||
for (auto& bdry : *this)
|
||||
{
|
||||
if( !bdry->iterate(iter, t, dt))
|
||||
if (!bdry->iterate(iter, t, dt))
|
||||
{
|
||||
fatalErrorInFunction<<
|
||||
"Error in iterate in boundary "<<bdry->name()<<endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pFlow::boundaryList::afterIteration
|
||||
(
|
||||
uint32 iter,
|
||||
real t,
|
||||
real dt
|
||||
)
|
||||
{
|
||||
for(auto& bdry:*this)
|
||||
{
|
||||
if( !bdry->afterIteration(iter, t, dt))
|
||||
{
|
||||
fatalErrorInFunction<<
|
||||
"Error in afterIteration in boundary "<<bdry->name()<<endl;
|
||||
fatalErrorInFunction << "Error in iterate in boundary "
|
||||
<< bdry->name() << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
pFlow::boundaryList::afterIteration(uint32 iter, real t, real dt)
|
||||
{
|
||||
for (auto& bdry : *this)
|
||||
{
|
||||
if (!bdry->afterIteration(iter, t, dt))
|
||||
{
|
||||
fatalErrorInFunction << "Error in afterIteration in boundary "
|
||||
<< bdry->name() << endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,24 +40,23 @@ class boundaryList
|
|||
private:
|
||||
|
||||
//// - data members
|
||||
pointStructure& pStruct_;
|
||||
pointStructure& pStruct_;
|
||||
|
||||
baseTimeControl timeControl_;
|
||||
baseTimeControl timeControl_;
|
||||
|
||||
domain extendedDomain_;
|
||||
domain extendedDomain_;
|
||||
|
||||
box internalDomainBox_;
|
||||
box internalDomainBox_;
|
||||
|
||||
bool listSet_ = false;
|
||||
bool listSet_ = false;
|
||||
|
||||
void setExtendedDomain();
|
||||
void setExtendedDomain();
|
||||
|
||||
bool resetLists();
|
||||
|
||||
/// @brief update neighbor list of boundaries regardless
|
||||
/// of the time intervals
|
||||
bool updateLists();
|
||||
bool resetLists();
|
||||
|
||||
/// @brief update neighbor list of boundaries regardless
|
||||
/// of the time intervals
|
||||
bool updateNeighborLists();
|
||||
|
||||
public:
|
||||
|
||||
|
@ -66,16 +65,16 @@ public:
|
|||
|
||||
|
||||
//// - Constructors
|
||||
boundaryList(pointStructure& pStruct);
|
||||
explicit boundaryList(pointStructure& pStruct);
|
||||
|
||||
|
||||
~boundaryList() = default;
|
||||
virtual ~boundaryList() = default;
|
||||
|
||||
/// @brief update neighbor list of boundaries based on
|
||||
/// the time intervals
|
||||
bool updateLists(uint32 iter, real t, real dt);
|
||||
bool updateNeighborLists(uint32 iter, real t, real dt);
|
||||
|
||||
bool setLists();
|
||||
bool createBoundaries();
|
||||
|
||||
inline
|
||||
const pointStructure& pStruct()const
|
||||
|
@ -115,8 +114,6 @@ public:
|
|||
|
||||
box internalDomainBox()const;
|
||||
|
||||
|
||||
|
||||
bool beforeIteration(uint32 iter, real t, real dt);
|
||||
|
||||
bool iterate(uint32 iter, real t, real dt);
|
||||
|
|
|
@ -51,9 +51,9 @@ bool pFlow::regularSimulationDomain::createBoundaryDicts()
|
|||
return false;
|
||||
}
|
||||
|
||||
if(!bDict.add("mirrorProcessorNo",(uint32) processors::globalRank()))
|
||||
if(!bDict.add("neighborProcessorNo",(uint32) processors::globalRank()))
|
||||
{
|
||||
fatalErrorInFunction<<"error in adding mirrorProcessorNo to "<< bName <<
|
||||
fatalErrorInFunction<<"error in adding neighborProcessorNo to "<< bName <<
|
||||
" in dictionary "<< boundaries.globalName()<<endl;
|
||||
return false;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ bool pFlow::regularSimulationDomain::createBoundaryDicts()
|
|||
|
||||
bool pFlow::regularSimulationDomain::setThisDomain()
|
||||
{
|
||||
thisDomain_ = domain(globalBox_);
|
||||
thisDomain_ = domain(globalBox());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -126,11 +126,23 @@ pFlow::uint32 pFlow::regularSimulationDomain::numberToBeExported() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool pFlow::regularSimulationDomain::initialTransferBlockData
|
||||
(
|
||||
span<char> src,
|
||||
span<char> dst,
|
||||
size_t sizeOfElement
|
||||
bool
|
||||
pFlow::regularSimulationDomain::domainActive() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const pFlow::domain&
|
||||
pFlow::regularSimulationDomain::thisDomain() const
|
||||
{
|
||||
return thisDomain_;
|
||||
}
|
||||
|
||||
bool
|
||||
pFlow::regularSimulationDomain::initialTransferBlockData(
|
||||
span<char> src,
|
||||
span<char> dst,
|
||||
size_t sizeOfElement
|
||||
) const
|
||||
{
|
||||
size_t requiredSize = sizeOfElement*initialNumberInThis();
|
||||
|
@ -209,7 +221,3 @@ const pFlow::dictionary &pFlow::regularSimulationDomain::thisBoundaryDict() cons
|
|||
return this->subDict("regularBoundaries");
|
||||
}
|
||||
|
||||
bool pFlow::regularSimulationDomain::requiresDataTransfer()const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
O C enter of
|
||||
O O E ngineering and
|
||||
O O M ultiscale modeling of
|
||||
OOOOOOO F luid flow
|
||||
OOOOOOO F luid flow
|
||||
------------------------------------------------------------------------------
|
||||
Copyright (C): www.cemf.ir
|
||||
email: hamid.r.norouzi AT gmail.com
|
||||
------------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------------
|
||||
Licence:
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
This file is part of phasicFlow code. It is a free software for simulating
|
||||
granular and multiphase flows. You can redistribute it and/or modify it under
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
the terms of GNU General Public License v3 or any other later versions.
|
||||
|
||||
phasicFlow is distributed to help others in their research in the field of
|
||||
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
|
@ -26,81 +26,70 @@ Licence:
|
|||
namespace pFlow
|
||||
{
|
||||
|
||||
class regularSimulationDomain
|
||||
:
|
||||
class regularSimulationDomain
|
||||
:
|
||||
public simulationDomain
|
||||
{
|
||||
protected:
|
||||
private:
|
||||
|
||||
uint32 initialNumPoints_=0;
|
||||
domain thisDomain_;
|
||||
|
||||
bool createBoundaryDicts() override;
|
||||
uint32 initialNumPoints_ = 0;
|
||||
|
||||
bool setThisDomain()override;
|
||||
bool createBoundaryDicts() final;
|
||||
|
||||
bool setThisDomain() final;
|
||||
|
||||
public:
|
||||
|
||||
TypeInfo("simulationDomain<regular>");
|
||||
|
||||
regularSimulationDomain(systemControl& control);
|
||||
explicit regularSimulationDomain(systemControl& control);
|
||||
|
||||
virtual
|
||||
~regularSimulationDomain()=default;
|
||||
|
||||
add_vCtor
|
||||
(
|
||||
simulationDomain,
|
||||
regularSimulationDomain,
|
||||
systemControl
|
||||
);
|
||||
~regularSimulationDomain() final = default;
|
||||
|
||||
bool initialUpdateDomains(span<realx3> pointPos) override;
|
||||
add_vCtor(simulationDomain, regularSimulationDomain, systemControl);
|
||||
|
||||
uint32 initialNumberInThis()const override;
|
||||
bool initialUpdateDomains(span<realx3> pointPos) final;
|
||||
|
||||
bool initialThisDomainActive()const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
uint32 initialNumberInThis() const final;
|
||||
|
||||
/*bool updateDomains(
|
||||
span<realx3> pointPos,
|
||||
pFlagTypeHost flags) override;*/
|
||||
|
||||
uint32 numberToBeImported()const override;
|
||||
uint32 numberToBeImported() const final;
|
||||
|
||||
uint32 numberToBeExported()const override;
|
||||
uint32 numberToBeExported() const final;
|
||||
|
||||
/// @brief Is this domain active?
|
||||
/// Active mean, there is particle in it and
|
||||
/// boundaries and other entities of simulation domains are valid
|
||||
bool domainActive() const final;
|
||||
|
||||
/// @brief return the simulation domain of this processor
|
||||
const domain& thisDomain() const final;
|
||||
|
||||
bool initialTransferBlockData(
|
||||
span<char> src,
|
||||
span<char> dst,
|
||||
size_t sizeOfElement) const override;
|
||||
span<char> src,
|
||||
span<char> dst,
|
||||
size_t sizeOfElement
|
||||
) const final;
|
||||
|
||||
/// @brief
|
||||
/// @param src
|
||||
/// @param dst
|
||||
/// @return
|
||||
bool initialTransferBlockData(span<realx3> src, span<realx3> dst)
|
||||
const final;
|
||||
|
||||
/// @brief
|
||||
/// @param src
|
||||
/// @param dst
|
||||
/// @return
|
||||
bool initialTransferBlockData(
|
||||
span<realx3> src,
|
||||
span<realx3> dst) const override;
|
||||
bool initialTransferBlockData(span<real> src, span<real> dst)
|
||||
const final;
|
||||
|
||||
bool initialTransferBlockData(
|
||||
span<real> src,
|
||||
span<real> dst) const override;
|
||||
bool initialTransferBlockData(span<uint32> src, span<uint32> dst)
|
||||
const final;
|
||||
|
||||
bool initialTransferBlockData(
|
||||
span<uint32> src,
|
||||
span<uint32> dst) const override;
|
||||
bool initialTransferBlockData(span<int32> src, span<int32> dst)
|
||||
const final;
|
||||
|
||||
bool initialTransferBlockData(
|
||||
span<int32> src,
|
||||
span<int32> dst) const override;
|
||||
|
||||
|
||||
const dictionary& thisBoundaryDict()const override;
|
||||
const dictionary& thisBoundaryDict() const final;
|
||||
|
||||
bool requiresDataTransfer() const override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -52,8 +52,14 @@ pFlow::domain pFlow::simulationDomain::extendThisDomain
|
|||
return domain({minP, maxP});
|
||||
}
|
||||
|
||||
const pFlow::plane&
|
||||
pFlow::simulationDomain::boundaryPlane(uint32 i) const
|
||||
{
|
||||
return thisDomain().boundaryPlane(i);
|
||||
}
|
||||
|
||||
pFlow::uniquePtr<pFlow::simulationDomain>
|
||||
pFlow::simulationDomain::create(systemControl &control)
|
||||
pFlow::simulationDomain::create(systemControl& control)
|
||||
{
|
||||
word sType = angleBracketsNames(
|
||||
"simulationDomain",
|
||||
|
|
|
@ -39,33 +39,27 @@ class simulationDomain
|
|||
:
|
||||
public fileDictionary
|
||||
{
|
||||
private:
|
||||
private:
|
||||
|
||||
static inline constexpr uint32 sizeOfBoundaries_ = 6;
|
||||
|
||||
static
|
||||
inline const std::array<word,6> boundaryNames_ =
|
||||
{
|
||||
"left", "right",
|
||||
"bottom", "top",
|
||||
"rear", "front"
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
//fileDictionary globalDomainDict_ ;
|
||||
|
||||
/// @brief acutal limits of the simulation domain
|
||||
/// @brief acutal limits of the global box of simulation
|
||||
box globalBox_;
|
||||
|
||||
/// @brief the actual limits of this processor domain
|
||||
domain thisDomain_;
|
||||
|
||||
bool boundariesSet_ = false;
|
||||
static constexpr uint32 sizeOfBoundaries_ = 6;
|
||||
|
||||
static
|
||||
inline const std::array<word,6> boundaryNames_ =
|
||||
{
|
||||
"left", "right",
|
||||
"bottom", "top",
|
||||
"rear", "front"
|
||||
};
|
||||
|
||||
virtual bool createBoundaryDicts() = 0;
|
||||
virtual
|
||||
bool createBoundaryDicts() = 0;
|
||||
|
||||
virtual bool setThisDomain() = 0;
|
||||
virtual
|
||||
bool setThisDomain() = 0;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -73,11 +67,10 @@ public:
|
|||
TypeInfo("simulationDomain");
|
||||
|
||||
/// Constrcut from components
|
||||
simulationDomain(systemControl& control);
|
||||
explicit simulationDomain(systemControl& control);
|
||||
|
||||
/// Destructor
|
||||
virtual
|
||||
~simulationDomain() = default;
|
||||
~simulationDomain() override = default;
|
||||
|
||||
|
||||
create_vCtor
|
||||
|
@ -88,6 +81,11 @@ public:
|
|||
(control)
|
||||
);
|
||||
|
||||
const auto& globalBox()const
|
||||
{
|
||||
return globalBox_;
|
||||
}
|
||||
|
||||
virtual
|
||||
const dictionary& thisBoundaryDict()const = 0;
|
||||
|
||||
|
@ -97,9 +95,6 @@ public:
|
|||
virtual
|
||||
uint32 initialNumberInThis()const = 0;
|
||||
|
||||
virtual
|
||||
bool initialThisDomainActive()const = 0;
|
||||
|
||||
virtual
|
||||
bool initialTransferBlockData(
|
||||
span<char> src,
|
||||
|
@ -139,9 +134,7 @@ public:
|
|||
charSpan(dst),
|
||||
el
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @brief Number of points to be imported after updating domains
|
||||
/// @return number of points
|
||||
|
@ -151,40 +144,46 @@ public:
|
|||
virtual
|
||||
uint32 numberToBeExported()const = 0;
|
||||
|
||||
|
||||
|
||||
/// @brief Is this domain active?
|
||||
/// Active mean, there is particle in it and
|
||||
/// boundaries and other entities of simulation domains are valid
|
||||
virtual
|
||||
bool requiresDataTransfer() const = 0;
|
||||
|
||||
inline
|
||||
const auto& thisDomain()const
|
||||
{
|
||||
return thisDomain_;
|
||||
}
|
||||
bool domainActive()const = 0;
|
||||
|
||||
|
||||
/// @brief return the simulation domain of this processor
|
||||
virtual
|
||||
const domain& thisDomain()const = 0;
|
||||
|
||||
|
||||
domain extendThisDomain(
|
||||
const realx3& lowerPointExtension,
|
||||
const realx3& upperPointExtension)const;
|
||||
|
||||
/// @brief The original dictionary supplied by the user as input
|
||||
inline
|
||||
const auto& globalBoundaryDict()const
|
||||
{
|
||||
return static_cast<const fileDictionary&>(*this);
|
||||
}
|
||||
|
||||
/// @brief return a const ref to dicrionary of boundary i of this processor
|
||||
inline
|
||||
const dictionary& boundaryDict(uint32 i)const
|
||||
{
|
||||
return thisBoundaryDict().subDict(bundaryName(i));
|
||||
}
|
||||
|
||||
inline
|
||||
const auto& boundaryPlane(uint32 i)const
|
||||
{
|
||||
return thisDomain_.boundaryPlane(i);
|
||||
}
|
||||
/// @brief return a const ref to the plane of boundary i of this processor
|
||||
const plane& boundaryPlane(uint32 i)const;
|
||||
|
||||
|
||||
static
|
||||
uniquePtr<simulationDomain> create(systemControl& control);
|
||||
|
||||
/// @brief Boundary name based on boundary index
|
||||
/// @param i boundary index (range from 0 to 5)
|
||||
/// @return const reference to name of the boundary
|
||||
static inline
|
||||
const word& bundaryName(uint32 i)
|
||||
{
|
||||
|
@ -197,9 +196,6 @@ public:
|
|||
return boundaryNames_.size();
|
||||
}
|
||||
|
||||
static
|
||||
uniquePtr<simulationDomain> create(systemControl& control);
|
||||
|
||||
}; // simulationDomain
|
||||
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ bool pFlow::pointStructure::setupPointStructure(const PointsTypeHost &points)
|
|||
thisN,
|
||||
RESERVE()
|
||||
);
|
||||
|
||||
|
||||
auto pSpan = points.getSpan();
|
||||
|
||||
if(auto iSpan = internal.getSpan();
|
||||
|
@ -72,7 +72,7 @@ bool pFlow::pointStructure::setupPointStructure(const PointsTypeHost &points)
|
|||
return false;
|
||||
}
|
||||
|
||||
boundaries_.setLists();
|
||||
boundaries_.createBoundaries();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue