Merge branch 'master' of https://bitbucket.org/jpekkila/astaroth
This commit is contained in:
@@ -32,7 +32,7 @@ Edit `config/astaroth.conf` to change the numerical setup.
|
||||
|
||||
1. `source sourceme.sh` to add relevant directories to the `PATH`
|
||||
1. `ac_mkbuilddir.sh -b my_build_dir/` to set up a custom build directory. There are also other options available. See `ac_mkbuilddir.sh -h` for more.
|
||||
1. `$AC_HOME/scripts/compile_acc.sh` to generate kernels from the Domain Specific Language
|
||||
1. `compile_acc.sh` to generate kernels from the Domain Specific Language
|
||||
1. `cd my_build_dir/`
|
||||
1. `make -j`
|
||||
1. `./ac_run <options>`
|
||||
|
@@ -7,7 +7,8 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import astar.data as ad\n",
|
||||
"import astar.visual as vis"
|
||||
"import astar.visual as vis\n",
|
||||
"import numpy as np"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -23,7 +24,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"meshdir = \"/scratch/data/mvaisala/iotest/\""
|
||||
"meshdir = \"/scratch/data/mvaisala/forcingtest/\""
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -32,10 +33,26 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"imesh = 0\n",
|
||||
"imesh = 10000\n",
|
||||
"mesh = ad.read.Mesh(imesh, fdir=meshdir)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Auxuliary variables"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"uu_tot = np.sqrt(mesh.uu[0]**2.0 + mesh.uu[1]**2.0 + mesh.uu[2]**2.0)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
@@ -51,7 +68,11 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vis.slices.plot_3(mesh, mesh.uu[0], title = r'$u_x$', bitmap = False, fname = 'uux')"
|
||||
"vis.slices.plot_3(mesh, uu_tot, title = r'$\\|u\\|$')\n",
|
||||
"vis.slices.plot_3(mesh, mesh.uu[0], title = r'$u_x$')\n",
|
||||
"vis.slices.plot_3(mesh, mesh.uu[1], title = r'$u_y$')\n",
|
||||
"vis.slices.plot_3(mesh, mesh.uu[2], title = r'$u_z$')\n",
|
||||
"vis.slices.plot_3(mesh, mesh.lnrho, title = r'$\\ln_\\rho$')"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -86,6 +107,13 @@
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
@@ -45,7 +45,7 @@ print("sys.argv", sys.argv)
|
||||
#meshdir = "/tiara/home/mvaisala/astaroth-code/astaroth_2.0/build/"
|
||||
#meshdir = "/tiara/ara/data/mvaisala/tmp/astaroth-code/astaroth_2.0/build/"
|
||||
#meshdir = "/tiara/ara/data/mvaisala/asth_testbed_double/"
|
||||
meshdir = "/scratch/data/mvaisala/iotest/"
|
||||
meshdir = "/scratch/data/mvaisala/forcingtest/"
|
||||
|
||||
if "xtopbound" in sys.argv:
|
||||
for i in range(0, 171):
|
||||
@@ -169,7 +169,7 @@ if '1d' in sys.argv:
|
||||
if 'sl' in sys.argv:
|
||||
#maxfiles = 200002
|
||||
#stride = 10000
|
||||
maxfiles = 1001
|
||||
maxfiles = 5001
|
||||
stride = 100
|
||||
for i in range(0, maxfiles, stride):
|
||||
mesh = ad.read.Mesh(i, fdir=meshdir)
|
||||
|
@@ -545,10 +545,12 @@ normalized(const AcReal3& vec)
|
||||
|
||||
// Sinusoidal forcing
|
||||
// https://arxiv.org/pdf/1704.04676.pdf
|
||||
// NOTE: This method of forcing is depracated. However, it will remain in here
|
||||
// until a corresponding scheme exists in the new code.
|
||||
__constant__ AcReal3 forcing_vec;
|
||||
__constant__ AcReal forcing_phi;
|
||||
static __device__ __forceinline__ AcReal3
|
||||
forcing(const int i, const int j, const int k)
|
||||
DEPRECATED_forcing(const int i, const int j, const int k)
|
||||
{
|
||||
#define DOMAIN_SIZE_X (DCONST_INT(AC_nx) * DCONST_REAL(AC_dsx))
|
||||
#define DOMAIN_SIZE_Y (DCONST_INT(AC_ny) * DCONST_REAL(AC_dsy))
|
||||
|
@@ -202,6 +202,7 @@ run_simulation(void)
|
||||
load_config(&mesh_info);
|
||||
|
||||
AcMesh* mesh = acmesh_create(mesh_info);
|
||||
//TODO: This need to be possible to define in astaroth.conf
|
||||
acmesh_init_to(INIT_TYPE_GAUSSIAN_RADIAL_EXPL, mesh);
|
||||
|
||||
acInit(mesh_info);
|
||||
|
Reference in New Issue
Block a user