Commit Graph

31 Commits

Author SHA1 Message Date
Miikka Vaisala
e199ca196d Merge branch 'master' into sink_20190723 2019-08-07 10:46:23 +08:00
jpekkila
d7e26e8f21 Added forcing from stencil_process.sps to autotests. 3 Tests fail. 2019-08-06 19:15:28 +03:00
jpekkila
0e0ace3970 Pure hydro now works with autotests 2019-08-06 18:07:29 +03:00
JackHsu
239e8b4d3e Can set the density for intitial condition from astaroth.conf. 2019-08-02 17:31:49 +08:00
jpekkila
15ad7182db Added sum reduction. NOTE: Scalar sum does not pass the automated test but vector sum does. I couldn't see anything wrong with the code itself and I strongly suspect that the failures are caused by loss of precision due to summing a huge amount of numbers of different magnitudes. However I'm not yet completely sure. Something like the Kahan summation algorithm might be useful if the errors are really caused by fp arithmetic. 2019-07-31 17:07:03 +08:00
jpekkila
69deef66fe Added sum reduction. NOTE: Scalar sum does not pass the automated test but vector sum does. I couldn't see anything wrong with the code itself and I strongly suspect that the failures are caused by loss of precision due to summing a huge amount of numbers of different magnitudes. However I'm not yet completely sure. Something like the Kahan summation algorithm might be useful if the errors are really caused by fp arithmetic. 2019-07-30 14:28:18 +03:00
jpekkila
323d4e3b31 Replaced all calls to AC_VTXBUF_IDX to acVertexBufferIdx etc in all files 2019-07-23 14:37:28 +03:00
jpekkila
074eae0bae Added definitions of AC_GEN_STR and AC_GEN_ID to host_memory.h and .cc since they are no longer available from astaroth.h 2019-07-22 19:49:29 +03:00
jpekkila
78aba6428e Updated the copyright years throughout the project 2019-07-16 14:28:32 +03:00
jpekkila
8cc9281045 Double versions of some sqrt, cos and sin were used in model_rk3.cc instead of the long double versions, fixed. 2019-07-09 19:03:15 +03:00
jpekkila
e6c770cbee Added a synchronization after acLoadDeviceConstant since it is now stated to be asynchronous 2019-07-09 19:00:08 +03:00
jpekkila
eda2f6543b Created a new ForcingParams structure and some functions for generating and transferring the forcing parameters to the host/device 2019-07-08 15:43:37 +03:00
jpekkila
0884c4bf38 Moved the definition of acForcingVec to host_forcing.cc since it depends on user parameters that may not be defined in all projects 2019-07-04 15:28:18 +03:00
jpekkila
556cb77dbb Removed weird unused functions from model_rk3.cc. I have no idea where these came from. Probably remnants from the time I was pulling all-nighters to finish my thesis. 2019-07-03 18:06:40 +03:00
jpekkila
b4eea4b6b6 Changed #if 0 to #if LFORCING instead to get the code to compile if forcing is used (even though autotesting does not support it yet). Also more autoformatting. Maybe I should disable it or then everyone should start using it to avoid cluttering commits with these superficial changes 2019-07-03 17:49:34 +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
jpekkila
d7228f0647 Added an explicit cast from double to AcReal to avoid a narrowing conversion error 2019-07-03 17:11:26 +03:00
jpekkila
945751e585 Autoformatted host_forcing.cc 2019-07-03 17:06:57 +03:00
jpekkila
af3a1e211e Suppressed unused variable and function warnings in model_rk3.cc 2019-07-03 17:03:26 +03:00
Miikka Vaisala
f0d2be831e host_forcing now committed. Sorry. 2019-07-03 09:55:23 +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
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
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
jpekkila
a5ab388af7 Fixed a compilation error when not using entropy. This is a temporary workaround. There is no model solution for hydro only, therefore autotesting will break if entropy is not used. Note: LINDUCTION, LENTROPY and other logical flags are duplicated in both astaroth.h and stencil_process.sps. These flags are not linked and there will be errors and weird behaviour if a flag is set in one file and not in another. 2019-06-19 20:18:25 +03: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
feef97563d Added a model solution for forcing. Accidentally also autoformatted the file. Finally, removed unused cruft 2019-06-19 16:06:57 +03:00
jpekkila
0e48766a68 Added Astaroth 2.0 2019-06-14 14:19:07 +03:00