17 Commits

12972 changed files with 693633 additions and 162346 deletions

View File

@ -1,153 +0,0 @@
#!/usr/bin/env python3
import os
import re
import yaml
import sys
# Constants
REPO_URL = "https://github.com/PhasicFlow/phasicFlow"
REPO_PATH = os.path.join(os.environ.get("GITHUB_WORKSPACE", ""), "repo")
WIKI_PATH = os.path.join(os.environ.get("GITHUB_WORKSPACE", ""), "wiki")
MAPPING_FILE = os.path.join(REPO_PATH, ".github/workflows/markdownList.yml")
def load_mapping():
"""Load the markdown to wiki page mapping file."""
try:
with open(MAPPING_FILE, 'r') as f:
data = yaml.safe_load(f)
return data.get('mappings', [])
except Exception as e:
print(f"Error loading mapping file: {e}")
return []
def convert_relative_links(content, source_path):
"""Convert relative links in markdown content to absolute URLs."""
# Find markdown links with regex pattern [text](url)
md_pattern = r'\[([^\]]+)\]\(([^)]+)\)'
# Find HTML img tags
img_pattern = r'<img\s+src=[\'"]([^\'"]+)[\'"]'
def replace_link(match):
link_text = match.group(1)
link_url = match.group(2)
# Skip if already absolute URL or anchor
if link_url.startswith(('http://', 'https://', '#', 'mailto:')):
return match.group(0)
# Get the directory of the source file
source_dir = os.path.dirname(source_path)
# Create absolute path from repository root
if link_url.startswith('/'):
# If link starts with /, it's already relative to repo root
abs_path = link_url
else:
# Otherwise, it's relative to the file location
abs_path = os.path.normpath(os.path.join(source_dir, link_url))
if not abs_path.startswith('/'):
abs_path = '/' + abs_path
# Convert to GitHub URL
github_url = f"{REPO_URL}/blob/main{abs_path}"
return f"[{link_text}]({github_url})"
def replace_img_src(match):
img_src = match.group(1)
# Skip if already absolute URL
if img_src.startswith(('http://', 'https://')):
return match.group(0)
# Get the directory of the source file
source_dir = os.path.dirname(source_path)
# Create absolute path from repository root
if img_src.startswith('/'):
# If link starts with /, it's already relative to repo root
abs_path = img_src
else:
# Otherwise, it's relative to the file location
abs_path = os.path.normpath(os.path.join(source_dir, img_src))
if not abs_path.startswith('/'):
abs_path = '/' + abs_path
# Convert to GitHub URL (use raw URL for images)
github_url = f"{REPO_URL}/raw/main{abs_path}"
return f'<img src="{github_url}"'
# Replace all markdown links
content = re.sub(md_pattern, replace_link, content)
# Replace all img src tags
content = re.sub(img_pattern, replace_img_src, content)
return content
def process_file(source_file, target_wiki_page):
"""Process a markdown file and copy its contents to a wiki page."""
source_path = os.path.join(REPO_PATH, source_file)
target_path = os.path.join(WIKI_PATH, f"{target_wiki_page}.md")
print(f"Processing {source_path} -> {target_path}")
try:
# Check if source exists
if not os.path.exists(source_path):
print(f"Source file not found: {source_path}")
return False
# Read source content
with open(source_path, 'r') as f:
content = f.read()
# Convert relative links
content = convert_relative_links(content, source_file)
# Write to wiki page
with open(target_path, 'w') as f:
f.write(content)
return True
except Exception as e:
print(f"Error processing {source_file}: {e}")
return False
def main():
# Check if wiki directory exists
if not os.path.exists(WIKI_PATH):
print(f"Wiki path not found: {WIKI_PATH}")
sys.exit(1)
# Load mapping
mappings = load_mapping()
if not mappings:
print("No mappings found in the mapping file")
sys.exit(1)
print(f"Found {len(mappings)} mappings to process")
# Process each mapping
success_count = 0
for mapping in mappings:
source = mapping.get('source')
target = mapping.get('target')
if not source or not target:
print(f"Invalid mapping: {mapping}")
continue
if process_file(source, target):
success_count += 1
print(f"Successfully processed {success_count} of {len(mappings)} files")
# Exit with error if any file failed
if success_count < len(mappings):
sys.exit(1)
if __name__ == "__main__":
main()

View File

@ -1,18 +0,0 @@
# This file maps source markdown files to their target wiki pages
# format:
# - source: path/to/markdown/file.md
# target: Wiki-Page-Name
mappings:
- source: benchmarks/readme.md
target: Performance-of-phasicFlow
- source: benchmarks/helicalMixer/readme.md
target: Helical-Mixer-Benchmark
- source: benchmarks/rotatingDrum/readme.md
target: Rotating-Drum-Benchmark
- source: doc/mdDocs/howToBuild-V1.0.md
target: How-to-build-PhasicFlowv1.0
- source: tutorials/README.md
target: Tutorials
- source: doc/mdDocs/phasicFlowFeatures.md
target: Features-of-PhasicFlow
# Add more mappings as needed

View File

@ -1,60 +0,0 @@
name: Sync-Wiki
on:
push:
branches:
- main
paths:
- "**/*.md"
- ".github/workflows/sync-wiki.yml"
- ".github/workflows/markdownList.yml"
- ".github/scripts/sync-wiki.py"
workflow_dispatch:
jobs:
sync-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
path: repo
- name: Checkout Wiki
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}.wiki
path: wiki
continue-on-error: true
- name: Create Wiki Directory if Not Exists
run: |
if [ ! -d "wiki" ]; then
mkdir -p wiki
cd wiki
git init
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git remote add origin "https://github.com/${{ github.repository }}.wiki.git"
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install pyyaml
- name: Sync markdown files to Wiki
run: |
python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py
env:
GITHUB_REPOSITORY: ${{ github.repository }}
- name: Push changes to wiki
run: |
cd wiki
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
if git status --porcelain | grep .; then
git commit -m "Auto sync wiki from main repository"
git push --set-upstream https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.wiki.git master -f
else
echo "No changes to commit"
fi

7
.gitignore vendored
View File

@ -1,12 +1,6 @@
# files
.clang-format
.vscode
.dependencygraph
# Prerequisites # Prerequisites
*.d *.d
# Compiled Object files # Compiled Object files
*.slo *.slo
*.lo *.lo
@ -44,7 +38,6 @@ bin/**
lib/** lib/**
test*/** test*/**
**/**notnow **/**notnow
doc/code-documentation/
doc/DTAGS doc/DTAGS
# all possible time folders # all possible time folders
**/[0-9] **/[0-9]

View File

@ -1,64 +1,75 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR) cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
# set the project name and version # set the project name and version
project(phasicFlow VERSION 1.0 ) project(phasicFlow VERSION 0.1 )
set(CMAKE_CXX_STANDARD 20 CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_INSTALL_PREFIX ${phasicFlow_SOURCE_DIR} CACHE PATH "Install path of phasicFlow" FORCE) set(CMAKE_INSTALL_PREFIX ${phasicFlow_SOURCE_DIR} CACHE PATH "Install path of phasicFlow" FORCE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "build type") set(CMAKE_BUILD_TYPE Release CACHE STRING "build type" FORCE)
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE)
message(STATUS ${CMAKE_INSTALL_PREFIX})
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LAMBDA)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENMP)
mark_as_advanced(FORCE var Kokkos_ENABLE_SERIAL)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LAMBDA)
mark_as_advanced(FORCE var BUILD_SHARED_LIBS) mark_as_advanced(FORCE var BUILD_SHARED_LIBS)
message(STATUS "Install prefix is:" ${CMAKE_INSTALL_PREFIX}) option(USE_STD_PARALLEL_ALG "Use TTB std parallel algorithms" ON)
include(cmake/globals.cmake)
option(pFlow_STD_Parallel_Alg "Use TTB std parallel algorithms" ON)
option(pFlow_Build_Serial "Build phasicFlow and backends for serial execution" OFF) option(pFlow_Build_Serial "Build phasicFlow and backends for serial execution" OFF)
option(pFlow_Build_OpenMP "Build phasicFlow and backends for OpenMP execution" OFF) option(pFlow_Build_OpenMP "Build phasicFlow and backends for OpenMP execution" OFF)
option(pFlow_Build_Cuda "Build phasicFlow and backends for Cuda execution" OFF) option(pFlow_Build_Cuda "Build phasicFlow and backends for Cuda execution" OFF)
option(pFlow_Build_Double "Build phasicFlow with double precision floating-oint variables" ON) option(pFlow_Build_Double "Build phasicFlow with double precision variables" ON)
option(pFlow_Build_MPI "Build for MPI parallelization. This will enable multi-gpu run, CPU run on clusters (distributed memory machine). Use this combination Cuda+MPI, OpenMP + MPI or Serial+MPI " OFF)
#for installing the required packages set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE)
include(cmake/preReq.cmake)
if(pFlow_Build_Serial) if(pFlow_Build_Serial)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE) set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "OpenMP execution" FORCE) set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "OpenMP execution" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE) set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE) set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_CONSTEXPR OFF CACHE BOOL "Enable constexpr on cuda code" FORCE)
elseif(pFlow_Build_OpenMP ) elseif(pFlow_Build_OpenMP )
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE) set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "OpenMP execution" FORCE) set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "OpenMP execution" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE) set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE) set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_DEFAULT_HOST_PARALLEL_EXECUTION_SPACE Serial CACHE STRING "" FORCE) set(Kokkos_DEFAULT_HOST_PARALLEL_EXECUTION_SPACE SERIAL CACHE STRING "" FORCE)
set(Kokkos_DEFAULT_DEVICE_PARALLEL_EXECUTION_SPACE OpenMP CACHE STRING "" FORCE)
set(Kokkos_ENABLE_CUDA_CONSTEXPR OFF CACHE BOOL "Enable constexpr on cuda code" FORCE)
elseif(pFlow_Build_Cuda) elseif(pFlow_Build_Cuda)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE) set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "OpenMP execution" FORCE) set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "OpenMP execution" FORCE)
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "Cuda execution" FORCE) set(Kokkos_ENABLE_CUDA ON CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_LAMBDA ON CACHE BOOL "Cuda execution" FORCE) set(Kokkos_ENABLE_CUDA_LAMBDA ON CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_CONSTEXPR ON CACHE BOOL "Enable constexpr on cuda code" FORCE)
endif() endif()
if(pFlow_Build_MPI)
find_package(MPI REQUIRED)
endif() include(cmake/globals.cmake)
message(STATUS "Valid file extensions are ${validFiles}")
include(cmake/makeLibraryGlobals.cmake) include(cmake/makeLibraryGlobals.cmake)
include(cmake/makeExecutableGlobals.cmake) include(cmake/makeExecutableGlobals.cmake)
configure_file(phasicFlowConfig.H.in phasicFlowConfig.H) configure_file(phasicFlowConfig.H.in phasicFlowConfig.H)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#add a global include directory #add a global include directory
include_directories(src/setHelpers src/demComponent "${PROJECT_BINARY_DIR}") include_directories(src/setHelpers src/demComponent "${PROJECT_BINARY_DIR}")
#main subdirectories of the code
set(Kokkos_Source_DIR)
if(DEFINED ENV{Kokkos_DIR})
set(Kokkos_Source_DIR $ENV{Kokkos_DIR})
# add_subdirectory($ENV{Kokkos_DIR} ${phasicFlow_BINARY_DIR}/kokkos)
# message(STATUS "Kokkos directory is $ENV{Kokkos_DIR}")
else()
# add_subdirectory($ENV{HOME}/Kokkos/kokkos ${phasicFlow_BINARY_DIR}/kokkos)
set(Kokkos_Source_DIR $ENV{HOME}/Kokkos/kokkos)
endif()
message(STATUS "Kokkos source directory is ${Kokkos_Source_DIR}")
add_subdirectory(${Kokkos_Source_DIR} ${phasicFlow_BINARY_DIR}/kokkos)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(solvers) add_subdirectory(solvers)
@ -66,9 +77,12 @@ add_subdirectory(solvers)
add_subdirectory(utilities) add_subdirectory(utilities)
add_subdirectory(DEMSystems) add_subdirectory(DEMSystems)
#add_subdirectory(testIO)
install(FILES "${PROJECT_BINARY_DIR}/phasicFlowConfig.H" install(FILES "${PROJECT_BINARY_DIR}/phasicFlowConfig.H"
DESTINATION include) DESTINATION include
)
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")

View File

