diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-05-19 21:30:38 +0400 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-05-19 21:30:38 +0400 |
commit | 5e9eebd534f96042b5802e6f6be2b66ecb7fd271 (patch) | |
tree | 6c3adbbaa650484174a9f80cda7bd59cba1989e0 /src/main.py | |
parent | 21d6de57fae7ee2e9950390a7b72e6a27fb26d44 (diff) | |
download | CFD-SIMPLE-5e9eebd534f96042b5802e6f6be2b66ecb7fd271.tar.gz |
feat: add research methods
Diffstat (limited to 'src/main.py')
-rw-r--r-- | src/main.py | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/main.py b/src/main.py index 551595e..cdbf16e 100644 --- a/src/main.py +++ b/src/main.py @@ -1,16 +1,13 @@ from simple import SIMPLE +from research import Research -problem = SIMPLE((1, 2), (0.7, 0.5), 0.02, 120) -problem.prep() +model = SIMPLE((1, 2), (0.7, 0.5), 0.02, 120) -error = 1 -iteration = 0 -while error > 10 ** -7: - iteration += 1 - problem.iterate() - error = problem.avg_error() - print(f'Iteration {iteration}') - print(f'Avg error: {error}') +research = Research(model, '07x05_002') - if iteration % 5 == 0 or iteration == 1: - problem.plot(True, 2) +is_complete = research.load() + +if is_complete: + research.inspect() +else: + research.solve(preview=True, save_plot=True, save_model=True) |