Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disaggregated Mutli Resolution LBM #46

Draft
wants to merge 278 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
1030345
Adding documentation to ConstexprFor
massimim Jun 30, 2023
73b063e
WIP
massimim Jun 30, 2023
1169538
WIP
massimim Jun 30, 2023
3404f03
WIP
massimim Jun 30, 2023
a2ed8f6
Refactoring of the LBM benchmark
massimim Jul 4, 2023
0a56cf4
WIP - D3Q27
massimim Jul 5, 2023
c552094
WIP - D3Q27
massimim Jul 5, 2023
5f07bca
WIP - D3Q27
massimim Jul 5, 2023
2665122
WIP - D3Q27
massimim Jul 5, 2023
c4cc536
WIP - D3Q27
massimim Jul 6, 2023
06774be
Encoding and decoding tools for Morton and Hilbert curves.
massimim Jul 11, 2023
971afc7
Merge remote-tracking branch 'origin/develop' into lattice-benchmark-lbm
massimim Jul 11, 2023
b3897f0
WIP
massimim Jul 13, 2023
78763b4
ioToVtk with slices
Ahdhn Jul 17, 2023
344b71c
adding more problems
Ahdhn Jul 17, 2023
0794e52
run script
Ahdhn Jul 17, 2023
0c8d8cb
WIP
massimim Jul 18, 2023
06c7d20
more problems
Ahdhn Jul 18, 2023
fa4b16a
Merge branch 'develop' of https://github.com/Autodesk/Neon into Multi…
Ahdhn Jul 18, 2023
f7ff14f
fix problemID 8
Ahdhn Jul 19, 2023
3cc397c
Fixing space filling curves
massimim Jul 19, 2023
1e7c890
Adding space filling curve parameter to dGrid
massimim Jul 19, 2023
9e9dc40
Extending benchmark with space filling curve option.
massimim Jul 19, 2023
18ffd02
WIP
massimim Jul 19, 2023
ae0f4e2
minu bug in dat file
Ahdhn Jul 21, 2023
870fc99
update DAT files
Ahdhn Jul 25, 2023
f8d59eb
fix problem confi with more than 3 levels
Ahdhn Jul 25, 2023
199c946
Extending grid report capabilities.
massimim Jul 25, 2023
6ddabb3
Fixes to python script.
massimim Jul 25, 2023
7e158b6
WIP
massimim Jul 28, 2023
a43ec4e
WIP: new lbm benchmark
massimim Aug 1, 2023
b6142ef
WIP: new lbm benchmark
massimim Aug 1, 2023
de704d3
WIP
massimim Aug 2, 2023
dab4e48
update grid configuration and figures
Ahdhn Aug 2, 2023
75c2484
update run script
Ahdhn Aug 2, 2023
b441cfa
Update run.sh
Ahdhn Aug 2, 2023
3913e8b
avoid division by sumStore
Ahdhn Aug 3, 2023
9fef504
Update stream.h
Ahdhn Aug 3, 2023
5d6a5b4
store in register before multiply
Ahdhn Aug 3, 2023
1f1df0c
increase number of iterations in run script
Ahdhn Aug 3, 2023
cb90eb3
remove duplication
Ahdhn Aug 3, 2023
ead3a64
tweak streamFusedCoalescence
Ahdhn Aug 22, 2023
bc0d07b
Revert "tweak streamFusedCoalescence"
Ahdhn Aug 22, 2023
cbbbce0
adding option to cull extra storage of the overlapping coarser girds
Ahdhn Aug 24, 2023
8220b1f
refactor to add flow over cylinder
Ahdhn Aug 24, 2023
e21a587
cylinder position
Ahdhn Aug 24, 2023
f8cd1f3
fix bug with setting child block ID
Ahdhn Aug 28, 2023
376197d
fix initialization of the flow over cylinder
Ahdhn Aug 28, 2023
988a054
split init
Ahdhn Aug 28, 2023
6f1bde7
def BGK and KBC
Ahdhn Aug 28, 2023
8bd76d9
ops
Ahdhn Aug 28, 2023
406b41c
WIP: cleaning.
massimim Aug 29, 2023
d7da72b
WIP
massimim Aug 29, 2023
09ddf79
tiny refactor to reduce duplicate code
Ahdhn Aug 29, 2023
8874994
Fix post process for moving wall boundary condition
Ahdhn Aug 29, 2023
852eaf5
WIP
massimim Aug 29, 2023
389d8e1
Parametric Refactoring
massimim Aug 30, 2023
782b850
add Re to the input arguments and output json
Ahdhn Aug 30, 2023
b8627f5
WIP: test with D3Q27
massimim Aug 30, 2023
b8113a6
thin slices
Ahdhn Aug 30, 2023
be7978f
split files
Ahdhn Aug 30, 2023
6759005
D3Q27 tested
massimim Aug 31, 2023
6adff5a
WIP: refactoring CLI
massimim Aug 31, 2023
da31821
movingWall = inlet, adding option to control output frequency
Ahdhn Aug 31, 2023
132f6fe
fixes for flow over cylinder
Ahdhn Aug 31, 2023
cdc8c22
sphere not cylinder
Ahdhn Aug 31, 2023
f599017
WIP
massimim Aug 31, 2023
fd0fb06
report collision model
Ahdhn Aug 31, 2023
0c0ab50
fix
Ahdhn Aug 31, 2023
0413392
WIP: CLI refactoring.
massimim Sep 1, 2023
6ff1aa6
WIP: KBC for D3Q27
massimim Sep 1, 2023
d0667a3
Pull method.
massimim Sep 4, 2023
0572e66
WIP: kbc
massimim Sep 4, 2023
7c537e8
Fix for kbc
massimim Sep 4, 2023
d363a04
WIP: AA
massimim Sep 4, 2023
64d3d30
WIP
massimim Sep 5, 2023
0ec9782
jet fighter sdf
Ahdhn Sep 5, 2023
d29577a
jet problem
Ahdhn Sep 5, 2023
bc48f13
jet problem
Ahdhn Sep 5, 2023
a1329b1
flowOverShape and use sdf to define bounce back BC
Ahdhn Sep 5, 2023
d203e9e
AA working for D3Q19 and bgk.
massimim Sep 5, 2023
ec49d09
initFlowOverShape for the jet
Ahdhn Sep 6, 2023
e64a4d1
Fix clength and a scale to Sphere problemn
Ahdhn Sep 6, 2023
20fc9de
parametrize jet problem
Ahdhn Sep 6, 2023
abc4e28
Cleaning up LBM benchmarking
massimim Sep 10, 2023
cf19169
Cleaning up LBM benchmarking
massimim Sep 10, 2023
680b84e
cuda issues
massimim Sep 10, 2023
90c6ede
WIP: fixing nvcc bug.
massimim Sep 10, 2023
ad64173
Updating script.
massimim Sep 10, 2023
59e3161
Updating script.
massimim Sep 10, 2023
0112332
Updating script.
massimim Sep 10, 2023
6b896f9
Updating script.
massimim Sep 10, 2023
65d829b
Updating script.
massimim Sep 10, 2023
5133b11
Updating script.
massimim Sep 10, 2023
3f28bfd
Updating script.
massimim Sep 10, 2023
be81ec7
Updating script.
massimim Sep 10, 2023
cb6b437
Cleaning up for PR.
massimim Sep 11, 2023
e9d12c8
Cleaning up for PR.
massimim Sep 11, 2023
3d4c409
adding polyscope
Ahdhn Sep 11, 2023
152dffb
Add input arguments in a struct
Ahdhn Sep 11, 2023
e4f43c4
Cleaning up for PR.
massimim Sep 11, 2023
8d0c6af
replaces problemId with scale and make it user input
Ahdhn Sep 11, 2023
343f005
require device ID
Ahdhn Sep 11, 2023
3f61ad7
to compile polyscope
Ahdhn Sep 11, 2023
3c7f092
Issue with nvcc fixed.
massimim Sep 11, 2023
61788e9
fix linux compilation
Ahdhn Sep 11, 2023
6b8bdfb
fix Ubuntu compilation
Ahdhn Sep 11, 2023
2789a46
mField operator() using Idx
Ahdhn Sep 12, 2023
9503aa4
use host container for initPolyscope
Ahdhn Sep 12, 2023
786da02
added libigl to use winding number for flow over mesh
Ahdhn Sep 12, 2023
817177f
minor fix to the clength
Ahdhn Sep 12, 2023
6ecd1b0
Fix minor issue with scaling the mesh
Ahdhn Sep 12, 2023
5147782
minor fixes to get flow over mesh working
Ahdhn Sep 12, 2023
74a0ae0
Fix for win compilation
massimim Sep 13, 2023
ea655c3
Merge branch 'fixingCompilerIssue' into lattice-benchmark-lbm
massimim Sep 13, 2023
297443a
update libigl
Ahdhn Sep 13, 2023
2c474ed
Fixing CUDA C++ issues for D3Q19
massimim Sep 14, 2023
0d88f70
Fix outlet BC
Ahdhn Sep 14, 2023
f127d8b
skip outlet BC for now, tweak mesh box size, output vtk, add mesh to …
Ahdhn Sep 14, 2023
f1fe05c
Fix clength for the mesh problem
Ahdhn Sep 14, 2023
2e8d032
clenght for jet
Ahdhn Sep 14, 2023
41a3e15
speedup inside/outside query
Ahdhn Sep 14, 2023
811e90d
Revert "speedup inside/outside query"
Ahdhn Sep 14, 2023
eea7cf8
Fixing CUDA C++ issues for D3Q19 - bgk
massimim Sep 15, 2023
f69c3b7
Adding remote write support to bGrid.
massimim Sep 15, 2023
367f2ad
fix a bug in initSumStore
Ahdhn Sep 15, 2023
9d4a868
bGrid get neighbor degenerate case
Ahdhn Sep 18, 2023
b8bde1c
bug fix with storeFine
Ahdhn Sep 18, 2023
5ad983d
cleanup
Ahdhn Sep 18, 2023
0ef30a7
added `collideKBCFusedStore`
Ahdhn Sep 18, 2023
ef494df
WIP
massimim Sep 18, 2023
84afa2f
init fusedFinest
Ahdhn Sep 18, 2023
c3507d9
use int8_t with loops
Ahdhn Sep 18, 2023
fd95095
streaming push
Ahdhn Sep 19, 2023
d0905de
use libigl as static library
Ahdhn Sep 20, 2023
d8d811a
Revert "use libigl as static library"
Ahdhn Sep 20, 2023
d550a00
use igl winding number instead of signed distance
Ahdhn Sep 20, 2023
ddf430a
Fixing lbm benchmark template initialization
massimim Sep 20, 2023
f4e8dc2
fix fused finest
Ahdhn Sep 21, 2023
70e037c
fused finest seems to work correctly now
Ahdhn Sep 21, 2023
b20594b
fused finest using KBC
Ahdhn Sep 21, 2023
4baa6a6
make polyscope optional
Ahdhn Sep 21, 2023
e38d047
comment out outlet BC
Ahdhn Sep 21, 2023
439d6ea
enforce max register count
Ahdhn Sep 21, 2023
9a1b21e
compute velocity at the end
Ahdhn Sep 21, 2023
fdb1396
minor bug
Ahdhn Sep 21, 2023
682868d
correct mlups
Ahdhn Sep 25, 2023
44cf166
Update lbmMultiRes.h
Ahdhn Sep 25, 2023
d8a17fb
benchmark script
Ahdhn Sep 25, 2023
cd467ff
Update run.sh
Ahdhn Sep 25, 2023
aeb0f07
correct report name + BGK as default
Ahdhn Sep 26, 2023
9933345
lid drive cavity problem 10
Ahdhn Sep 26, 2023
84db90b
allocate velocity and density only for visuals
Ahdhn Sep 27, 2023
5746239
fix minor bug
Ahdhn Sep 29, 2023
1b380bd
a little bump to stream fused explosion
Ahdhn Sep 29, 2023
68e5edd
stream fused coalescence
Ahdhn Oct 1, 2023
359fc73
fix streamFuseAll performance
Ahdhn Oct 1, 2023
f7224a6
fix mesh resizing for flow over mesh
Ahdhn Oct 2, 2023
c73c979
use vector field in writing the vtk
Ahdhn Oct 2, 2023
65279f6
binary vtk
Ahdhn Oct 4, 2023
605dc33
binary vtk
Ahdhn Oct 4, 2023
a1039c3
scripts
Ahdhn Oct 4, 2023
e82e16b
use the coarsest level to upsample the velocity for binary vtk
Ahdhn Oct 4, 2023
040da98
plane obj file
Ahdhn Oct 4, 2023
a0ae21e
Update practice_v28.obj
Ahdhn Oct 4, 2023
b90c97e
speedup inside/outside calculation
Ahdhn Oct 4, 2023
9740e46
bigger mesh box
Ahdhn Oct 5, 2023
0ddaee8
ghia plots
Ahdhn Oct 5, 2023
0e22d86
sphere model
Ahdhn Oct 5, 2023
728c186
Dropping kernel bound mechanisms.
massimim Oct 9, 2023
45e82ba
Removing debugging command.
massimim Oct 9, 2023
a79ef8b
Fixing print messages.
massimim Oct 9, 2023
d758ab0
Merge branch 'lattice-benchmark-lbm' into disaggregated-dGRid
massimim Oct 10, 2023
7e23387
Lattice halo update
massimim Oct 10, 2023
207d252
Fixing issue with dSpan and dataView.
massimim Oct 10, 2023
b574b49
Fixing issue with dSpan and dataView.
massimim Oct 10, 2023
4e690c6
Merge branch 'disaggregated-dGRid' into lattice-benchmark-lbm
massimim Oct 10, 2023
2e533ab
Fixing CLI for lbm unitoform.
massimim Oct 10, 2023
f72755a
WIP
massimim Oct 11, 2023
bef23c1
Fixing windows compilation
massimim Oct 11, 2023
b2235b4
Fixing windows compilation
massimim Oct 11, 2023
a827c56
cleanup
Ahdhn Oct 12, 2023
880fe9d
cleanup
Ahdhn Oct 12, 2023
f91f0f3
fix multi-res unit test
Ahdhn Oct 12, 2023
9b4a97b
Merge branch 'lattice-benchmark-lbm' into disaggregated-dGRid
massimim Oct 13, 2023
d59f01e
WIP: dGridDisg
massimim Oct 19, 2023
d5679d4
WIP: standard halo update
massimim Oct 19, 2023
5b759f7
WIP: standard halo update
massimim Oct 20, 2023
e839a20
Fixing indexing in dGridDisg
massimim Oct 23, 2023
4deb1c4
Fix loading index
massimim Oct 23, 2023
c134011
Fix to the fix
massimim Oct 24, 2023
ca6b3b2
Disaggregated D3Q19 working
massimim Oct 24, 2023
fe94bea
Adding mapping for d3q27
massimim Oct 25, 2023
cddb398
Adding block size to the lbm benchmark report.
massimim Oct 31, 2023
d2138b7
WIP
massimim Oct 31, 2023
e0d739c
WIP
massimim Oct 31, 2023
4533f34
WIP
massimim Oct 31, 2023
3bd8d18
WIP
massimim Oct 31, 2023
f510fe8
WIP - copy of bGrid
massimim Nov 7, 2023
0e981bb
WIP
massimim Nov 9, 2023
375c2d1
WIP
massimim Nov 13, 2023
953637b
WIP
massimim Nov 13, 2023
f91754e
WIP
massimim Nov 13, 2023
919dc7c
WIP
massimim Nov 13, 2023
dc584ee
bDisg compute test passing.
massimim Nov 13, 2023
c0b807a
bDisg compute test passing.
massimim Nov 14, 2023
efd4b8b
Redesign of the bDisg API.
massimim Nov 19, 2023
1d48965
Adding option of non cubic domain in the lid uniform lbm benchmark.
massimim Nov 19, 2023
53b02a0
Opm parallel for memory transfers.
massimim Nov 22, 2023
2b81ae7
Adding new data to the skeleton dot file.
massimim Nov 23, 2023
4760cf5
WIP - fixing issue with alpha and beta containers.
massimim Dec 6, 2023
13c51e2
WIP: adding missing function to bGrid::Partition
massimim Dec 6, 2023
4d388da
Merge branch 'bGridDisg' of https://github.com/Autodesk/Neon into Dis…
Ahdhn Dec 12, 2023
9ed416a
minor post-merge fixes
Ahdhn Dec 12, 2023
73264c5
init disg multi res lbm
Ahdhn Dec 12, 2023
1bbc7e8
api for disg mGrid
Ahdhn Dec 12, 2023
1356ef9
Fixing compilation issues.
massimim Dec 13, 2023
48acb7f
Re-enable KBC in the CLI
massimim Dec 20, 2023
5aefb0d
classifying voxels along the interface
Ahdhn Dec 20, 2023
62f26b0
Fixing compilation issues.
massimim Dec 21, 2023
297b45f
fix windows compilation
Ahdhn Dec 21, 2023
31cceba
classification is working + ioToVtk for classification
Ahdhn Dec 21, 2023
8e4adc8
wip: adding new multi-gpu bGrid.
massimim Jan 5, 2024
ef3bbaf
wip
massimim Jan 10, 2024
c3eda46
wip
massimim Jan 10, 2024
dd882d3
wip
massimim Jan 21, 2024
8666361
wip
massimim Jan 21, 2024
82d2f14
Setting up benchmarks.
massimim Jan 22, 2024
f4e1da5
wip
massimim Jan 22, 2024
7f415a5
show grid size when there is an exception
Ahdhn Jan 25, 2024
0bbbe75
minor reorg
Ahdhn Jan 29, 2024
77edf29
bGridMask
massimim Feb 2, 2024
6949536
plot script
Ahdhn Feb 6, 2024
475b95b
WIP
massimim Feb 7, 2024
0ac432f
Merge branch 'bGridDisg' into DisgMultiResLBM
massimim Feb 7, 2024
422ce66
experiment with 5 levels
Ahdhn Feb 12, 2024
fd73e75
speedup inside/outside calculation
Ahdhn Feb 13, 2024
f336338
minor
Ahdhn Feb 13, 2024
de579cb
fix issue where we may end up with gaps between different resolutions
Ahdhn Feb 14, 2024
25ad35c
dist to mesh for grid construction (commented out for now)
Ahdhn Feb 14, 2024
f8e7a60
add option to rotate the input model
Ahdhn Feb 14, 2024
854c664
Fix bPartition::isActive
Ahdhn Feb 22, 2024
ec2f88f
no more annoying warnings
Ahdhn Feb 22, 2024
3f5d8c0
Merge branch 'MultiResLBMOpt' of https://github.com/Autodesk/Neon int…
Ahdhn Feb 22, 2024
4d37ccb
copy over improvemetnts from non-disg lbmMultiRes
Ahdhn Feb 22, 2024
5ba9e26
attemp at fixing KBC in disg
Ahdhn Feb 22, 2024
0c84c2b
fix compilation
Ahdhn Feb 26, 2024
ee5038d
Setting bgk as collistion in the mres app.
massimim Dec 7, 2024
4bcb478
Adding report back in the mres app.
massimim Dec 7, 2024
b0cca07
Fix: report names for mres apps
massimim Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
with:
cuda: '11.7.0'
linux-local-args: '["--toolkit"]'
- run: sudo apt-get update
- run: sudo apt-get install -y xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev
- run: nvcc -V
- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ temp
docs/doxygen/html/