@ -1,11 +1,9 @@
set(SourceFiles set(SourceFiles
domainDistribute/domainDistribute.cpp
DEMSystem/DEMSystem.cpp DEMSystem/DEMSystem.cpp
sphereDEMSystem/sphereFluidParticles.cpp
sphereDEMSystem/sphereDEMSystem.cpp sphereDEMSystem/sphereDEMSystem.cpp
grainDEMSystem/grainFluidParticles.cpp sphereDEMSystem/sphereFluidParticles.cpp
grainDEMSystem/grainDEMSystem.cpp domainDistribute/domainDistribute.cpp
) )
set(link_libs Kokkos::kokkos phasicFlow Particles Geometry Property Interaction Interaction Utilities) set(link_libs Kokkos::kokkos phasicFlow Particles Geometry Property Interaction Interaction Utilities)

View File

@ -33,14 +33,14 @@ pFlow::DEMSystem::DEMSystem(
ControlDict_() ControlDict_()
{ {
REPORT(0)<<"Initializing host/device execution spaces . . . \n"; REPORT(0)<<"Initializing host/device execution spaces . . . \n";
REPORT(1)<<"Host execution space is "<< Green_Text(DefaultHostExecutionSpace::name())<<END_REPORT; REPORT(1)<<"Host execution space is "<< greenText(DefaultHostExecutionSpace::name())<<endREPORT;
REPORT(1)<<"Device execution space is "<<Green_Text(DefaultExecutionSpace::name())<<END_REPORT; REPORT(1)<<"Device execution space is "<<greenText(DefaultExecutionSpace::name())<<endREPORT;
// initialize Kokkos // initialize Kokkos
Kokkos::initialize( argc, argv ); Kokkos::initialize( argc, argv );
REPORT(0)<<"\nCreating Control repository . . ."<<END_REPORT; REPORT(0)<<"\nCreating Control repository . . ."<<endREPORT;
Control_ = makeUnique<systemControl>( Control_ = makeUnique<systemControl>(
ControlDict_.startTime(), ControlDict_.startTime(),
ControlDict_.endTime(), ControlDict_.endTime(),
@ -87,3 +87,4 @@ pFlow::uniquePtr<pFlow::DEMSystem>
return nullptr; return nullptr;
} }

View File

@ -25,7 +25,6 @@ Licence:
#include "types.hpp" #include "types.hpp"
#include "span.hpp" #include "span.hpp"
#include "box.hpp"
#include "virtualConstructor.hpp" #include "virtualConstructor.hpp"
#include "uniquePtr.hpp" #include "uniquePtr.hpp"
#include "systemControl.hpp" #include "systemControl.hpp"
@ -61,7 +60,6 @@ public:
DEMSystem(const DEMSystem&)=delete; DEMSystem(const DEMSystem&)=delete;
/// @brief no assignment
DEMSystem& operator = (const DEMSystem&)=delete; DEMSystem& operator = (const DEMSystem&)=delete;
create_vCtor( create_vCtor(
@ -113,34 +111,19 @@ public:
int32 numParInDomain(int32 di)const = 0; int32 numParInDomain(int32 di)const = 0;
virtual virtual
std::vector<int32> numParInDomains()const = 0; std::vector<int32> numParInDomain()const = 0;
virtual virtual
span<const int32> parIndexInDomain(int32 domIndx)const = 0; span<const int32> parIndexInDomain(int32 di)const = 0;
virtual virtual
span<real> diameter() = 0; span<real> parDiameter() = 0;
virtual
span<real> courseGrainFactor() = 0;
virtual virtual
span<realx3> acceleration()=0; span<realx3> parVelocity() = 0;
virtual virtual
span<realx3> velocity() = 0; span<realx3> parPosition() = 0;
virtual
span<realx3> position() = 0;
virtual
span<realx3> rAcceleration()=0;
virtual
span<realx3> rVelocity() = 0;
virtual
span<realx3> rPosition() = 0;
virtual virtual
span<realx3> parFluidForce() = 0; span<realx3> parFluidForce() = 0;
@ -170,6 +153,7 @@ public:
bool iterate(real upToTime) = 0; bool iterate(real upToTime) = 0;
static static
uniquePtr<DEMSystem> uniquePtr<DEMSystem>
create( create(
@ -178,9 +162,11 @@ public:
int argc, int argc,
char* argv[]); char* argv[]);
}; };
} // pFlow } // pFlow
#endif // __DEMSystem_hpp__ #endif // __DEMSystem_hpp__

View File

@ -33,7 +33,7 @@ void pFlow::domainDistribute::clcDomains(const std::vector<box>& domains)
pFlow::domainDistribute::domainDistribute( pFlow::domainDistribute::domainDistribute(
const std::vector<box>& domains, const Vector<box>& domains,
real maxBoundingBox) real maxBoundingBox)
: :
numDomains_(domains.size()), numDomains_(domains.size()),
@ -47,10 +47,10 @@ maxBoundingBoxSize_(maxBoundingBox)
} }
bool pFlow::domainDistribute::locateParticles( bool pFlow::domainDistribute::locateParticles(
ViewType1D<realx3,HostSpace> points, const pFlagTypeHost& mask) ViewType1D<realx3,HostSpace> points, includeMask mask)
{ {
const rangeU32 activeRange = mask.activeRange(); range activeRange = mask.activeRange();
for(int32 di=0; di<numDomains_; di++) for(int32 di=0; di<numDomains_; di++)
@ -59,7 +59,7 @@ bool pFlow::domainDistribute::locateParticles(
} }
for(int32 i=activeRange.start(); i<activeRange.end(); i++) for(int32 i=activeRange.first; i<activeRange.second; i++)
{ {
if(mask(i)) if(mask(i))
{ {

View File

@ -43,16 +43,19 @@ protected:
int32Vector_H numParInDomain_; int32Vector_H numParInDomain_;
real maxBoundingBoxSize_; real maxBoundingBoxSize_;
real domainExtension_ = 1.0; real domainExtension_ = 1.0;
using includeMask = typename pointStructure::activePointsHost;
void clcDomains(const std::vector<box>& domains); void clcDomains(const std::vector<box>& domains);
public: public:
domainDistribute( domainDistribute(
const std::vector<box>& domains, const Vector<box>& domains,
real maxBoundingBox); real maxBoundingBox);
~domainDistribute()=default; ~domainDistribute()=default;
@ -75,7 +78,7 @@ public:
{ {
return return
span<const int32>( span<const int32>(
particlesInDomains_[di].hostViewAll().data(), particlesInDomains_[di].hostVectorAll().data(),
numParInDomain_[di] numParInDomain_[di]
); );
} }
@ -88,7 +91,7 @@ public:
//template<typename includeMask> //template<typename includeMask>
bool locateParticles( bool locateParticles(
ViewType1D<realx3,HostSpace> points, const pFlagTypeHost& mask); ViewType1D<realx3,HostSpace> points, includeMask mask);
}; };

View File

@ -1,273 +0,0 @@
/*------------------------------- 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 "grainDEMSystem.hpp"
#include "vocabs.hpp"
bool pFlow::grainDEMSystem::loop()
{
do
{
//
if(! insertion_().insertParticles(
Control().time().currentIter(),
Control().time().currentTime(),
Control().time().dt() ) )
{
fatalError<<
"particle insertion failed in grainDEMSystem.\n";
return false;
}
geometry_->beforeIteration();
interaction_->beforeIteration();
particles_->beforeIteration();
interaction_->iterate();
particles_->iterate();
geometry_->iterate();
particles_->afterIteration();
geometry_->afterIteration();
}while(Control()++);
return true;
}
pFlow::grainDEMSystem::grainDEMSystem(
word demSystemName,
const std::vector<box>& domains,
int argc,
char* argv[],
bool requireRVel)
:
DEMSystem(demSystemName, domains, argc, argv),
requireRVel_(requireRVel)
{
REPORT(0)<<"\nReading proprties . . . "<<END_REPORT;
property_ = makeUnique<property>(
propertyFile__,
Control().caseSetup().path());
REPORT(0)<< "\nCreating surface geometry for grainDEMSystem . . . "<<END_REPORT;
geometry_ = geometry::create(Control(), Property());
REPORT(0)<<"Reading shape dictionary ..."<<END_REPORT;
grains_ = makeUnique<grainShape>(
pFlow::shapeFile__,
&Control().caseSetup(),
Property() );
REPORT(0)<<"\nReading grain particles . . ."<<END_REPORT;
particles_ = makeUnique<grainFluidParticles>(Control(), grains_());
insertion_ = makeUnique<grainInsertion>(
particles_(),
particles_().grains());
REPORT(0)<<"\nCreating interaction model for grain-grain contact and grain-wall contact . . ."<<END_REPORT;
interaction_ = interaction::create(
Control(),
Particles(),
Geometry());
auto maxD = maxBounndingSphereSize();
particleDistribution_ = makeUnique<domainDistribute>(domains, maxD);
}
pFlow::grainDEMSystem::~grainDEMSystem()
{
}
bool pFlow::grainDEMSystem::updateParticleDistribution(
real extentFraction,
const std::vector<box> domains)
{
if(!particleDistribution_->changeDomainsSize(
extentFraction,
maxBounndingSphereSize(),
domains))
{
fatalErrorInFunction<<
"cannot change the domain size"<<endl;
return false;
}
if(!particleDistribution_->locateParticles(
positionHost_,
particles_->pStruct().activePointsMaskHost()))
{
fatalErrorInFunction<<
"error in locating particles among sub-domains"<<endl;
return false;
}
return true;
}
pFlow::int32
pFlow::grainDEMSystem::numParInDomain(int32 di)const
{
return particleDistribution_().numParInDomain(di);
}
std::vector<pFlow::int32>
pFlow::grainDEMSystem::numParInDomains()const
{
const auto& distribute = particleDistribution_();
int32 numDomains = distribute.numDomains();
std::vector<int32> nums(numDomains);
for(int32 i=0; i<numDomains; i++)
{
nums[i] = distribute.numParInDomain(i);
}
return nums;
}
pFlow::span<const pFlow::int32>
pFlow::grainDEMSystem::parIndexInDomain(int32 di)const
{
return particleDistribution_->particlesInDomain(di);
}
pFlow::span<pFlow::real> pFlow::grainDEMSystem::diameter()
{
return span<real>(diameterHost_.data(), diameterHost_.size());
}
pFlow::span<pFlow::real> pFlow::grainDEMSystem::courseGrainFactor()
{
return span<real>(particles_->courseGrainFactorHost().data(), particles_->courseGrainFactorHost().size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::acceleration()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::velocity()
{
return span<realx3>(velocityHost_.data(), velocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::position()
{
return span<realx3>(positionHost_.data(), positionHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::rAcceleration()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::rVelocity()
{
return span<realx3>(rVelocityHost_.data(), rVelocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::rPosition()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::parFluidForce()
{
auto& hVec = particles_->fluidForceHost();
return span<realx3>(hVec.data(), hVec.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::parFluidTorque()
{
auto& hVec = particles_->fluidTorqueHost();
return span<realx3>(hVec.data(), hVec.size());
}
bool pFlow::grainDEMSystem::sendFluidForceToDEM()
{
particles_->fluidForceHostUpdatedSync();
return true;
}
bool pFlow::grainDEMSystem::sendFluidTorqueToDEM()
{
particles_->fluidTorqueHostUpdatedSync();
return true;
}
bool pFlow::grainDEMSystem::beforeIteration()
{
velocityHost_ = std::as_const(particles_()).velocity().hostView();
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
diameterHost_ = particles_->diameter().hostView();
if(requireRVel_)
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
return true;
}
bool pFlow::grainDEMSystem::iterate(
real upToTime,
real timeToWrite,
word timeName)
{
Control().time().setStopAt(upToTime);
Control().time().setOutputToFile(timeToWrite, timeName);
return loop();
return true;
}
bool pFlow::grainDEMSystem::iterate(real upToTime)
{
Control().time().setStopAt(upToTime);
return loop();
return true;
}
pFlow::real
pFlow::grainDEMSystem::maxBounndingSphereSize()const
{
real minD, maxD;
particles_->boundingSphereMinMax(minD, maxD);
return maxD;
}

View File

@ -1,165 +0,0 @@
/*------------------------------- 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.
-----------------------------------------------------------------------------*/
#ifndef __grainDEMSystem_hpp__
#define __grainDEMSystem_hpp__
#include "DEMSystem.hpp"
#include "property.hpp"
#include "uniquePtr.hpp"
#include "geometry.hpp"
#include "grainFluidParticles.hpp"
#include "interaction.hpp"
#include "Insertions.hpp"
#include "domainDistribute.hpp"
namespace pFlow
{
class grainDEMSystem
:
public DEMSystem
{
protected:
// protected members
uniquePtr<property> property_ = nullptr;
uniquePtr<geometry> geometry_ = nullptr;
uniquePtr<grainShape> grains_ = nullptr;
uniquePtr<grainFluidParticles> particles_ = nullptr;
uniquePtr<grainInsertion> insertion_ = nullptr;
uniquePtr<interaction> interaction_ = nullptr;
uniquePtr<domainDistribute> particleDistribution_=nullptr;
// to be used for CPU communications
ViewType1D<realx3, HostSpace> velocityHost_;
ViewType1D<realx3, HostSpace> positionHost_;
ViewType1D<real, HostSpace> diameterHost_;
bool requireRVel_ = false;
ViewType1D<realx3, HostSpace> rVelocityHost_;
// protected member functions
auto& Property()
{
return property_();
}
auto& Geometry()
{
return geometry_();
}
auto& Particles()
{
return particles_();
}
auto& Interaction()
{
return interaction_();
}
bool loop();
public:
TypeInfo("grainDEMSystem");
grainDEMSystem(
word demSystemName,
const std::vector<box>& domains,
int argc,
char* argv[],
bool requireRVel=false);
virtual ~grainDEMSystem();
grainDEMSystem(const grainDEMSystem&)=delete;
grainDEMSystem& operator = (const grainDEMSystem&)=delete;
add_vCtor(
DEMSystem,
grainDEMSystem,
word);
bool updateParticleDistribution(real extentFraction, const std::vector<box> domains) override;
int32 numParInDomain(int32 di)const override;
std::vector<int32> numParInDomains()const override;
span<const int32> parIndexInDomain(int32 di)const override;
span<real> diameter() override;
span<real> courseGrainFactor() override;
span<realx3> acceleration() override;
span<realx3> velocity() override;
span<realx3> position() override;
span<realx3> rAcceleration() override;
span<realx3> rVelocity() override;
span<realx3> rPosition() override;
span<realx3> parFluidForce() override;
span<realx3> parFluidTorque() override;
bool sendFluidForceToDEM() override;
bool sendFluidTorqueToDEM() override;
bool beforeIteration() override;
bool iterate(
real upToTime,
real timeToWrite,
word timeName) override;
bool iterate(real upToTime) override;
real maxBounndingSphereSize()const override;
};
} // pFlow
#endif

View File

@ -1,107 +0,0 @@
/*------------------------------- 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 "grainFluidParticles.hpp"
#include "grainFluidParticlesKernels.hpp"
void pFlow::grainFluidParticles::checkHostMemory()
{
if(fluidForce_.size()!=fluidForceHost_.size())
{
resizeNoInit(fluidForceHost_, fluidForce_.size());
resizeNoInit(fluidTorqueHost_, fluidTorque_.size());
}
// copy the data (if required) from device to host
courseGrainFactorHost_ = coarseGrainFactor().hostView();
}
pFlow::grainFluidParticles::grainFluidParticles(
systemControl &control,
const grainShape& grains)
: grainParticles(control, grains),
fluidForce_(
objectFile(
"fluidForce",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_ALWAYS),
dynPointStruct(),
zero3),
fluidTorque_(
objectFile(
"fluidTorque",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_NEVER),
dynPointStruct(),
zero3)
{
checkHostMemory();
}
bool pFlow::grainFluidParticles::beforeIteration()
{
grainParticles::beforeIteration();
checkHostMemory();
return true;
}
bool pFlow::grainFluidParticles::iterate()
{
const auto ti = this->TimeInfo();
accelerationTimer().start();
pFlow::grainFluidParticlesKernels::acceleration(
control().g(),
mass().deviceViewAll(),
contactForce().deviceViewAll(),
fluidForce_.deviceViewAll(),
I().deviceViewAll(),
contactTorque().deviceViewAll(),
fluidTorque_.deviceViewAll(),
pStruct().activePointsMaskDevice(),
acceleration().deviceViewAll(),
rAcceleration().deviceViewAll()
);
accelerationTimer().end();
intCorrectTimer().start();
dynPointStruct().correct(ti.dt());
rVelIntegration().correct(ti.dt(), rVelocity(), rAcceleration());
intCorrectTimer().end();
return true;
}
void pFlow::grainFluidParticles::fluidForceHostUpdatedSync()
{
copy(fluidForce_.deviceView(), fluidForceHost_);
return;
}
void pFlow::grainFluidParticles::fluidTorqueHostUpdatedSync()
{
copy(fluidTorque_.deviceView(), fluidTorqueHost_);
return;
}

View File

@ -1,105 +0,0 @@
/*------------------------------- 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.
-----------------------------------------------------------------------------*/
/*!
@class pFlow::grainFluidParticles
@brief Class for managing grain particles with fluid interactions
This is a top-level class that contains the essential components for
defining grain prticles with fluid interactions in a DEM simulation.
*/
#ifndef __grainFluidParticles_hpp__
#define __grainFluidParticles_hpp__
#include "grainParticles.hpp"
namespace pFlow
{
class grainFluidParticles
:
public grainParticles
{
protected:
/// pointField of rotational acceleration of particles on device
realx3PointField_D fluidForce_;
hostViewType1D<realx3> fluidForceHost_;
realx3PointField_D fluidTorque_;
hostViewType1D<realx3> fluidTorqueHost_;
hostViewType1D<real> courseGrainFactorHost_;
void checkHostMemory();
public:
/// construct from systemControl and property
grainFluidParticles(systemControl &control, const grainShape& grains);
~grainFluidParticles() override = default;
/// before iteration step
bool beforeIteration() override;
/// iterate particles
bool iterate() override;
auto& fluidForce()
{
return fluidForce_;
}
auto& fluidTorque()
{
return fluidTorque_;
}
auto& fluidForceHost()
{
return fluidForceHost_;
}
auto& fluidTorqueHost()
{
return fluidTorqueHost_;
}
auto& courseGrainFactorHost()
{
return courseGrainFactorHost_;
}
void fluidForceHostUpdatedSync();
void fluidTorqueHostUpdatedSync();
}; //grainFluidParticles
} // pFlow
#endif //__sphereFluidParticles_hpp__

View File

@ -1,79 +0,0 @@
/*------------------------------- 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.
-----------------------------------------------------------------------------*/
#ifndef __grainFluidParticlesKernels_hpp__
#define __grainFluidParticlesKernels_hpp__
namespace pFlow::grainFluidParticlesKernels
{
using rpAcceleration = Kokkos::RangePolicy<
DefaultExecutionSpace,
Kokkos::Schedule<Kokkos::Static>,
Kokkos::IndexType<int32>
>;
template<typename IncludeFunctionType>
void acceleration(
realx3 g,
deviceViewType1D<real> mass,
deviceViewType1D<realx3> force,
deviceViewType1D<realx3> fluidForce,
deviceViewType1D<real> I,
deviceViewType1D<realx3> torque,
deviceViewType1D<realx3> fluidTorque,
IncludeFunctionType incld,
deviceViewType1D<realx3> lAcc,
deviceViewType1D<realx3> rAcc
)
{
auto activeRange = incld.activeRange();
if(incld.isAllActive())
{
Kokkos::parallel_for(
"pFlow::grainParticlesKernels::acceleration",
rpAcceleration(activeRange.first, activeRange.second),
LAMBDA_HD(int32 i){
lAcc[i] = (force[i]+fluidForce[i])/mass[i] + g;
rAcc[i] = (torque[i]+fluidTorque[i])/I[i];
});
}
else
{
Kokkos::parallel_for(
"pFlow::grainParticlesKernels::acceleration",
rpAcceleration(activeRange.first, activeRange.second),
LAMBDA_HD(int32 i){
if(incld(i))
{
lAcc[i] = (force[i]+fluidForce[i])/mass[i] + g;
rAcc[i] = (torque[i]+fluidTorque[i])/I[i];
}
});
}
Kokkos::fence();
}
}
#endif

View File

@ -19,7 +19,6 @@ Licence:
-----------------------------------------------------------------------------*/ -----------------------------------------------------------------------------*/
#include "sphereDEMSystem.hpp" #include "sphereDEMSystem.hpp"
#include "vocabs.hpp"
bool pFlow::sphereDEMSystem::loop() bool pFlow::sphereDEMSystem::loop()
{ {
@ -27,15 +26,16 @@ bool pFlow::sphereDEMSystem::loop()
do do
{ {
// //
if(! insertion_().insertParticles( if(! insertion_().insertParticles(
Control().time().currentIter(),
Control().time().currentTime(), Control().time().currentTime(),
Control().time().dt() ) ) Control().time().dt() ) )
{ {
fatalError<< fatalError<<
"particle insertion failed in sphereDEMSystem.\n"; "particle insertion failed in sphereDFlow solver.\n";
return false; return false;
} }
geometry_->beforeIteration(); geometry_->beforeIteration();
@ -63,37 +63,29 @@ pFlow::sphereDEMSystem::sphereDEMSystem(
word demSystemName, word demSystemName,
const std::vector<box>& domains, const std::vector<box>& domains,
int argc, int argc,
char* argv[], char* argv[])
bool requireRVel)
: :
DEMSystem(demSystemName, domains, argc, argv), DEMSystem(demSystemName, domains, argc, argv)
requireRVel_(requireRVel)
{ {
REPORT(0)<<"\nReading proprties . . . "<<END_REPORT; REPORT(0)<<"\nReading proprties . . . "<<endREPORT;
property_ = makeUnique<property>( property_ = makeUnique<property>(
propertyFile__, Control().caseSetup().path()+propertyFile__);
Control().caseSetup().path());
REPORT(0)<< "\nCreating surface geometry for sphereDEMSystem . . . "<<END_REPORT; REPORT(0)<< "\nCreating surface geometry for sphereDEMSystem . . . "<<endREPORT;
geometry_ = geometry::create(Control(), Property()); geometry_ = geometry::create(Control(), Property());
REPORT(0)<<"Reading shapes dictionary..."<<END_REPORT;
spheres_ = makeUnique<sphereShape>(
pFlow::shapeFile__,
&Control().caseSetup(),
Property());
REPORT(0)<<"\nReading sphere particles . . ."<<END_REPORT; REPORT(0)<<"\nReading sphere particles . . ."<<endREPORT;
particles_ = makeUnique<sphereFluidParticles>(Control(), spheres_()); particles_ = makeUnique<sphereFluidParticles>(Control(), Property());
insertion_ = makeUnique<sphereInsertion>( insertion_ = makeUnique<sphereInsertion>(
Control().caseSetup().path()+insertionFile__,
particles_(), particles_(),
particles_().spheres()); particles_().shapes());
REPORT(0)<<"\nCreating interaction model for sphere-sphere contact and sphere-wall contact . . ."<<END_REPORT; REPORT(0)<<"\nCreating interaction model for sphere-sphere contact and sphere-wall contact . . ."<<endREPORT;
interaction_ = interaction::create( interaction_ = interaction::create(
Control(), Control(),
Particles(), Particles(),
@ -106,7 +98,6 @@ pFlow::sphereDEMSystem::sphereDEMSystem(
} }
pFlow::sphereDEMSystem::~sphereDEMSystem() pFlow::sphereDEMSystem::~sphereDEMSystem()
{ {
@ -128,8 +119,8 @@ bool pFlow::sphereDEMSystem::updateParticleDistribution(
} }
if(!particleDistribution_->locateParticles( if(!particleDistribution_->locateParticles(
positionHost_, parPosition_,
particles_->pStruct().activePointsMaskHost())) particles_->pStruct().activePointsMaskH()))
{ {
fatalErrorInFunction<< fatalErrorInFunction<<
"error in locating particles among sub-domains"<<endl; "error in locating particles among sub-domains"<<endl;
@ -146,7 +137,7 @@ pFlow::int32
} }
std::vector<pFlow::int32> std::vector<pFlow::int32>
pFlow::sphereDEMSystem::numParInDomains()const pFlow::sphereDEMSystem::numParInDomain()const
{ {
const auto& distribute = particleDistribution_(); const auto& distribute = particleDistribution_();
int32 numDomains = distribute.numDomains(); int32 numDomains = distribute.numDomains();
@ -165,56 +156,31 @@ pFlow::sphereDEMSystem::parIndexInDomain(int32 di)const
return particleDistribution_->particlesInDomain(di); return particleDistribution_->particlesInDomain(di);
} }
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::diameter() pFlow::span<pFlow::real> pFlow::sphereDEMSystem::parDiameter()
{ {
return span<real>(diameterHost_.data(), diameterHost_.size()); return span<real>(parDiameter_.data(), parDiameter_.size());
} }
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::courseGrainFactor() pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parVelocity()
{ {
return span<real>(nullptr, 0); return span<realx3>(parVelocity_.data(), parVelocity_.size());
} }
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::acceleration() pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parPosition()
{ {
return span<realx3>(nullptr, 0); return span<realx3>(parPosition_.data(), parPosition_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::velocity()
{
return span<realx3>(velocityHost_.data(), velocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::position()
{
return span<realx3>(positionHost_.data(), positionHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::rAcceleration()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::rVelocity()
{
return span<realx3>(rVelocityHost_.data(), rVelocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::rPosition()
{
return span<realx3>(nullptr, 0);
} }
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parFluidForce() pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parFluidForce()
{ {
auto& hVec = particles_->fluidForceHost(); auto& hVec = particles_->fluidForceHostAll();
return span<realx3>(hVec.data(), hVec.size()); return span<realx3>(hVec.data(), hVec.size());
} }
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parFluidTorque() pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parFluidTorque()
{ {
auto& hVec = particles_->fluidTorqueHost(); auto& hVec = particles_->fluidTorqueHostAll();
return span<realx3>(hVec.data(), hVec.size()); return span<realx3>(hVec.data(), hVec.size());
} }
@ -232,14 +198,9 @@ bool pFlow::sphereDEMSystem::sendFluidTorqueToDEM()
bool pFlow::sphereDEMSystem::beforeIteration() bool pFlow::sphereDEMSystem::beforeIteration()
{ {
velocityHost_ = std::as_const(particles_()).velocity().hostView(); parVelocity_ = particles_->dynPointStruct().velocityHostAll();
positionHost_ = std::as_const(particles_()).pointPosition().hostView(); parPosition_ = particles_->dynPointStruct().pointPositionHostAll();
diameterHost_ = particles_->diameter().hostView(); parDiameter_ = particles_->diameter().hostVectorAll();
if(requireRVel_)
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
return true; return true;
} }

View File

@ -42,31 +42,24 @@ protected:
// protected members // protected members
uniquePtr<property> property_ = nullptr; uniquePtr<property> property_ = nullptr;
uniquePtr<geometry> geometry_ = nullptr; uniquePtr<geometry> geometry_ = nullptr;
uniquePtr<sphereShape> spheres_ = nullptr; uniquePtr<sphereFluidParticles> particles_ = nullptr;
uniquePtr<sphereFluidParticles> particles_ = nullptr; uniquePtr<sphereInsertion> insertion_ = nullptr;
uniquePtr<sphereInsertion> insertion_ = nullptr; uniquePtr<interaction> interaction_ = nullptr;
uniquePtr<interaction> interaction_ = nullptr; uniquePtr<domainDistribute> particleDistribution_=nullptr;
uniquePtr<domainDistribute> particleDistribution_=nullptr;
// to be used for CPU communications // to be used for CPU communications
ViewType1D<realx3, HostSpace> velocityHost_; ViewType1D<realx3, HostSpace> parVelocity_;
ViewType1D<realx3, HostSpace> positionHost_; ViewType1D<realx3, HostSpace> parPosition_;
ViewType1D<real, HostSpace> diameterHost_;
bool requireRVel_ = false;
ViewType1D<realx3, HostSpace> rVelocityHost_;
ViewType1D<real, HostSpace> parDiameter_;
// protected member functions // protected member functions
auto& Property() auto& Property()
@ -99,8 +92,7 @@ public:
word demSystemName, word demSystemName,
const std::vector<box>& domains, const std::vector<box>& domains,
int argc, int argc,
char* argv[], char* argv[]);
bool requireRVel=false);
virtual ~sphereDEMSystem(); virtual ~sphereDEMSystem();
@ -118,25 +110,15 @@ public:
int32 numParInDomain(int32 di)const override; int32 numParInDomain(int32 di)const override;
std::vector<int32> numParInDomains()const override; std::vector<int32> numParInDomain()const override;
span<const int32> parIndexInDomain(int32 di)const override; span<const int32> parIndexInDomain(int32 di)const override;
span<real> diameter() override; span<real> parDiameter() override;
span<real> courseGrainFactor() override; span<realx3> parVelocity() override;
span<realx3> acceleration() override; span<realx3> parPosition() override;
span<realx3> velocity() override;
span<realx3> position() override;
span<realx3> rAcceleration() override;
span<realx3> rVelocity() override;
span<realx3> rPosition() override;
span<realx3> parFluidForce() override; span<realx3> parFluidForce() override;

View File

@ -21,85 +21,85 @@ Licence:
#include "sphereFluidParticles.hpp" #include "sphereFluidParticles.hpp"
#include "sphereFluidParticlesKernels.hpp" #include "sphereFluidParticlesKernels.hpp"
void pFlow::sphereFluidParticles::checkHostMemory()
{
if(fluidForce_.size()!=fluidForceHost_.size())
{
resizeNoInit(fluidForceHost_, fluidForce_.size());
resizeNoInit(fluidTorqueHost_, fluidTorque_.size());
}
}
pFlow::sphereFluidParticles::sphereFluidParticles( pFlow::sphereFluidParticles::sphereFluidParticles(
systemControl &control, systemControl &control,
const sphereShape& shpShape) const property& prop
: sphereParticles(control, shpShape), )
fluidForce_( :
objectFile( sphereParticles(control, prop),
"fluidForce", fluidForce_(
"", this->time().emplaceObject<realx3PointField_HD>(
objectFile::READ_IF_PRESENT, objectFile(
objectFile::WRITE_ALWAYS), "fluidForce",
dynPointStruct(), "",
zero3), objectFile::READ_IF_PRESENT,
fluidTorque_( objectFile::WRITE_ALWAYS
objectFile( ),
"fluidTorque", pStruct(),
"", zero3
objectFile::READ_IF_PRESENT, )
objectFile::WRITE_NEVER), ),
dynPointStruct(), fluidTorque_(
zero3) this->time().emplaceObject<realx3PointField_HD>(
{ objectFile(
checkHostMemory(); "fluidTorque",
} "",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_ALWAYS
),
pStruct(),
zero3
)
)
{}
bool pFlow::sphereFluidParticles::beforeIteration() bool pFlow::sphereFluidParticles::beforeIteration()
{ {
sphereParticles::beforeIteration(); sphereParticles::beforeIteration();
checkHostMemory();
return true; return true;
} }
bool pFlow::sphereFluidParticles::iterate() bool pFlow::sphereFluidParticles::iterate()
{ {
const auto ti = this->TimeInfo();
accelerationTimer().start(); accelerationTimer_.start();
pFlow::sphereFluidParticlesKernels::acceleration( pFlow::sphereFluidParticlesKernels::acceleration(
control().g(), control().g(),
mass().deviceViewAll(), mass().deviceVectorAll(),
contactForce().deviceViewAll(), contactForce().deviceVectorAll(),
fluidForce_.deviceViewAll(), fluidForce().deviceVectorAll(),
I().deviceViewAll(), I().deviceVectorAll(),
contactTorque().deviceViewAll(), contactTorque().deviceVectorAll(),
fluidTorque_.deviceViewAll(), fluidTorque().deviceVectorAll(),
pStruct().activePointsMaskDevice(), pStruct().activePointsMaskD(),
acceleration().deviceViewAll(), accelertion().deviceVectorAll(),
rAcceleration().deviceViewAll() rAcceleration().deviceVectorAll()
); );
accelerationTimer().end(); accelerationTimer_.end();
intCorrectTimer().start(); intCorrectTimer_.start();
dynPointStruct().correct(ti.dt()); dynPointStruct_.correct(this->dt(), accelertion_);
rVelIntegration().correct(ti.dt(), rVelocity(), rAcceleration()); rVelIntegration_().correct(this->dt(), rVelocity_, rAcceleration_);
intCorrectTimer().end(); intCorrectTimer_.end();
return true; return true;
} }
void pFlow::sphereFluidParticles::fluidForceHostUpdatedSync() void pFlow::sphereFluidParticles::fluidForceHostUpdatedSync()
{ {
copy(fluidForce_.deviceView(), fluidForceHost_); fluidForce_.modifyOnHost();
fluidForce_.syncViews();
return; return;
} }
void pFlow::sphereFluidParticles::fluidTorqueHostUpdatedSync() void pFlow::sphereFluidParticles::fluidTorqueHostUpdatedSync()
{ {
copy(fluidTorque_.deviceView(), fluidTorqueHost_); fluidTorque_.modifyOnHost();
fluidTorque_.syncViews();
return; return;
} }

View File

@ -43,17 +43,12 @@ class sphereFluidParticles
protected: protected:
/// pointField of rotational acceleration of particles on device /// pointField of rotational acceleration of particles on device
realx3PointField_D fluidForce_; realx3PointField_HD& fluidForce_;
hostViewType1D<realx3> fluidForceHost_; realx3PointField_HD& fluidTorque_;
realx3PointField_D fluidTorque_;
hostViewType1D<realx3> fluidTorqueHost_; void zeroFluidForce_H()
void checkHostMemory();
/*void zeroFluidForce_H()
{ {
fluidForce_.fillHost(zero3); fluidForce_.fillHost(zero3);
} }
@ -61,12 +56,12 @@ protected:
void zeroFluidTorque_H() void zeroFluidTorque_H()
{ {
fluidTorque_.fillHost(zero3); fluidTorque_.fillHost(zero3);
}*/ }
public: public:
/// construct from systemControl and property /// construct from systemControl and property
sphereFluidParticles(systemControl &control, const sphereShape& shpShape); sphereFluidParticles(systemControl &control, const property& prop);
/// before iteration step /// before iteration step
bool beforeIteration() override; bool beforeIteration() override;
@ -86,16 +81,17 @@ public:
} }
auto& fluidForceHost() auto& fluidForceHostAll()
{ {
return fluidForceHost_; return fluidForce_.hostVectorAll();
} }
auto& fluidTorqueHost() auto& fluidTorqueHostAll()
{ {
return fluidTorqueHost_; return fluidTorque_.hostVectorAll();
} }
void fluidForceHostUpdatedSync(); void fluidForceHostUpdatedSync();
void fluidTorqueHostUpdatedSync(); void fluidTorqueHostUpdatedSync();

View File

@ -46,7 +46,7 @@ void acceleration(
{ {
auto activeRange = incld.activeRange(); auto activeRange = incld.activeRange();
if(incld.isAllActive()) if(incld.allActive())
{ {
Kokkos::parallel_for( Kokkos::parallel_for(
"pFlow::sphereParticlesKernels::acceleration", "pFlow::sphereParticlesKernels::acceleration",

View File

@ -1,76 +1,24 @@
<div align="center"> <div align ="center">
<img src="doc/phasicFlow_logo_github.png" style="width: 400px;" alt="PhasicFlow Logo"> <img src="doc/phasicFlow_logo_github.png" style="width: 400px;">
</div> </div>
## **PhasicFlow: High-Performance Discrete Element Method Simulations**
PhasicFlow is a robust, open-source C++ framework designed for the efficient simulation of granular materials using the Discrete Element Method (DEM). Leveraging parallel computing paradigms, PhasicFlow is capable of executing simulations on shared-memory multi-core architectures, including CPUs and NVIDIA GPUs (CUDA-enabled). The core parallelization strategy focuses on loop-level parallelism, enabling significant performance gains on modern hardware. Users can seamlessly transition between serial execution on standard PCs, parallel execution on multi-core CPUs (OpenMP), and accelerated simulations on GPUs. Currently, PhasicFlow supports simulations involving up to 80 million particles on a single desktop workstation. Detailed performance benchmarks are available on the [PhasicFlow Wiki](https://github.com/PhasicFlow/phasicFlow/wiki/Performance-of-phasicFlow). **PhasicFlow** is a parallel C++ code for performing DEM simulations. It can run on shared-memory multi-core computational units such as multi-core CPUs or GPUs (for now it works on CUDA-enabled GPUs). The parallelization method mainly relies on loop-level parallelization on a shared-memory computational unit. You can build and run PhasicFlow in serial mode on regular PCs, in parallel mode for multi-core CPUs, or build it for a GPU device to off-load computations to a GPU. In its current statues you can simulate millions of particles (up to 32M particles tested) on a single desktop computer. You can see the [performance tests of PhasicFlow](https://github.com/PhasicFlow/phasicFlow/wiki/Performance-of-phasicFlow) in the wiki page.
**Scalable Parallelism: MPI Integration** ## How to build?
You can build PhasicFlow for CPU and GPU executions. [Here is a complete step-by-step procedure](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-Build-PhasicFlow).
Ongoing development includes the integration of MPI-based parallelization with dynamic load balancing. This enhancement will extend PhasicFlow's capabilities to distributed memory environments, such as multi-GPU workstations and high-performance computing clusters. Upon completion, PhasicFlow will offer six distinct execution modes: ## Online code documentation
You can find a full documentation of the code, its features, and other related materials on [online documentation of the code](https://phasicflow.github.io/phasicFlow/)
1. **Serial Execution:** Single-core CPU. ## How to use PhasicFlow?
2. **Shared-Memory Parallelism:** Multi-core CPU (OpenMP). You can navigate into [tutorials folder](./tutorials) in the phasicFlow folder to see some simulation case setups. If you need more detailed discription, visit our [wiki page tutorials](https://github.com/PhasicFlow/phasicFlow/wiki/Tutorials).
3. **GPU Acceleration:** NVIDIA GPU (CUDA).
4. **Distributed-Memory Parallelism:** MPI.
5. **Hybrid Parallelism:** MPI + OpenMP.
6. **Multi-GPU Parallelism:** MPI + CUDA.
## **Build and Installation** ## [PhasicFlowPlus](https://github.com/PhasicFlow/PhasicFlowPlus)
PhasicFlowPlus is and extension to PhasicFlow for simulating particle-fluid systems using resolved and unresolved CFD-DEM. [See the repository of this package.](https://github.com/PhasicFlow/PhasicFlowPlus)
PhasicFlow can be compiled for both CPU and GPU execution.
* **Current Development (v-1.0):** Comprehensive build instructions are available [here](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-build-PhasicFlow%E2%80%90v%E2%80%901.0).
* **Latest Release (v-0.1):** Detailed build instructions are available [here](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-Build-PhasicFlow).
## **Comprehensive Documentation**
In-depth documentation, including code structure, features, and usage guidelines, is accessible via the [online documentation portal](https://phasicflow.github.io/phasicFlow/).
### **Tutorials and Examples**
Practical examples and simulation setups are provided in the [tutorials directory](./tutorials). For detailed explanations and step-by-step guides, please refer to the [tutorial section on the PhasicFlow Wiki](https://github.com/PhasicFlow/phasicFlow/wiki/Tutorials).
## Contributing to PhasicFlow
We welcome contributions to PhasicFlow! Whether you're a developer or a new user, there are many ways to get involved. Here's how you can help:
1. Bug Reports
2. Suggestions for better user experience
3. Feature request and algorithm improvements
4. Tutorials, Simulation Case Setups and documentation
5. Direct Code Contributions
For more details on how you can contribute to PhasicFlow see [this page](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-contribute-to-PhasicFlow).
## **PhasicFlowPlus: Coupled CFD-DEM Simulations**
PhasicFlowPlus is an extension of PhasicFlow that facilitates the simulation of particle-fluid systems using resolved and unresolved CFD-DEM methods. The repository for PhasicFlowPlus can be found [here](https://github.com/PhasicFlow/PhasicFlowPlus).
## How to cite PhasicFlow?
If you are using PhasicFlow in your research or industrial work, cite the following [article](https://www.sciencedirect.com/science/article/pii/S0010465523001662):
```
@article
{
NOROUZI2023108821,
title = {PhasicFlow: A parallel, multi-architecture open-source code for DEM simulations},
journal = {Computer Physics Communications},
volume = {291},
pages = {108821},
year = {2023},
issn = {0010-4655},
doi = {https://doi.org/10.1016/j.cpc.2023.108821},
url = {https://www.sciencedirect.com/science/article/pii/S0010465523001662},
author = {H.R. Norouzi},
keywords = {Discrete element method, Parallel computing, CUDA, GPU, OpenMP, Granular flow}
}
```
## **Dependencies** ## Supporting packages
* [Kokkos](https://github.com/kokkos/kokkos) from National Technology & Engineering Solutions of Sandia, LLC (NTESS)
* [CLI11 1.8](https://github.com/CLIUtils/CLI11) from University of Cincinnati.
PhasicFlow relies on the following external libraries:
* **Kokkos:** A community-led performance portability ecosystem within the Linux Foundation's High-Performance Software Foundation (HPSF). ([https://github.com/kokkos/kokkos](https://github.com/kokkos/kokkos))
* **CLI11 1.8:** A command-line interface parser developed by the University of Cincinnati. ([https://github.com/CLIUtils/CLI11](https://github.com/CLIUtils/CLI11))

View File

@ -1 +0,0 @@
# Helical Mixer Benchmark (phasicFlow v-1.0)

View File

@ -1,7 +0,0 @@
# Benchmarks
Benchmakrs has been done on two different simulations: a simulation with simple geometry (rotating drum) and a simulation with complex geometry (helical mixer).
- [rotating drum](./rotatingDrum/readme.md)
- [helical mixer](./helicalMixer/readme.md)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

View File

@ -1,96 +0,0 @@
# Rotating Drum Benchmark (phasicFlow v-1.0)
## Overview
This benchmark compares the performance of phasicFlow with a well-stablished commercial DEM software for simulating a rotating drum with varying particle counts (250k to 8M particles). The benchmark measures both computational efficiency and memory usage across different hardware configurations.
## Simulation Setup
<div align="center">
<img src="./images/commericalDEMsnapshot.png"/>
<div align="center">
<p>Figure 1. Commercial DEM simulation snapshot</p>
</div>
</div>
<div align="center">
<img src="./images/phasicFlow_snapshot.png"/>
<div align="center">
<p>Figure 2. phasicFlow simulation snapshot and visualized using Paraview</p>
</div>
</div>
### Hardware Specifications
<div align="center">
Table 1. Hardware specifications used for benchmarking.
</div>
| System | CPU | GPU | Operating System |
| :---------: | :----------------------: | :--------------------------: | :--------------: |
| Laptop | Intel i9-13900HX 2.2 GHz | NVIDIA GeForce RTX 4050Ti 6G | Windows 11 24H2 |
| Workstation | Intel Xeon 4210 2.2 GHz | NVIDIA RTX A4000 16G | Ubuntu 22.04 |
### Simulation Parameters
<div align="center">
Table 2. Parameters for rotating drum simulations.
</div>
| Case | Particle Diameter | Particle Count | Drum Length | Drum Radius |
| :-------: | :---------------: | :--------------: | :------------------: | :------------------: |
| 250k | 6 mm | 250,000 | 0.8 m | 0.2 m |
| 500k | 5 mm | 500,000 | 0.8 m | 0.2 m |
| 1M | 4 mm | 1,000,000 | 0.8 m | 0.2 m |
| 2M | 3 mm | 2,000,000 | 1.2 m | 0.2 m |
| 4M | 3 mm | 4,000,000 | 1.6 m | 0.2 m |
| 8M | 2 mm | 8,000,000 | 1.6 m | 0.2 m |
The time step for all simulations was set to 1.0e-5 seconds and the simulation ran for 4 seconds.
## Performance Comparison
### Execution Time
<div align="center">
Table 3. Total calculation time (minutes) for different configurations.
</div>
| Software | 250k | 500k | 1M | 2M | 4M | 8M |
| :---------------: | :----: | :-----: | :-----: | :-----: | :-----: | :------: |
| phasicFlow-4050Ti | 54 min | 111 min | 216 min | 432 min | - | - |
| Commercial DEM-4050Ti | 68 min | 136 min | 275 min | 570 min | - | - |
| phasicFlow-A4000 | 38 min | 73 min | 146 min | 293 min | 589 min | 1188 min |
The execution time scales linearly with particle count. phasicFlow demonstrates approximately:
- 20% faster calculation than the well-established commercial DEM software on the same hardware
- 30% performance improvement when using the NVIDIA RTX A4000 compared to the RTX 4050Ti
<div align="center">
<img src="./images/performance1.png"/>
<p>Figure 3. Calculation time comparison between phasicFlow and the well-established commercial DEM software.</p>
</div>
### Memory Usage
<div align="center">
Table 4. Memory consumption for different configurations.
</div>
| Software | 250k | 500k | 1M | 2M | 4M | 8M |
| :---------------: | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: |
| phasicFlow-4050Ti | 252 MB | 412 MB | 710 MB | 1292 MB | - | - |
| Commercial DEM-4050Ti | 485 MB | 897 MB | 1525 MB | 2724 MB | - | - |
| phasicFlow-A4000 | 344 MB | 480 MB | 802 MB | 1386 MB | 2590 MB | 4966 MB |
Memory efficiency comparison:
- phasicFlow uses approximately 0.7 GB of memory per million particles
- Commercial DEM software uses approximately 1.2 GB of memory per million particles
- phasicFlow shows ~42% lower memory consumption compared to the commercial alternative
- The memory usage scales linearly with particle count in both software packages. But due to memory limitations on GPUs, it is possible to run larger simulation on GPUs with phasicFlow.
## Run Your Own Benchmarks
The simulation case setup files are available in this folder for users interested in performing similar benchmarks on their own hardware. These files can be used to reproduce the tests and compare performance across different systems.

View File

@ -1,60 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -1,15 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.004); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -1,50 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 0.8);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -1,86 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.8); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.8); // first point of the wall
p2 ( 0.2 -0.2 0.8); // second point
p3 ( 0.2 0.2 0.8); // third point
p4 (-0.2 0.2 0.8); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -1,47 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.004; // minimum space between centers of particles
numPoints 1000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 0.79); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -1,34 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_1mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -1,60 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -1,15 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.006); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -1,50 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 0.8);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -1,86 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.8); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.8); // first point of the wall
p2 ( 0.2 -0.2 0.8); // second point
p3 ( 0.2 0.2 0.8); // third point
p4 (-0.2 0.2 0.8); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -1,47 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.006; // minimum space between centers of particles
numPoints 250000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 0.79); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -1,34 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_250KParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -1,60 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -1,15 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.003); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -1,7 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -1,21 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -1,50 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 1.2);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -1,86 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 1.2); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 1.2); // first point of the wall
p2 ( 0.2 -0.2 1.2); // second point
p3 ( 0.2 0.2 1.2); // third point
p4 (-0.2 0.2 1.2); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -1,47 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.003; // minimum space between centers of particles
numPoints 2000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 1.19); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -1,34 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_2mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -1,60 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -1,15 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.003); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -1,7 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -1,21 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -1,50 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 1.6);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -1,86 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 1.6); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 1.6); // first point of the wall
p2 ( 0.2 -0.2 1.6); // second point
p3 ( 0.2 0.2 1.6); // third point
p4 (-0.2 0.2 1.6); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -1,47 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.003; // minimum space between centers of particles
numPoints 4000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 1.59); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -1,34 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_4mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -1,60 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -1,15 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.005); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -1,7 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -1,21 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -1,50 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 0.8);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -1,86 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.8); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.8); // first point of the wall
p2 ( 0.2 -0.2 0.8); // second point
p3 ( 0.2 0.2 0.8); // third point
p4 (-0.2 0.2 0.8); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -1,47 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.005; // minimum space between centers of particles
numPoints 500000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 0.79); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -1,34 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_500KParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -1,60 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -1,15 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.002); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -1,7 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -1,21 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -1,50 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 1.6);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -1,86 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 1.6); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 1.6); // first point of the wall
p2 ( 0.2 -0.2 1.6); // second point
p3 ( 0.2 0.2 1.6); // third point
p4 (-0.2 0.2 1.6); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -1,47 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.003; // minimum space between centers of particles
numPoints 6000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 1.59); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -1,34 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_4mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -0,0 +1,59 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dicrionary;
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
1.0e6);
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
0.8e6);
nu (0.25 0.25 // Poisson's ratio [-]
0.25);
en (0.97 0.85 // coefficient of normal restitution
1.00);
et (1.0 1.0 // coefficient of tangential restitution
1.0);
mu (0.65 0.65 // dynamic friction
0.65);
mur (0.1 0.1 // rolling friction
0.1);
}
contactSearch
{
method NBS;
wallMapping cellMapping;
NBSInfo
{
updateFrequency 10; // each 20 timesteps, update neighbor list
sizeRatio 1.05; // bounding box size to particle diameter (max)
}
cellMappingInfo
{
updateFrequency 10; // each 20 timesteps, update neighbor list
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
}
}

