Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Arash Partow
waLBerla
Commits
2ccf2d5d
Commit
2ccf2d5d
authored
Nov 19, 2020
by
Markus Holzer
Browse files
Enable CPU creation always
parent
2f51bf2d
Changes
4
Hide whitespace changes
Inline
Side-by-side
apps/showcases/PhaseFieldAllenCahn/CMakeLists.txt
View file @
2ccf2d5d
if
(
NOT WALBERLA_BUILD_WITH_CUDA
)
add_subdirectory
(
CPU
)
endif
()
if
(
WALBERLA_BUILD_WITH_CUDA
)
add_subdirectory
(
GPU
)
...
...
apps/showcases/PhaseFieldAllenCahn/CPU/CMakeLists.txt
View file @
2ccf2d5d
...
...
@@ -13,7 +13,7 @@ waLBerla_generate_target_from_python(NAME PhaseFieldCodeGenCPU
stream_hydro.cpp stream_hydro.h
GenDefines.h
)
waLBerla_add_executable
(
NAME multiphase
waLBerla_add_executable
(
NAME multiphase
CPU
FILES multiphase.cpp PythonExports.cpp InitializerFunctions.cpp contact.cpp CalculateNormals.cpp multiphase_codegen.py
DEPENDS blockforest core field postprocessing lbm geometry timeloop gui PhaseFieldCodeGenCPU
)
...
...
apps/showcases/PhaseFieldAllenCahn/CPU/multiphase_codegen.py
View file @
2ccf2d5d
...
...
@@ -164,24 +164,24 @@ with CodeGeneration() as ctx:
if
not
ctx
.
optimize_for_localhost
:
cpu_vec
=
{
'instruction_set'
:
None
}
generate_sweep
(
ctx
,
'initialize_phase_field_distributions'
,
h_updates
)
generate_sweep
(
ctx
,
'initialize_velocity_based_distributions'
,
g_updates
)
generate_sweep
(
ctx
,
'initialize_phase_field_distributions'
,
h_updates
,
target
=
'cpu'
)
generate_sweep
(
ctx
,
'initialize_velocity_based_distributions'
,
g_updates
,
target
=
'cpu'
)
generate_sweep
(
ctx
,
'phase_field_LB_step'
,
phase_field_LB_step
,
field_swaps
=
[(
h
,
h_tmp
)],
inner_outer_split
=
True
,
cpu_vectorize_info
=
cpu_vec
)
generate_boundary
(
ctx
,
'phase_field_LB_NoSlip'
,
NoSlip
(),
method_phase
)
cpu_vectorize_info
=
cpu_vec
,
target
=
'cpu'
)
generate_boundary
(
ctx
,
'phase_field_LB_NoSlip'
,
NoSlip
(),
method_phase
,
target
=
'cpu'
)
generate_sweep
(
ctx
,
'hydro_LB_step'
,
hydro_LB_step
,
inner_outer_split
=
True
,
cpu_vectorize_info
=
cpu_vec
)
generate_boundary
(
ctx
,
'hydro_LB_NoSlip'
,
NoSlip
(),
method_hydro
)
cpu_vectorize_info
=
cpu_vec
,
target
=
'cpu'
)
generate_boundary
(
ctx
,
'hydro_LB_NoSlip'
,
NoSlip
(),
method_hydro
,
target
=
'cpu'
)
generate_sweep
(
ctx
,
'stream_hydro'
,
stream_hydro
,
field_swaps
=
[(
g
,
g_tmp
)],
inner_outer_split
=
True
,
cpu_vectorize_info
=
cpu_vec
)
cpu_vectorize_info
=
cpu_vec
,
target
=
'cpu'
)
ctx
.
write_file
(
"GenDefines.h"
,
info_header
)
...
...
apps/showcases/PhaseFieldAllenCahn/GPU/CMakeLists.txt
View file @
2ccf2d5d
...
...
@@ -16,7 +16,7 @@ waLBerla_generate_target_from_python(NAME PhaseFieldCodeGenGPU
PackInfo_velocity_based_distributions.cu PackInfo_velocity_based_distributions.h
GenDefines.h
)
waLBerla_add_executable
(
NAME multiphase
waLBerla_add_executable
(
NAME multiphase
GPU
FILES multiphase.cpp PythonExports.cpp InitializerFunctions.cpp CalculateNormals.cpp contact.cu multiphase_codegen.py
DEPENDS blockforest core cuda field postprocessing lbm geometry timeloop gui PhaseFieldCodeGenGPU
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment