Skip to content

Commit 627de09

Browse files
committed
add euler beam and fix python3.10
1 parent eb294d9 commit 627de09

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

examples/euler_beam/euler_beam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
ppsci.utils.misc.set_random_seed(42)
2929
# set training hyper-parameters
3030
ITERS_PER_EPOCH = 1
31-
EPOCHS = 10000 if not args.epochs else args.epochs
31+
EPOCHS = 20 if not args.epochs else args.epochs
3232
# set output directory
3333
OUTPUT_DIR = "./output/euler_beam" if not args.output_dir else args.output_dir
3434
# initialize logger

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ wget
88
scipy
99
visualdl
1010
pyvista==0.37.0
11+
pybind11==2.9.2
1112
pysdf
1213
pyyaml
1314
scikit-optimize

test_tipc/benchmark_train.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export PDSC_DIR=$(cd "$( dirname ${BASH_SOURCE[0]})"; cd ..; pwd)
1717
export TEST_DIR="${PDSC_DIR}"
1818
export TIPC_TEST="ON" # open tipc log in solver.py
1919
export PYTHONPATH=${PDSC_DIR}
20+
BENCHMARK_ROOT="${TEST_DIR}/test_tipc/tools"
2021
source ${TEST_DIR}/test_tipc/common_func.sh
2122

2223
function func_parser_params(){

test_tipc/configs/train_2d_unsteady_continuous/train_2d_unsteady_continuous.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
===========================train_params===========================
22
model_name:cylinder2d_unsteady_train_newapi
3-
python:python3.7
3+
python:python3.10
44
gpu_list:0
55
Global.use_gpu:null
66
Global.auto_cast:fp32

test_tipc/prepare.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ export TEST_DIR="${PDSC_DIR}"
44
export TIPC_TEST="ON" # open tipc log in solver.py
55
export PYTHONPATH=${PDSC_DIR}
66

7+
BENCHMARK_ROOT="${TEST_DIR}/test_tipc/tools"
78
echo -e "\n* [TEST_DIR] is now set : \n" ${TEST_DIR} "\n"
89
echo -e "\n* [BENCHMARK_ROOT] is now set : \n" ${BENCHMARK_ROOT} "\n"
910
echo -e "\n* [PYTHONPATH] is now set : \n" ${PYTHONPATH} "\n"
1011

11-
BENCHMARK_ROOT=${TEST_DIR}"/test_tipc/tools"
1212
source ${TEST_DIR}/test_tipc/common_func.sh
1313

14-
# Read parameters from [prepare_2d_unsteady_continuous.txt]
14+
# Read parameters from [/tipc/config/*/*.txt]
1515
PREPARE_PARAM_FILE=$1
1616
dataline=`cat $PREPARE_PARAM_FILE`
1717
lines=(${dataline})
@@ -20,4 +20,7 @@ python=$(func_parser_value "${lines[2]}")
2020
export pip=$(func_parser_value "${lines[62]}")
2121

2222
${pip} install -r requirements.txt
23-
${python} ${PDSC_DIR}${download_dataset}
23+
24+
if [ ! -n ${download_dataset}] ; then
25+
${python} ${PDSC_DIR}${download_dataset}
26+
fi

0 commit comments

Comments
 (0)