View File

@ -0,0 +1,14 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particleInsertion;
objectType dicrionary;
active no; // is insertion active?
collisionCheck No; // not implemented for yes

View File

@ -0,0 +1,11 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName sphereDict;
objectType sphereShape;
names (glassBead); // names of shapes
diameters (0.003); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -0,0 +1,63 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
motionModel rotatingAxisMotion;
surfaces
{
cylinder
{
type cylinderWall;
p1 (0.0 0.0 0.0);
p2 (0.0 0.0 1.6);
radius1 0.2;
radius2 0.2;
resolution 24;
material wallMat;
motion rotAxis;
}
wall1
{
type planeWall;
p1 (-0.2 -0.2 0.0);
p2 ( 0.2 -0.2 0.0);
p3 ( 0.2 0.2 0.0);
p4 (-0.2 0.2 0.0);
material wallMat;
motion rotAxis;
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall;
p1 (-0.2 -0.2 1.6);
p2 ( 0.2 -0.2 1.6);
p3 ( 0.2 0.2 1.6);
p4 (-0.2 0.2 1.6);
material wallMat;
motion rotAxis;
}
}
// information for rotatingAxisMotion motion model
rotatingAxisMotionInfo
{
rotAxis
{
p1 (0.0 0.0 0.0);
p2 (0.0 0.0 1.0);
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}

View File

@ -0,0 +1,44 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method positionOrdered;
maxNumberOfParticles 4000001;
mortonSorting Yes;
cylinder // box for positioning particles
{
p1 ( 0.0 0.0 0.01); // lower corner point of the box
p2 ( 0.0 0.0 1.59); // upper corner point of the box
radius 0.195;
}
positionOrderedInfo
{
diameter 0.003; // minimum space between centers of particles
numPoints 4000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
}

View File

@ -0,0 +1,32 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;;
run rotatingDrum_1;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 10; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
domain
{
min (-0.2 -0.2 -0.0);
max ( 0.2 0.2 1.6);
}
integrationMethod AdamsBashforth3; // integration method
timersReport Yes;
timersReportInterval 0.01;

View File

@ -1,112 +0,0 @@
PF_cFlags="--description --help --version"
AllTimeFolders=
__getAllTime(){
# Initialize empty array for time folders
local time_folders=()
# Loop through all directories in current folder
for dir in */; do
# Remove trailing slash
dir=${dir%/}
# Check if directory name is a valid floating point number
# This pattern matches integers and floating point numbers
if [[ $dir =~ ^[0-9]+(\.[0-9]+)?$ ]]; then
time_folders+=("$dir")
fi
done
# Set completion reply to the time folders
COMPREPLY=("${time_folders[@]}")
AllTimeFolders="${time_folders[@]}"
}
__getFields(){
__getAllTime
local -A unique_files=()
# Files to exclude from suggestions
local exclude_files=("shapeHash" "pStructure" "particleInsertion" "p" "alpha" "U" "Sp" "Su" "phi")
declare -A exclude_dict
# Build exclude dictionary for faster lookups
for file in "${exclude_files[@]}"; do
exclude_dict["$file"]=1
done
for dir in $AllTimeFolders; do
# Skip if not a directory
[ ! -d "$dir" ] && continue
# Find all files in this time directory
while IFS= read -r filename; do
# Skip empty lines and excluded files
[ -z "$filename" ] || [ "${exclude_dict[$filename]+exists}" ] && continue
# Add to unique files
unique_files["$filename"]=1
done < <(find "$dir" -maxdepth 1 -type f -printf '%f\n')
done
# Set completion reply to the unique filenames
COMPREPLY=(${!unique_files[@]})
# Clear global variable
AllTimeFolders=
}
_pFlowToVTK(){
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
# Check if we're completing a field
local is_field=0
for ((i=1; i<COMP_CWORD; i++)); do
if [[ "${COMP_WORDS[i]}" == "--fields" ]]; then
is_field=1
break
fi
done
if [ "$prev" == "--time" ]; then
__getAllTime
elif [ "$prev" == "--fields" ] || [ $is_field -eq 1 ]; then
# We're completing field names
__getFields
# Filter the results based on the current word prefix
if [ -n "$cur" ]; then
local filtered=()
for item in "${COMPREPLY[@]}"; do
if [[ "$item" == "$cur"* ]]; then
filtered+=("$item")
fi
done
COMPREPLY=("${filtered[@]}")
fi
else
COMPREPLY=( $(compgen -W "$PF_cFlags --binary --no-geometry --no-particles --out-folder --time --separate-surfaces --fields" -- "$cur") )
fi
}
complete -F _pFlowToVTK pFlowToVTK
_postprocessPhasicFlow(){
if [ "$3" == "--time" ]; then
__getAllTime
else
COMPREPLY=( $(compgen -W "$PF_cFlags --out-folder --time --zeroFolder" -- "$2") )
fi
}
complete -F _postprocessPhasicFlow postprocessPhasicFlow
complete -W "$PF_cFlags --positionParticles-only --setFields-only --coupling" particlesPhasicFlow
complete -W "$PF_cFlags --coupling" geometryPhasicFlow
complete -W "$PF_cFlags --coupling" iterateGeometry
complete -W "$PF_cFlags" iterateSphereParticles
complete -W "$PF_cFlags" sphereGranFlow
complete -W "$PF_cFlags" grainGranFlow
complete -W "$PF_cFlags" checkPhasicFlow

View File

@ -1,7 +1,8 @@
export pFlow_PROJECT_VERSION=v-1.0 export pFlow_PROJECT_VERSION=v0.1
export pFlow_PROJECT=phasicFlow
export pFlow_PROJECT="phasicFlow-$pFlow_PROJECT_VERSION"
projectDir="$HOME/PhasicFlow" projectDir="$HOME/PhasicFlow"
kokkosDir="$HOME/Kokkos/kokkos" kokkosDir="$HOME/Kokkos/kokkos"
@ -19,8 +20,6 @@ export pFlow_SRC_DIR="$pFlow_PROJECT_DIR/src"
export Kokkos_DIR="$kokkosDir" export Kokkos_DIR="$kokkosDir"
export Zoltan_DIR="$projectDir/Zoltan"
# Cleanup variables (done as final statement for a clean exit code) # Cleanup variables (done as final statement for a clean exit code)
unset projectDir unset projectDir
@ -28,7 +27,5 @@ export PATH="$pFlow_BIN_DIR:$PATH"
export LD_LIBRARY_PATH="$pFlow_LIB_DIR:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$pFlow_LIB_DIR:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$Zoltan_DIR/lib:$LD_LIBRARY_PATH"
source $pFlow_PROJECT_DIR/cmake/autoComplete
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,52 +2,3 @@
set(validFiles) set(validFiles)
list(APPEND validFiles *.C *.cpp *.cxx *.c *.cu *.H *.hpp *.hxx *.h *.cuh) list(APPEND validFiles *.C *.cpp *.cxx *.c *.cu *.H *.hpp *.hxx *.h *.cuh)
macro(Kokkos_cmake_settings)
#mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LAMBDA)
mark_as_advanced(FORCE var Kokkos_CXX_STANDARD)
#mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_CONSTEXPR)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENMP)
mark_as_advanced(FORCE var Kokkos_ENABLE_SERIAL)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA)
mark_as_advanced(FORCE var Kokkos_ENABLE_HIP)
mark_as_advanced(FORCE var Kokkos_ENABLE_AGGRESSIVE_VECTORIZATION)
mark_as_advanced(FORCE var Kokkos_ENABLE_BENCHMARKS)
mark_as_advanced(FORCE var Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LDG_INTRINSIC)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_UVM)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEPRECATED_CODE_3)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEPRECATED_CODE_4)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEPRECATION_WARNINGS)
mark_as_advanced(FORCE var Kokkos_ENABLE_DESUL_ATOMICS_EXTERNAL)
mark_as_advanced(FORCE var Kokkos_ENABLE_EXAMPLES)
mark_as_advanced(FORCE var Kokkos_ENABLE_HEADER_SELF_CONTAINMENT_TESTS)
mark_as_advanced(FORCE var Kokkos_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS)
mark_as_advanced(FORCE var Kokkos_ENABLE_HIP_RELOCATABLE_DEVICE_CODE)
mark_as_advanced(FORCE var Kokkos_ENABLE_HPX)
mark_as_advanced(FORCE var Kokkos_ENABLE_HWLOC)
mark_as_advanced(FORCE var Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC)
mark_as_advanced(FORCE var Kokkos_ENABLE_IMPL_HPX_ASYNC_DISPATCH)
mark_as_advanced(FORCE var Kokkos_ENABLE_LARGE_MEM_TESTS)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK)
mark_as_advanced(FORCE var Kokkos_ENABLE_LIBQUADMATH)
mark_as_advanced(FORCE var Kokkos_ENABLE_LIBRT)
mark_as_advanced(FORCE var Kokkos_ENABLE_MEMKIND)
mark_as_advanced(FORCE var Kokkos_ENABLE_ONEDPL)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENACC)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENMPTARGET)
mark_as_advanced(FORCE var Kokkos_ENABLE_ROCM)
mark_as_advanced(FORCE var Kokkos_ENABLE_SYCL)
mark_as_advanced(FORCE var Kokkos_ENABLE_TESTS)
mark_as_advanced(FORCE var Kokkos_ENABLE_THREADS)
mark_as_advanced(FORCE var Kokkos_ENABLE_TUNING)
mark_as_advanced(FORCE var Kokkos_ENABLE_UNSUPPORTED_ARCHS)
mark_as_advanced(FORCE var Kokkos_HPX_DIR)
mark_as_advanced(FORCE var Kokkos_HWLOC_DIR)
mark_as_advanced(FORCE var Kokkos_MEMKIND_DIR)
mark_as_advanced(FORCE var Kokkos_ROCM_DIR)
mark_as_advanced(FORCE var Kokkos_THREADS_DIR)
endmacro()

