PeriDEM
0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
run.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
# -------------------------------------------
3
# Copyright (c) 2021 - 2026 Prashant K. Jha
4
# -------------------------------------------
5
# PeriDEM https://github.com/prashjha/PeriDEM
6
#
7
# Distributed under the Boost Software License, Version 1.0. (See accompanying
8
# file LICENSE)
9
10
"""Run this example in-process from Python.
11
12
``problem.py`` next to this file sets up the problem: geometry, materials,
13
contact, boundary conditions and particle placement, through the ``peridem``
14
interface. Run ``./problem.py --help`` for its arguments.
15
16
To run the same problem through the C++ executable instead, hand it the deck:
17
18
./problem.py --write-deck /tmp/input.json
19
<build>/bin/PeriDEM -i /tmp/input.json -nThreads 4
20
"""
21
22
from
__future__
import
annotations
23
24
import
sys
25
from
pathlib
import
Path
26
27
sys.path.insert(0, str(Path(__file__).resolve().parent))
28
29
from
problem
import
main
# noqa: E402
30
31
if
__name__ ==
"__main__"
:
32
raise
SystemExit(main())
examples
PeriDEM
twop_circ_contact
run.py
Generated by
1.9.8