Commit Graph

188 Commits

Author SHA1 Message Date
jpekkila
78aba6428e Updated the copyright years throughout the project 2019-07-16 14:28:32 +03:00
jpekkila
7abb959828 Overhaul to the user-defined parameters done: All logical switches, parameters and vertex buffer handles are now defined in a single header file (the default location is acc/mhd_solver/stencil_defines.h). This header is used when preprocessing the DSL sources and is linked to the include/ directory when calling scripts/compile_acc.sh. astaroth.h is now used for configuring internal stuff only and should not be modified by users 2019-07-03 19:01:16 +03:00
jpekkila
acc53e1c2b Merged master to acc_parameter_overhaul 2019-07-03 17:37:37 +03:00
jpekkila
81a09501b8 Removed deprecated LNT0 and LNRHO0 defines, now the actual configuration parameters are used (AC_lnrho0 and AC_lnT0). Also accidental autoformatting again, there seems to be stray spaces before linebreaks in some files which get automatically removed by my text editor 2019-07-03 17:23:37 +03:00
Miikka Vaisala
98713ff9d2 A possible bug note added. Will look into late. 2019-07-03 14:49:10 +08:00
Miikka Vaisala
334ff868d9 Forcing disabled from autotest and from defaults.
It is not suitable function of the autotest tool. If there in really a
mandatory need to add it. I will need special help from Johannes.
2019-07-02 18:46:04 +08:00
Miikka Vaisala
4766441ffb Tryin to prepare autotest for forcing. 2019-07-02 18:24:41 +08:00
Miikka Vaisala
03689709df Merge branch 'master' into forcing 2019-07-02 16:43:10 +08:00
jpekkila
d9b07a59b5 Tested with hydro, hydro + magnetic, hydro + magnetic + entropy and hydro + magnetic + entropy + forcing. Autotests passed in all cases. 2019-07-01 19:01:42 +03:00
jpekkila
1e6740f999 Added the equations for hydro only for both CPU and GPU. NOTE: NOT RIGOROUSLY CHECKED FOR CORRECTNESS. I just took the equations used with entropy and removed the terms which included entropy and magnetic fields 2019-07-01 18:56:13 +03:00
jpekkila
21e9fc943b Removed all defines from the stencil assembly and processing files and moved them to the new stencil_defines header. There were spaces after some linebreaks which were removed when I autoformatted the code and that's why there seems to be more changes that there actually is. 2019-07-01 18:40:13 +03:00
jpekkila
b8869bb848 Linked the defines used by the DSL and astaroth.h. Now f.ex. LENTROPY has to be set only once in acc/mhd_solver/stencil_defines.h and it is propagated throughout the whole project. The name for stencil_defines.h is not final and may change if I come up with a better name. In any case, there is now a standard header associated with each DSL solver where the user can set defines, and declare arrays (VTXBUF_LNRHO) and device constants (uniforms). 2019-07-01 18:37:56 +03:00
jpekkila
d9be66f65f NOTE: Renamed LINDUCTION to LMAGNETIC throughout the project. 2019-07-01 13:40:24 +03:00
Miikka Vaisala
0600790f41 Corrected a bug in the timestep and some scaling problems.
Now I can reach a saturated stated in forcing without crashing the code.
2019-07-01 14:19:56 +08:00
Miikka Vaisala
9f0be0d9ff Solved the forcing function boundary problem. 2019-07-01 11:06:42 +08:00
Miikka Vaisala
f04ef8e64c Forcing function issue not yet fully resolved.
Now brain hurs. No more today. Break needed.
2019-06-28 19:23:18 +08:00
Miikka Vaisala
94a25383a9 Trying to calculate the forcing scaling.
Causes nans very quickly. Will need to look closer tomorrow again.
2019-06-27 19:20:18 +08:00
jpekkila
ffe9df1bb0 LFORCING was turned off in stencil_process and the autotests failed, re-enabled 2019-06-26 14:08:56 +03:00
Miikka Vaisala
be0e46c814 Can move forcing vector information now from the host to device.
next step in to generate random waves in the CPU with a chosen degree of helicity etc.
2019-06-26 17:41:39 +08:00
Miikka Vaisala
231a8aa06e Trying to figure out how to upload values to GPU. 2019-06-26 15:23:46 +08:00
Miikka Vaisala
5cacda2850 Helical forcing funtion works.
But we will need a wavenumber generator to add stochasticity.
2019-06-26 13:15:28 +08:00
Miikka Vaisala
8191c47fa0 Scetching the helical forcing.
Not the idead form. Not yet tested.
2019-06-25 19:04:53 +08:00
Miikka Vaisala
a574d6e4c3 To be friendly with the autotest. 2019-06-25 14:50:43 +08:00
Miikka Vaisala
b1a2d9603c Cleaning the forcing part. 2019-06-25 14:48:47 +08:00
Miikka Vaisala
44f26cde42 Corrected a stencil bug from der6 2019-06-25 11:25:14 +08:00
Miikka Vaisala
59043e586b Added a missing switch to stencil_assembly.sas. 2019-06-24 18:03:24 +08:00
Miikka Vaisala
55ecdd0ac8 Working upwinding!
It works and it looks so much better than without.
2019-06-24 16:58:06 +08:00
Miikka Vaisala
d0b27a0347 Upwinding terms now compile.
Not tested yet.
2019-06-24 16:32:21 +08:00
Miikka Vaisala
57881e5961 Implementetion for hyperdiffusion to be tested later. 2019-06-21 17:29:06 +08:00
Miikka Vaisala
f2a33bf4f8 Starting with derivatives for upwinding. 2019-06-21 16:53:04 +08:00
jpekkila
a7515fbbd7 Made the simple forcing to scale with dt s.t. it does not explode so easily 2019-06-19 16:34:23 +03:00
jpekkila
6da061b854 Fixed a bug in the Astaroth compiler: the boilerplate code for kernels was generated for all nested compound statements instead of just the top-level one 2019-06-19 16:10:29 +03:00
jpekkila
e580f6f5d7 Improvements to GPU forcing (now applied only at substep 2) 2019-06-19 16:08:44 +03:00
jpekkila
b5753f0bec Played around with forcing and cleaned the example implementation a bit 2019-06-18 17:40:27 +03:00
jpekkila
8864266042 Autoformatted all CUDA/C/C++ code 2019-06-18 16:42:56 +03:00
jpekkila
123fc78705 Disable forcing by default s.t. the autotests pass 2019-06-18 16:39:07 +03:00
jpekkila
4ca4dbefdf Added the machinery for implementing forcing with the DSL on multiple GPUs and a simple model solution 2019-06-18 16:13:32 +03:00
jpekkila
0e48766a68 Added Astaroth 2.0 2019-06-14 14:19:07 +03:00