add shell script
This commit is contained in:
parent
8ef0b81820
commit
97742b36cd
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(rwsim)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
10
build.sh
Normal file
10
build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake ..
|
||||
cmake --build .
|
||||
|
||||
cd ..
|
||||
|
||||
python test.py
|
||||
|
18
config.txt
18
config.txt
@ -1,5 +1,5 @@
|
||||
# Simulation part
|
||||
num_walker=20000
|
||||
num_walker=50000
|
||||
# Motion model part
|
||||
delta=161e3
|
||||
eta=0.0
|
||||
@ -19,19 +19,3 @@ tmix_start=1e-5
|
||||
tmix_stop=1e1
|
||||
tmix_steps=61
|
||||
tau=0.001
|
||||
tau=0.001
|
||||
tau=0.001
|
||||
tau=0.001
|
||||
tau=0.001
|
||||
tau=0.001
|
||||
tau=0.01
|
||||
tau=0.0031622776601683794
|
||||
tau=0.001
|
||||
tau=0.00031622776601683794
|
||||
tau=0.0001
|
||||
tau=3.1622776601683795e-05
|
||||
tau=1e-05
|
||||
tau=3.162277660168379e-06
|
||||
tau=1e-06
|
||||
tau=3.162277660168379e-07
|
||||
tau=1e-07
|
||||
|
8
main.cpp
8
main.cpp
@ -24,18 +24,16 @@ int main (const int argc, char *argv[]) {
|
||||
|
||||
std::unordered_map parameter { read_parameter(args.parameter_file) };
|
||||
|
||||
|
||||
|
||||
std::random_device rd;
|
||||
std::mt19937_64 rng(rd());
|
||||
|
||||
// auto motion = BimodalAngle(1, 1, 2, 30, 0.98, rng);
|
||||
// auto motion = TetrahedralJump(rng);
|
||||
// auto motion = RandomJump(rng);
|
||||
auto motion = SmallAngle(1, 1, 1, rng);
|
||||
auto motion = SmallAngle(1, 1, 20, rng);
|
||||
|
||||
// auto dist = DeltaDistribution(rng);
|
||||
auto dist = LogNormalDistribution(1, 2, rng);
|
||||
auto dist = DeltaDistribution(rng);
|
||||
// auto dist = LogNormalDistribution(1, 2, rng);
|
||||
|
||||
|
||||
if (args.spectrum) {
|
||||
|
5
test.py
5
test.py
@ -8,9 +8,10 @@ import matplotlib.pyplot as plt
|
||||
|
||||
def run_sims(taus):
|
||||
for tau in taus:
|
||||
print('tau')
|
||||
with pathlib.Path('./config.txt').open('a') as f:
|
||||
f.write(f'tau={tau}\n')
|
||||
subprocess.run(['./cmake-build-debug/rwsim', '-ste', './config.txt'])
|
||||
subprocess.run(['./build/rwsim', '-ste', './config.txt'])
|
||||
|
||||
|
||||
def dampening(x: np.ndarray, apod: float) -> np.ndarray:
|
||||
@ -84,7 +85,7 @@ def post_process_ste(taus):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
tau_values = np.logspace(-3, -2, 1)
|
||||
tau_values = np.logspace(-2, -6, 1)
|
||||
lb = 2e3
|
||||
pulse_length = 2e-6
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user