docs/doxygen/latex/

!apps/lbmMultiRes/practice_v28.obj
!apps/lbmMultiRes/sphere3.obj
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
endif ()

if (WIN32)
set(LIBIGL_USE_STATIC_LIBRARY "ON" CACHE BOOL "Use Libigl as a static library")
set(NEON_USE_POLYSCOPE "ON" CACHE BOOL "Enable Ployscope for visualization")
endif()

if(${NEON_USE_POLYSCOPE})
message(STATUS "Polyscope is enabled")
else()
message(STATUS "Polyscope is disabled")
endif()


# Manage between building Neon as shared or static library
include("${PROJECT_SOURCE_DIR}/cmake/ManageLibraryType.cmake")

Expand Down Expand Up @@ -70,6 +82,9 @@ if (NOT OpenMP_CXX_FOUND)
message(FATAL_ERROR "Neon could not find OpenMP")
endif ()
target_link_libraries(NeonDeveloperLib INTERFACE OpenMP::OpenMP_CXX)
if(${NEON_USE_POLYSCOPE})
target_compile_definitions(NeonDeveloperLib INTERFACE NEON_USE_POLYSCOPE)
endif()

#target_link_libraries(libNeonXXX INTERFACE $<BUILD_INTERFACE:NeonDeveloperLib>)

