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
Jonas Plewinski
waLBerla
Commits
8688c4d7
Commit
8688c4d7
authored
Feb 18, 2022
by
Markus Holzer
Browse files
Remove duplicated code
parent
2e836ca9
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
8688c4d7
...
...
@@ -1105,6 +1105,13 @@ if (WALBERLA_BUILD_WITH_CUDA AND (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "11.0
set
(
CMAKE_CUDA_STANDARD 14
)
set
(
WALBERLA_USE_STD_EXPERIMENTAL_ANY 1
)
endif
()
# Can be used in CMake files containing generated files where the file suffix is dependent on the target
if
(
CUDA_FOUND
)
set
(
CODEGEN_FILE_SUFFIX
"cu"
)
else
()
set
(
CODEGEN_FILE_SUFFIX
"cu"
)
endif
()
############################################################################################################################
...
...
apps/benchmarks/FlowAroundSphereCodeGen/CMakeLists.txt
View file @
8688c4d7
waLBerla_link_files_to_builddir
(
"*.py"
)
waLBerla_generate_target_from_python
(
NAME FlowAroundSphereGenerated
FILE FlowAroundSphereCodeGen.py
OUT_FILES FlowAroundSphereCodeGen_LbSweep.
${
CODEGEN_FILE_SUFFIX
}
FlowAroundSphereCodeGen_LbSweep.h
FlowAroundSphereCodeGen_MacroSetter.
${
CODEGEN_FILE_SUFFIX
}
FlowAroundSphereCodeGen_MacroSetter.h
FlowAroundSphereCodeGen_UBB.
${
CODEGEN_FILE_SUFFIX
}
FlowAroundSphereCodeGen_UBB.h
FlowAroundSphereCodeGen_NoSlip.
${
CODEGEN_FILE_SUFFIX
}
FlowAroundSphereCodeGen_NoSlip.h
FlowAroundSphereCodeGen_Outflow.
${
CODEGEN_FILE_SUFFIX
}
FlowAroundSphereCodeGen_Outflow.h
FlowAroundSphereCodeGen_PackInfoEven.
${
CODEGEN_FILE_SUFFIX
}
FlowAroundSphereCodeGen_PackInfoEven.h
FlowAroundSphereCodeGen_PackInfoOdd.
${
CODEGEN_FILE_SUFFIX
}
FlowAroundSphereCodeGen_PackInfoOdd.h
FlowAroundSphereCodeGen_InfoHeader.h
)
if
(
WALBERLA_BUILD_WITH_CUDA
)
waLBerla_generate_target_from_python
(
NAME FlowAroundSphereGenerated
FILE FlowAroundSphereCodeGen.py
OUT_FILES FlowAroundSphereCodeGen_LbSweep.cu FlowAroundSphereCodeGen_LbSweep.h
FlowAroundSphereCodeGen_MacroSetter.cu FlowAroundSphereCodeGen_MacroSetter.h
FlowAroundSphereCodeGen_UBB.cu FlowAroundSphereCodeGen_UBB.h
FlowAroundSphereCodeGen_NoSlip.cu FlowAroundSphereCodeGen_NoSlip.h
FlowAroundSphereCodeGen_Outflow.cu FlowAroundSphereCodeGen_Outflow.h
FlowAroundSphereCodeGen_PackInfoEven.cu FlowAroundSphereCodeGen_PackInfoEven.h
FlowAroundSphereCodeGen_PackInfoOdd.cu FlowAroundSphereCodeGen_PackInfoOdd.h
FlowAroundSphereCodeGen_InfoHeader.h
)
waLBerla_add_executable
(
NAME FlowAroundSphereCodeGen FILE FlowAroundSphereCodeGen.cpp
DEPENDS blockforest boundary core domain_decomposition field geometry python_coupling timeloop vtk FlowAroundSphereGenerated
)
DEPENDS blockforest boundary core
cuda
domain_decomposition field geometry python_coupling timeloop vtk FlowAroundSphereGenerated
)
else
()
waLBerla_generate_target_from_python
(
NAME FlowAroundSphereGenerated
FILE FlowAroundSphereCodeGen.py
OUT_FILES FlowAroundSphereCodeGen_LbSweep.cpp FlowAroundSphereCodeGen_LbSweep.h
FlowAroundSphereCodeGen_MacroSetter.cpp FlowAroundSphereCodeGen_MacroSetter.h
FlowAroundSphereCodeGen_UBB.cpp FlowAroundSphereCodeGen_UBB.h
FlowAroundSphereCodeGen_NoSlip.cpp FlowAroundSphereCodeGen_NoSlip.h
FlowAroundSphereCodeGen_Outflow.cpp FlowAroundSphereCodeGen_Outflow.h
FlowAroundSphereCodeGen_PackInfoEven.cpp FlowAroundSphereCodeGen_PackInfoEven.h
FlowAroundSphereCodeGen_PackInfoOdd.cpp FlowAroundSphereCodeGen_PackInfoOdd.h
FlowAroundSphereCodeGen_InfoHeader.h
)
waLBerla_add_executable
(
NAME FlowAroundSphereCodeGen FILE FlowAroundSphereCodeGen.cpp
DEPENDS blockforest boundary core domain_decomposition field geometry python_coupling timeloop vtk FlowAroundSphereGenerated
)
endif
()
\ No newline at end of file
endif
(
WALBERLA_BUILD_WITH_CUDA
)
\ No newline at end of file
apps/benchmarks/PhaseFieldAllenCahn/CMakeLists.txt
View file @
8688c4d7
waLBerla_link_files_to_builddir
(
*.prm
)
waLBerla_link_files_to_builddir
(
*.py
)
if
(
WALBERLA_BUILD_WITH_CUDA
)
waLBerla_generate_target_from_python
(
NAME BenchmarkPhaseFieldCodeGenGPU
FILE multiphase_codegen.py
OUT_FILES initialize_phase_field_distributions.cu initialize_phase_field_distributions.h
initialize_velocity_based_distributions.cu initialize_velocity_based_distributions.h
phase_field_LB_step.cu phase_field_LB_step.h
hydro_LB_step.cu hydro_LB_step.h
PackInfo_phase_field_distributions.cu PackInfo_phase_field_distributions.h
PackInfo_phase_field.cu PackInfo_phase_field.h
PackInfo_velocity_based_distributions.cu PackInfo_velocity_based_distributions.h
GenDefines.h
)
waLBerla_generate_target_from_python
(
NAME BenchmarkPhaseFieldCodeGenGPU
FILE multiphase_codegen.py
OUT_FILES initialize_phase_field_distributions.
${
CODEGEN_FILE_SUFFIX
}
initialize_phase_field_distributions.h
initialize_velocity_based_distributions.
${
CODEGEN_FILE_SUFFIX
}
initialize_velocity_based_distributions.h
phase_field_LB_step.
${
CODEGEN_FILE_SUFFIX
}
phase_field_LB_step.h
hydro_LB_step.
${
CODEGEN_FILE_SUFFIX
}
hydro_LB_step.h
PackInfo_phase_field_distributions.
${
CODEGEN_FILE_SUFFIX
}
PackInfo_phase_field_distributions.h
PackInfo_phase_field.
${
CODEGEN_FILE_SUFFIX
}
PackInfo_phase_field.h
PackInfo_velocity_based_distributions.
${
CODEGEN_FILE_SUFFIX
}
PackInfo_velocity_based_distributions.h
GenDefines.h
)
if
(
WALBERLA_BUILD_WITH_CUDA
)
waLBerla_add_executable
(
NAME benchmark_multiphase
FILES benchmark_multiphase.cpp InitializerFunctions.cpp multiphase_codegen.py
DEPENDS blockforest core cuda field postprocessing python_coupling lbm geometry timeloop gui BenchmarkPhaseFieldCodeGenGPU
)
else
()
waLBerla_generate_target_from_python
(
NAME BenchmarkPhaseFieldCodeGenCPU
FILE multiphase_codegen.py
OUT_FILES initialize_phase_field_distributions.cpp initialize_phase_field_distributions.h
initialize_velocity_based_distributions.cpp initialize_velocity_based_distributions.h
phase_field_LB_step.cpp phase_field_LB_step.h
hydro_LB_step.cpp hydro_LB_step.h
PackInfo_phase_field_distributions.cpp PackInfo_phase_field_distributions.h
PackInfo_phase_field.cpp PackInfo_phase_field.h
PackInfo_velocity_based_distributions.cpp PackInfo_velocity_based_distributions.h
GenDefines.h
)
waLBerla_add_executable
(
NAME benchmark_multiphase
FILES benchmark_multiphase.cpp InitializerFunctions.cpp multiphase_codegen.py
DEPENDS blockforest core field postprocessing python_coupling lbm geometry timeloop gui BenchmarkPhaseFieldCodeGenCPU
)
...
...
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