User config param overhaul complete, works. If I haven't missed anything, all fields and user parameters, and everything related to simulation can now be declared with the DSL. The only thing that you need to do is to fill the declared symbols with data, like with OpenGL and GLSL.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "stencil_definition.sdh"
|
||||
|
||||
Preprocessed Scalar
|
||||
value(in ScalarField vertex)
|
||||
{
|
||||
@@ -17,7 +19,7 @@ gradient(in ScalarField vertex)
|
||||
Preprocessed Scalar
|
||||
der6x_upwd(in ScalarField vertex)
|
||||
{
|
||||
Scalar inv_ds = DCONST_REAL(AC_inv_dsx);
|
||||
Scalar inv_ds = AC_inv_dsx;
|
||||
|
||||
return (Scalar){ Scalar(1.0/60.0)*inv_ds* (
|
||||
- Scalar(20.0)* vertex[vertexIdx.x, vertexIdx.y, vertexIdx.z]
|
||||
@@ -32,7 +34,7 @@ der6x_upwd(in ScalarField vertex)
|
||||
Preprocessed Scalar
|
||||
der6y_upwd(in ScalarField vertex)
|
||||
{
|
||||
Scalar inv_ds = DCONST_REAL(AC_inv_dsy);
|
||||
Scalar inv_ds = AC_inv_dsy;
|
||||
|
||||
return (Scalar){ Scalar(1.0/60.0)*inv_ds* (
|
||||
-Scalar( 20.0)* vertex[vertexIdx.x, vertexIdx.y, vertexIdx.z]
|
||||
@@ -47,7 +49,7 @@ der6y_upwd(in ScalarField vertex)
|
||||
Preprocessed Scalar
|
||||
der6z_upwd(in ScalarField vertex)
|
||||
{
|
||||
Scalar inv_ds = DCONST_REAL(AC_inv_dsz);
|
||||
Scalar inv_ds = AC_inv_dsz;
|
||||
|
||||
return (Scalar){ Scalar(1.0/60.0)*inv_ds* (
|
||||
-Scalar( 20.0)* vertex[vertexIdx.x, vertexIdx.y, vertexIdx.z]
|
||||
|
Reference in New Issue
Block a user