View File

@ -31,8 +31,8 @@ target_include_directories(${target_name}
message(STATUS "\nCreating make file for executable ${target_name}") message(STATUS "\nCreating make file for executable ${target_name}")
message(STATUS " ${target_name} link libraries are: ${${target_link_libs}}") message(STATUS " ${target_name} link libraries are: ${${target_link_libs}}")
#message(STATUS " ${target_name} source files are: ${${source_files}}") message(STATUS " ${target_name} source files are: ${source_files}")
#message(STATUS " ${target_name} include dirs are: ${includeDirs}\n") message(STATUS " ${target_name} include dirs are: ${includeDirs}\n")
install(TARGETS ${target_name} DESTINATION bin) install(TARGETS ${target_name} DESTINATION bin)

View File

@ -41,8 +41,8 @@ target_include_directories(${target_name}
message(STATUS "\nCreating make file for library ${target_name}") message(STATUS "\nCreating make file for library ${target_name}")
message(STATUS " ${target_name} link libraries are: ${${target_link_libs}}") message(STATUS " ${target_name} link libraries are: ${${target_link_libs}}")
#message(STATUS " ${target_name} source files are: ${source_files}") message(STATUS " ${target_name} source files are: ${source_files}")
#message(STATUS " ${target_name} include dirs are: ${includeDirs}\n \n") message(STATUS " ${target_name} include dirs are: ${includeDirs}\n")
install(TARGETS ${target_name} DESTINATION lib) install(TARGETS ${target_name} DESTINATION lib)
install(FILES ${includeFiles} DESTINATION include/${target_name}) install(FILES ${includeFiles} DESTINATION include/${target_name})

View File

@ -1,54 +0,0 @@
if(pFlow_STD_Parallel_Alg)
# Check if libtbb-dev is installed
execute_process(
COMMAND dpkg -s libtbb-dev
RESULT_VARIABLE TBB_IS_INSTALLED
OUTPUT_QUIET
ERROR_QUIET)
if(NOT TBB_IS_INSTALLED EQUAL 0)
message(STATUS "libtbb-dev not found. Installing libtbb-dev...")
execute_process(
COMMAND sudo apt-get update
COMMAND sudo apt-get install -y libtbb-dev
RESULT_VARIABLE TBB_INSTALL_RESULT)
if(NOT TBB_INSTALL_RESULT EQUAL 0)
message(FATAL_ERROR "Failed to install libtbb-dev")
endif()
else()
message(STATUS "libtbb-dev is already installed.")
endif()
endif()
# Kokkos folder creation
set(Kokkos_Source_DIR $ENV{HOME}/Kokkos/kokkos)
if(NOT EXISTS "${Kokkos_Source_DIR}/CMakeLists.txt")
# Check CMake version and set policy CMP0169 if CMake version is 3.30 or higher
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30")
cmake_policy(SET CMP0169 OLD)
endif()
include(FetchContent)
FetchContent_Declare(
kokkos
GIT_REPOSITORY https://github.com/kokkos/kokkos.git
GIT_TAG 4.4.01
)
FetchContent_GetProperties(kokkos)
if(NOT kokkos_POPULATED)
message(STATUS "Kokkos source directory not found. Downloading Kokkos version 4.4.1 ...")
FetchContent_Populate(kokkos)
set(Kokkos_Source_DIR ${kokkos_SOURCE_DIR})
endif()
endif()
message(STATUS "Kokkos source directory is ${Kokkos_Source_DIR}")
add_subdirectory(${Kokkos_Source_DIR} ./kokkos)
#Kokkos_cmake_settings()

View File

@ -0,0 +1,132 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="description" content="PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.">
<title>PhasicFlow: src/Integration/AdamsBashforth2/AdamsBashforth2.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" >
<tbody>
<tr>
<td id="projectlogo"><a href="https://github.com/PhasicFlow"><img alt="Logo" src="phasicFlow_logo.png"></a></td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
<tr>
<td id="projectbrief">
<a href="https://https://cemf.ir">www.cemf.ir</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('AdamsBashforth2_8cpp.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">AdamsBashforth2.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Include dependency graph for AdamsBashforth2.cpp:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="AdamsBashforth2_8cpp__incl.png" border="0" usemap="#src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8cpp" alt=""/></div>
<map name="src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8cpp" id="src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8cpp">
<area shape="rect" title=" " alt="" coords="5,5,241,47"/>
<area shape="rect" href="AdamsBashforth2_8hpp.html" title=" " alt="" coords="40,95,207,121"/>
</map>
</div>
</div>
<p><a href="AdamsBashforth2_8cpp_source.html">Go to the source code of this file.</a></p>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_5ff0557589c78f704a7131791f9a8bc6.html">Integration</a></li><li class="navelem"><a class="el" href="dir_eb84e0c9bccf6469316a77378e4a6fe1.html">AdamsBashforth2</a></li><li class="navelem"><a class="el" href="AdamsBashforth2_8cpp.html">AdamsBashforth2.cpp</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,4 @@
<map id="src/Integration/AdamsBashforth2/AdamsBashforth2.cpp" name="src/Integration/AdamsBashforth2/AdamsBashforth2.cpp">
<area shape="rect" id="node1" title=" " alt="" coords="5,5,241,47"/>
<area shape="rect" id="node2" href="$AdamsBashforth2_8hpp.html" title=" " alt="" coords="40,95,207,121"/>
</map>

View File

@ -0,0 +1 @@
866f69aa5b015a27ba27e4d5b446d945

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -0,0 +1,251 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="description" content="PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.">
<title>PhasicFlow: src/Integration/AdamsBashforth2/AdamsBashforth2.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" >
<tbody>
<tr>
<td id="projectlogo"><a href="https://github.com/PhasicFlow"><img alt="Logo" src="phasicFlow_logo.png"></a></td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
<tr>
<td id="projectbrief">
<a href="https://https://cemf.ir">www.cemf.ir</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('AdamsBashforth2_8cpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">AdamsBashforth2.cpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="AdamsBashforth2_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*------------------------------- phasicFlow ---------------------------------</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> O C enter of</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> O O E ngineering and</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> O O M ultiscale modeling of</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> OOOOOOO F luid flow </span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">------------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> Copyright (C): www.cemf.ir</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> email: hamid.r.norouzi AT gmail.com</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">------------------------------------------------------------------------------ </span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">Licence:</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> This file is part of phasicFlow code. It is a free software for simulating </span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> granular and multiphase flows. You can redistribute it and/or modify it under</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> the terms of GNU General Public License v3 or any other later versions. </span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> phasicFlow is distributed to help others in their research in the field of </span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"></span> </div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">-----------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="AdamsBashforth2_8hpp.html">AdamsBashforth2.hpp</a>&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">//const real AB2_coef[] = { 3.0 / 2.0, 1.0 / 2.0};</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<a class="code" href="classpFlow_1_1AdamsBashforth2.html#af6c1981009eb42d2e97eea2ec46cbac1">pFlow::AdamsBashforth2::AdamsBashforth2</a></div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classpFlow_1_1AdamsBashforth2.html#af6c1981009eb42d2e97eea2ec46cbac1"> 26</a></span>&#160;(</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>&amp; <a class="code" href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">baseName</a>,</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <a class="code" href="classpFlow_1_1repository.html">repository</a>&amp; owner,</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keyword">const</span> <a class="code" href="classpFlow_1_1pointStructure.html">pointStructure</a>&amp; <a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>,</div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">word</a>&amp; method</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;)</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;:</div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; <a class="code" href="classpFlow_1_1integration.html">integration</a>(<a class="code" href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">baseName</a>, owner, <a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>, method),</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; dy1_(</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; owner.<a class="code" href="classpFlow_1_1repository.html#a5bbe8f5fd6ec57500bcbc3e5cd5c9cf4">emplaceObject</a>&lt;<a class="code" href="classpFlow_1_1pointField.html">realx3PointField_D</a>&gt;(</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <a class="code" href="classpFlow_1_1objectFile.html">objectFile</a>(</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="code" href="namespacepFlow.html#a12b4d93aa9730629403d73e84386bff5">groupNames</a>(<a class="code" href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">baseName</a>,<span class="stringliteral">&quot;dy1&quot;</span>),</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="stringliteral">&quot;&quot;</span>,</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; objectFile::READ_IF_PRESENT,</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; objectFile::WRITE_ALWAYS),</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>,</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <a class="code" href="namespacepFlow.html#a477d522d35403bd985ae105bd759e9d1">zero3</a>))</div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;{</div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;}</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classpFlow_1_1AdamsBashforth2.html#afb1938bc6cfc199cbd70f224040d4afc">pFlow::AdamsBashforth2::predict</a></div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classpFlow_1_1AdamsBashforth2.html#afb1938bc6cfc199cbd70f224040d4afc"> 48</a></span>&#160;(</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">real</a> <a class="code" href="pFlowMacros_8hpp.html#a86d500a34c624c2cae56bc25a31b12f3">UNUSED</a>(dt),</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <a class="code" href="classpFlow_1_1VectorSingle.html">realx3Vector_D</a>&amp; <a class="code" href="pFlowMacros_8hpp.html#a86d500a34c624c2cae56bc25a31b12f3">UNUSED</a>(y),</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="code" href="classpFlow_1_1VectorSingle.html">realx3Vector_D</a>&amp; <a class="code" href="pFlowMacros_8hpp.html#a86d500a34c624c2cae56bc25a31b12f3">UNUSED</a>(dy)</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;)</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;{</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;}</div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classpFlow_1_1AdamsBashforth2.html#ac755e4bf02c3732d1eb89de9e903ebdb">pFlow::AdamsBashforth2::correct</a></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classpFlow_1_1AdamsBashforth2.html#ac755e4bf02c3732d1eb89de9e903ebdb"> 59</a></span>&#160;(</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">real</a> dt,</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="classpFlow_1_1VectorSingle.html">realx3Vector_D</a>&amp; y,</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="classpFlow_1_1VectorSingle.html">realx3Vector_D</a>&amp; dy</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;)</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;{</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">if</span>(this-&gt;<a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>().allActive())</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; {</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordflow">return</span> intAll(dt, y, dy, this-&gt;<a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>().activeRange());</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; }</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordflow">else</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; {</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keywordflow">return</span> intRange(dt, y, dy, this-&gt;<a class="code" href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a>().activePointsMaskD());</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; }</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;}</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classpFlow_1_1AdamsBashforth2.html#a8da2088458d635dfa1fbe1823a3bfd6d"> 77</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classpFlow_1_1AdamsBashforth2.html#a8da2088458d635dfa1fbe1823a3bfd6d">pFlow::AdamsBashforth2::setInitialVals</a>(</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keyword">const</span> <a class="code" href="classpFlow_1_1indexContainer.html">int32IndexContainer</a>&amp; newIndices,</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">const</span> <a class="code" href="classpFlow_1_1Vector.html">realx3Vector</a>&amp; y)</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;{</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;}</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classpFlow_1_1AdamsBashforth2.html#a152b752a6b7b37e70fa5e7c99a484783"> 84</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classpFlow_1_1AdamsBashforth2.html#a152b752a6b7b37e70fa5e7c99a484783">pFlow::AdamsBashforth2::intAll</a>(</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <a class="code" href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">real</a> dt, </div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="classpFlow_1_1VectorSingle.html">realx3Vector_D</a>&amp; y, </div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <a class="code" href="classpFlow_1_1VectorSingle.html">realx3Vector_D</a>&amp; dy, </div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="namespacepFlow.html#a304d8581876270871949bf5d4755036a">range</a> activeRng)</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;{</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keyword">auto</span> d_dy = dy.<a class="code" href="classpFlow_1_1VectorSingle.html#a18052bc1ad8ea07ea5b6205321cba10e">deviceVectorAll</a>();</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keyword">auto</span> d_y = y.<a class="code" href="classpFlow_1_1VectorSingle.html#a18052bc1ad8ea07ea5b6205321cba10e">deviceVectorAll</a>();</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">auto</span> d_dy1= dy1_.deviceVectorAll();</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; Kokkos::parallel_for(</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="stringliteral">&quot;AdamsBashforth2::correct&quot;</span>,</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="code" href="classpFlow_1_1AdamsBashforth2.html#ace46ff4fbe3c001c816dbc4f9f67606f">rpIntegration</a> (activeRng.first, activeRng.second),</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="pFlowMacros_8hpp.html#aa7d4742cdf24a3792276e669531d145c">LAMBDA_HD</a>(<a class="code" href="namespacepFlow.html#aae6ad039f09c0676db11bd114136a3fa">int32</a> i){</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; d_y[i] += dt*(<span class="keyword">static_cast&lt;</span><a class="code" href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">real</a><span class="keyword">&gt;</span>(3.0 / 2.0) * d_dy[i] - <span class="keyword">static_cast&lt;</span><a class="code" href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">real</a><span class="keyword">&gt;</span>(1.0 / 2.0) * d_dy1[i]);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; d_dy1[i] = d_dy[i];</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; });</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; Kokkos::fence();</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; </div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>; </div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclasspFlow_1_1AdamsBashforth2_html_ac755e4bf02c3732d1eb89de9e903ebdb"><div class="ttname"><a href="classpFlow_1_1AdamsBashforth2.html#ac755e4bf02c3732d1eb89de9e903ebdb">pFlow::AdamsBashforth2::correct</a></div><div class="ttdeci">bool correct(real dt, realx3Vector_D &amp;y, realx3Vector_D &amp;dy) override</div><div class="ttdoc">Correction/main integration step.</div><div class="ttdef"><b>Definition:</b> <a href="AdamsBashforth2_8cpp_source.html#l00059">AdamsBashforth2.cpp:59</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a6192191c0e9c178a44ee1ac350fde476"><div class="ttname"><a href="namespacepFlow.html#a6192191c0e9c178a44ee1ac350fde476">pFlow::real</a></div><div class="ttdeci">float real</div><div class="ttdef"><b>Definition:</b> <a href="builtinTypes_8hpp_source.html#l00046">builtinTypes.hpp:46</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a304d8581876270871949bf5d4755036a"><div class="ttname"><a href="namespacepFlow.html#a304d8581876270871949bf5d4755036a">pFlow::range</a></div><div class="ttdeci">kRange&lt; int &gt; range</div><div class="ttdef"><b>Definition:</b> <a href="KokkosTypes_8hpp_source.html#l00059">KokkosTypes.hpp:59</a></div></div>
<div class="ttc" id="apFlowMacros_8hpp_html_a86d500a34c624c2cae56bc25a31b12f3"><div class="ttname"><a href="pFlowMacros_8hpp.html#a86d500a34c624c2cae56bc25a31b12f3">UNUSED</a></div><div class="ttdeci">#define UNUSED(x)</div><div class="ttdef"><b>Definition:</b> <a href="pFlowMacros_8hpp_source.html#l00035">pFlowMacros.hpp:35</a></div></div>
<div class="ttc" id="aclasspFlow_1_1integration_html"><div class="ttname"><a href="classpFlow_1_1integration.html">pFlow::integration</a></div><div class="ttdoc">Base class for integrating the first order ODE (IVP)</div><div class="ttdef"><b>Definition:</b> <a href="integration_8hpp_source.html#l00049">integration.hpp:49</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a0ebe792a293e8c717bddf60070c0fe99"><div class="ttname"><a href="namespacepFlow.html#a0ebe792a293e8c717bddf60070c0fe99">pFlow::word</a></div><div class="ttdeci">std::string word</div><div class="ttdef"><b>Definition:</b> <a href="builtinTypes_8hpp_source.html#l00063">builtinTypes.hpp:63</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a477d522d35403bd985ae105bd759e9d1"><div class="ttname"><a href="namespacepFlow.html#a477d522d35403bd985ae105bd759e9d1">pFlow::zero3</a></div><div class="ttdeci">const realx3 zero3(0.0)</div><div class="ttdef"><b>Definition:</b> <a href="types_8hpp_source.html#l00097">types.hpp:97</a></div></div>
<div class="ttc" id="aclasspFlow_1_1repository_html_a5bbe8f5fd6ec57500bcbc3e5cd5c9cf4"><div class="ttname"><a href="classpFlow_1_1repository.html#a5bbe8f5fd6ec57500bcbc3e5cd5c9cf4">pFlow::repository::emplaceObject</a></div><div class="ttdeci">T &amp; emplaceObject(const objectFile &amp;objf, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="repositoryTemplates_8cpp_source.html#l00038">repositoryTemplates.cpp:38</a></div></div>
<div class="ttc" id="aclasspFlow_1_1AdamsBashforth2_html_a8da2088458d635dfa1fbe1823a3bfd6d"><div class="ttname"><a href="classpFlow_1_1AdamsBashforth2.html#a8da2088458d635dfa1fbe1823a3bfd6d">pFlow::AdamsBashforth2::setInitialVals</a></div><div class="ttdeci">bool setInitialVals(const int32IndexContainer &amp;newIndices, const realx3Vector &amp;y) override</div><div class="ttdoc">Set the initial values for new indices.</div><div class="ttdef"><b>Definition:</b> <a href="AdamsBashforth2_8cpp_source.html#l00077">AdamsBashforth2.cpp:77</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a16a2137651b2c6b8ea4a8daf1d89ff61"><div class="ttname"><a href="namespacepFlow.html#a16a2137651b2c6b8ea4a8daf1d89ff61">pFlow::baseName</a></div><div class="ttdeci">word baseName(const word &amp;w, char sep='.')</div><div class="ttdef"><b>Definition:</b> <a href="bTypesFunctions_8cpp_source.html#l00156">bTypesFunctions.cpp:156</a></div></div>
<div class="ttc" id="aclasspFlow_1_1pointField_html"><div class="ttname"><a href="classpFlow_1_1pointField.html">pFlow::pointField</a></div><div class="ttdef"><b>Definition:</b> <a href="pointField_8hpp_source.html#l00035">pointField.hpp:35</a></div></div>
<div class="ttc" id="aclasspFlow_1_1pointStructure_html"><div class="ttname"><a href="classpFlow_1_1pointStructure.html">pFlow::pointStructure</a></div><div class="ttdef"><b>Definition:</b> <a href="pointStructure_8hpp_source.html#l00044">pointStructure.hpp:44</a></div></div>
<div class="ttc" id="anamespacepFlow_html_aae6ad039f09c0676db11bd114136a3fa"><div class="ttname"><a href="namespacepFlow.html#aae6ad039f09c0676db11bd114136a3fa">pFlow::int32</a></div><div class="ttdeci">int int32</div><div class="ttdef"><b>Definition:</b> <a href="builtinTypes_8hpp_source.html#l00053">builtinTypes.hpp:53</a></div></div>
<div class="ttc" id="aclasspFlow_1_1VectorSingle_html"><div class="ttname"><a href="classpFlow_1_1VectorSingle.html">pFlow::VectorSingle</a></div><div class="ttdef"><b>Definition:</b> <a href="VectorSingle_8hpp_source.html#l00047">VectorSingle.hpp:47</a></div></div>
<div class="ttc" id="aclasspFlow_1_1objectFile_html"><div class="ttname"><a href="classpFlow_1_1objectFile.html">pFlow::objectFile</a></div><div class="ttdef"><b>Definition:</b> <a href="objectFile_8hpp_source.html#l00033">objectFile.hpp:33</a></div></div>
<div class="ttc" id="aAdamsBashforth2_8hpp_html"><div class="ttname"><a href="AdamsBashforth2_8hpp.html">AdamsBashforth2.hpp</a></div></div>
<div class="ttc" id="asetPointStructure_8hpp_html_a385e32971df44b131e4498181a949a91"><div class="ttname"><a href="setPointStructure_8hpp.html#a385e32971df44b131e4498181a949a91">pStruct</a></div><div class="ttdeci">auto &amp; pStruct</div><div class="ttdef"><b>Definition:</b> <a href="setPointStructure_8hpp_source.html#l00024">setPointStructure.hpp:24</a></div></div>
<div class="ttc" id="apFlowMacros_8hpp_html_aa7d4742cdf24a3792276e669531d145c"><div class="ttname"><a href="pFlowMacros_8hpp.html#aa7d4742cdf24a3792276e669531d145c">LAMBDA_HD</a></div><div class="ttdeci">#define LAMBDA_HD</div><div class="ttdef"><b>Definition:</b> <a href="pFlowMacros_8hpp_source.html#l00054">pFlowMacros.hpp:54</a></div></div>
<div class="ttc" id="anamespacepFlow_html_a12b4d93aa9730629403d73e84386bff5"><div class="ttname"><a href="namespacepFlow.html#a12b4d93aa9730629403d73e84386bff5">pFlow::groupNames</a></div><div class="ttdeci">word groupNames(const word &amp;bw, const word &amp;tw, char sep='.')</div><div class="ttdef"><b>Definition:</b> <a href="bTypesFunctions_8cpp_source.html#l00151">bTypesFunctions.cpp:151</a></div></div>
<div class="ttc" id="aclasspFlow_1_1AdamsBashforth2_html_a152b752a6b7b37e70fa5e7c99a484783"><div class="ttname"><a href="classpFlow_1_1AdamsBashforth2.html#a152b752a6b7b37e70fa5e7c99a484783">pFlow::AdamsBashforth2::intAll</a></div><div class="ttdeci">bool intAll(real dt, realx3Vector_D &amp;y, realx3Vector_D &amp;dy, range activeRng)</div><div class="ttdoc">Integrate on all points in the active range.</div><div class="ttdef"><b>Definition:</b> <a href="AdamsBashforth2_8cpp_source.html#l00084">AdamsBashforth2.cpp:84</a></div></div>
<div class="ttc" id="aclasspFlow_1_1AdamsBashforth2_html_af6c1981009eb42d2e97eea2ec46cbac1"><div class="ttname"><a href="classpFlow_1_1AdamsBashforth2.html#af6c1981009eb42d2e97eea2ec46cbac1">pFlow::AdamsBashforth2::AdamsBashforth2</a></div><div class="ttdeci">AdamsBashforth2(const word &amp;baseName, repository &amp;owner, const pointStructure &amp;pStruct, const word &amp;method)</div><div class="ttdoc">Construct from components.</div><div class="ttdef"><b>Definition:</b> <a href="AdamsBashforth2_8cpp_source.html#l00026">AdamsBashforth2.cpp:26</a></div></div>
<div class="ttc" id="aclasspFlow_1_1repository_html"><div class="ttname"><a href="classpFlow_1_1repository.html">pFlow::repository</a></div><div class="ttdef"><b>Definition:</b> <a href="repository_8hpp_source.html#l00034">repository.hpp:34</a></div></div>
<div class="ttc" id="aclasspFlow_1_1VectorSingle_html_a18052bc1ad8ea07ea5b6205321cba10e"><div class="ttname"><a href="classpFlow_1_1VectorSingle.html#a18052bc1ad8ea07ea5b6205321cba10e">pFlow::VectorSingle::deviceVectorAll</a></div><div class="ttdeci">INLINE_FUNCTION_H viewType &amp; deviceVectorAll()</div><div class="ttdef"><b>Definition:</b> <a href="VectorSingle_8hpp_source.html#l00297">VectorSingle.hpp:297</a></div></div>
<div class="ttc" id="aclasspFlow_1_1Vector_html"><div class="ttname"><a href="classpFlow_1_1Vector.html">pFlow::Vector&lt; realx3 &gt;</a></div></div>
<div class="ttc" id="aclasspFlow_1_1indexContainer_html"><div class="ttname"><a href="classpFlow_1_1indexContainer.html">pFlow::indexContainer&lt; int32 &gt;</a></div></div>
<div class="ttc" id="aclasspFlow_1_1AdamsBashforth2_html_ace46ff4fbe3c001c816dbc4f9f67606f"><div class="ttname"><a href="classpFlow_1_1AdamsBashforth2.html#ace46ff4fbe3c001c816dbc4f9f67606f">pFlow::AdamsBashforth2::rpIntegration</a></div><div class="ttdeci">Kokkos::RangePolicy&lt; DefaultExecutionSpace, Kokkos::Schedule&lt; Kokkos::Static &gt;, Kokkos::IndexType&lt; int32 &gt; &gt; rpIntegration</div><div class="ttdoc">Range policy for integration kernel (alias)</div><div class="ttdef"><b>Definition:</b> <a href="AdamsBashforth2_8hpp_source.html#l00051">AdamsBashforth2.hpp:51</a></div></div>
<div class="ttc" id="aclasspFlow_1_1AdamsBashforth2_html_afb1938bc6cfc199cbd70f224040d4afc"><div class="ttname"><a href="classpFlow_1_1AdamsBashforth2.html#afb1938bc6cfc199cbd70f224040d4afc">pFlow::AdamsBashforth2::predict</a></div><div class="ttdeci">bool predict(real UNUSED(dt), realx3Vector_D &amp;UNUSED(y), realx3Vector_D &amp;UNUSED(dy)) override</div><div class="ttdef"><b>Definition:</b> <a href="AdamsBashforth2_8cpp_source.html#l00048">AdamsBashforth2.cpp:48</a></div></div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_5ff0557589c78f704a7131791f9a8bc6.html">Integration</a></li><li class="navelem"><a class="el" href="dir_eb84e0c9bccf6469316a77378e4a6fe1.html">AdamsBashforth2</a></li><li class="navelem"><a class="el" href="AdamsBashforth2_8cpp.html">AdamsBashforth2.cpp</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,159 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="description" content="PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.">
<title>PhasicFlow: src/Integration/AdamsBashforth2/AdamsBashforth2.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" >
<tbody>
<tr>
<td id="projectlogo"><a href="https://github.com/PhasicFlow"><img alt="Logo" src="phasicFlow_logo.png"></a></td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
<tr>
<td id="projectbrief">
<a href="https://https://cemf.ir">www.cemf.ir</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('AdamsBashforth2_8hpp.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle">
<div class="title">AdamsBashforth2.hpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Include dependency graph for AdamsBashforth2.hpp:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="AdamsBashforth2_8hpp__incl.png" border="0" usemap="#src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8hpp" alt=""/></div>
<map name="src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8hpp" id="src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8hpp">
<area shape="rect" title=" " alt="" coords="20,5,256,47"/>
<area shape="rect" href="integration_8hpp.html" title=" " alt="" coords="5,95,127,121"/>
<area shape="rect" href="pointFields_8hpp.html" title=" " alt="" coords="151,95,272,121"/>
</map>
</div>
</div><div class="textblock"><div id="dynsection-1" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-1-trigger" src="closed.png" alt="+"/> This graph shows which files directly or indirectly include this file:</div>
<div id="dynsection-1-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-1-content" class="dyncontent" style="display:none;">
<div class="center"><img src="AdamsBashforth2_8hpp__dep__incl.png" border="0" usemap="#src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8hppdep" alt=""/></div>
<map name="src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8hppdep" id="src_2Integration_2AdamsBashforth2_2AdamsBashforth2_8hppdep">
<area shape="rect" title=" " alt="" coords="5,5,241,47"/>
<area shape="rect" href="AdamsBashforth2_8cpp.html" title=" " alt="" coords="5,95,241,136"/>
</map>
</div>
</div>
<p><a href="AdamsBashforth2_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpFlow_1_1AdamsBashforth2.html">AdamsBashforth2</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Second order Adams-Bashforth integration method for solving ODE. <a href="classpFlow_1_1AdamsBashforth2.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacepFlow"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacepFlow.html">pFlow</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_5ff0557589c78f704a7131791f9a8bc6.html">Integration</a></li><li class="navelem"><a class="el" href="dir_eb84e0c9bccf6469316a77378e4a6fe1.html">AdamsBashforth2</a></li><li class="navelem"><a class="el" href="AdamsBashforth2_8hpp.html">AdamsBashforth2.hpp</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,4 @@
<map id="src/Integration/AdamsBashforth2/AdamsBashforth2.hpp" name="src/Integration/AdamsBashforth2/AdamsBashforth2.hpp">
<area shape="rect" id="node1" title=" " alt="" coords="5,5,241,47"/>
<area shape="rect" id="node2" href="$AdamsBashforth2_8cpp.html" title=" " alt="" coords="5,95,241,136"/>
</map>

Some files were not shown because too many files have changed in this diff Show More