Expand Down
1 change: 1 addition & 0 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
#add_subdirectory("gameOfLife")
#add_subdirectory("poisson")
add_subdirectory("lbmMultiRes")
add_subdirectory("lbmMultiResDisg")
9 changes: 7 additions & 2 deletions apps/lbmMultiRes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

set (APP_NAME app-lbmMultiRes)
file(GLOB_RECURSE SrcFiles lbmMultiRes.cu lattice.h init.h postProcess.h util.h coalescence.h collide.h explosion.h stream.h store.h verify.h)
file(GLOB_RECURSE SrcFiles lbmMultiRes.cu lbmMultiRes.h lattice.h init.h postProcess.h util.h coalescence.h collide.h explosion.h stream.h store.h verify.h flowOverShape.h lidDrivenCavity.h fusedFinest.h)

add_executable(${APP_NAME} ${SrcFiles})

target_link_libraries(${APP_NAME}
PUBLIC libNeonSkeleton)
PUBLIC libNeonSkeleton glm::glm igl::core)

if(${NEON_USE_POLYSCOPE})
target_link_libraries(${APP_NAME}
PUBLIC libNeonSkeleton polyscope)
endif()

set_target_properties(${APP_NAME} PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
Expand Down
22 changes: 12 additions & 10 deletions apps/lbmMultiRes/coalescence.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#include "lattice.h"

template <typename T, int Q>
inline Neon::set::Container coalescence(Neon::domain::mGrid& grid,
const bool fineInitStore,
const int level,
const Neon::domain::mGrid::Field<int>& sumStore,
const Neon::domain::mGrid::Field<T>& fout,
Neon::domain::mGrid::Field<T>& fin)
inline Neon::set::Container coalescence(Neon::domain::mGrid& grid,
const bool fineInitStore,
const int level,
const Neon::domain::mGrid::Field<float>& sumStore,
const Neon::domain::mGrid::Field<T>& fout,
Neon::domain::mGrid::Field<T>& fin)
{
// Initiated by the coarse level (hence "pull"), this function simply read the missing population
// across the interface between coarse<->fine boundary by reading the population prepare during the store()
Expand All @@ -22,7 +22,8 @@ inline Neon::set::Container coalescence(Neon::domain::mGrid& g
return [=] NEON_CUDA_HOST_DEVICE(const typename Neon::domain::mGrid::Idx& cell) mutable {
//If this cell has children i.e., it is been refined, than we should not work on it
//because this cell is only there to allow query and not to operate on
const int refFactor = pout.getRefFactor(level);
//const int refFactor = pout.getRefFactor(level);
constexpr T repRefFactor = 0.5;
if (!pin.hasChildren(cell)) {

for (int q = 0; q < Q; ++q) {
Expand All @@ -32,15 +33,16 @@ inline Neon::set::Container coalescence(Neon::domain::mGrid& g
}
//if we have a neighbor at the same level that has been refined, then cell is on
//the interface and this is where we should do the coalescence
if (pin.hasChildren(cell, dir)) {

if (pin.hasChildren(cell, dir) && pin.isActive(cell, dir)) {
auto neighbor = pout.getNghData(cell, dir, q);
if (neighbor.mIsValid) {
if (fineInitStore) {
auto ssVal = ss.getNghData(cell, dir, q);
assert(ssVal.mData != 0);
pin(cell, q) = neighbor.mData / static_cast<T>(ssVal.mData * refFactor);
pin(cell, q) = neighbor.mData * ssVal.mData;
} else {
pin(cell, q) = neighbor.mData / static_cast<T>(refFactor);
pin(cell, q) = neighbor.mData * repRefFactor;
}
}
}
Expand Down
Loading
Loading