Browse Source

cpu version

Amsterwolf 12 months ago
parent
commit
85a9649068
  1. 8
      CMakeLists.txt
  2. 6
      examples/top-thermoelastic-BiclampedStructure-cuda/config.json
  3. 4
      examples/top-thermoelastic-BiclampedStructure/config.json
  4. 2
      examples/top-thermoelastic-Lshape-condition/config.json

8
CMakeLists.txt

@ -1,19 +1,19 @@
cmake_minimum_required(VERSION 3.22) cmake_minimum_required(VERSION 3.22)
set(CMAKE_CUDA_COMPILER "/usr/local/cuda-11.6/bin/nvcc")
project(top3d LANGUAGES CUDA CXX) project(top3d LANGUAGES CUDA CXX)
option(PROJECT_WITH_SIMD "Enable SIMD" ON) option(PROJECT_WITH_SIMD "Enable SIMD" ON)
option(VERBOSE "Show more infos" ON) option(VERBOSE "Show more infos" ON)
# choose linear solver # choose linear solver
option(ENABLE_AMGCL "Use AMGCL" ON) option(ENABLE_AMGCL "Use AMGCL" OFF)
if (ENABLE_AMGCL) if (ENABLE_AMGCL)
option(ENABLE_AMGCL_CUDA "use Cuda to speed up AMGCL" ON) option(ENABLE_AMGCL_CUDA "use Cuda to speed up AMGCL" OFF)
else () else ()
option(ENABLE_SUITESPARSE "Use SuiteSparse" OFF) option(ENABLE_SUITESPARSE "Use SuiteSparse" ON)
endif () endif ()
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake/find) list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake/find)
if (ENABLE_AMGCL AND ENABLE_AMGCL_CUDA) if (ENABLE_AMGCL AND ENABLE_AMGCL_CUDA)
set(CMAKE_CUDA_COMPILER "/usr/local/cuda-11.6/bin/nvcc")
configure_file( configure_file(
${CMAKE_SOURCE_DIR}/src/ThermoelasticTop3d.cpp ${CMAKE_SOURCE_DIR}/src/ThermoelasticTop3d.cpp
${CMAKE_SOURCE_DIR}/src/ThermoelasticTop3d.cu ${CMAKE_SOURCE_DIR}/src/ThermoelasticTop3d.cu

6
examples/top-thermoelastic-BiclampedStructure-cuda/config.json

@ -7,7 +7,7 @@
"thermal_expansion_coefficient": 1.21e-5, "unit": "1/K" "thermal_expansion_coefficient": 1.21e-5, "unit": "1/K"
}, },
"topology": { "topology": {
"max_loop": 150, "max_loop": 100,
"volfrac": 0.4, "volfrac": 0.4,
"penal": 3.0, "penal": 3.0,
"r_min": 1.05, "r_min": 1.05,
@ -20,8 +20,8 @@
"model": { "model": {
"regular_model": { "regular_model": {
"lx": 1, "lx": 1,
"ly": 500, "ly": 50,
"lz": 350 "lz": 35
} }
}, },
"mechanical_boundary_condition":{ "mechanical_boundary_condition":{

4
examples/top-thermoelastic-BiclampedStructure/config.json

@ -20,8 +20,8 @@
"model": { "model": {
"regular_model": { "regular_model": {
"lx": 1,"//": "A lx * ly * lz rectangle", "lx": 1,"//": "A lx * ly * lz rectangle",
"ly": 50, "ly": 30,
"lz": 35 "lz": 20
} }
}, },
"mechanical_boundary_condition":{ "//": "A [min[0],max[0]] * [min[1],max[1]] * [min[2],max[2]] rectangle boundary", "mechanical_boundary_condition":{ "//": "A [min[0],max[0]] * [min[1],max[1]] * [min[2],max[2]] rectangle boundary",

2
examples/top-thermoelastic-Lshape-condition/config.json

@ -19,7 +19,7 @@
}, },
"model": { "model": {
"regular_model": { "regular_model": {
"lx":3, "lx":1,
"ly": 30, "ly": 30,
"lz": 20 "lz": 20
} }

Loading…
Cancel
Save