Skip to content
Snippets Groups Projects
Commit a3add110 authored by Martin Bauer's avatar Martin Bauer
Browse files

Added test for fluctuating LB generation

parent b4f97ca3
Branches fma
No related merge requests found
Pipeline #16864 failed with stage
in 2 minutes and 2 seconds
...@@ -24,11 +24,6 @@ ...@@ -24,11 +24,6 @@
#include "lbm/sweeps/Streaming.h" #include "lbm/sweeps/Streaming.h"
#include "{{class_name}}.h" #include "{{class_name}}.h"
{% for header in headers %}
#include {{header}}
{% endfor %}
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma warning( disable : 4458 ) # pragma warning( disable : 4458 )
#endif #endif
...@@ -48,6 +43,10 @@ ...@@ -48,6 +43,10 @@
# pragma GCC diagnostic ignored "-Wunused-parameter" # pragma GCC diagnostic ignored "-Wunused-parameter"
#endif #endif
{% for header in headers %}
#include {{header}}
{% endfor %}
using namespace std; using namespace std;
......
...@@ -75,6 +75,21 @@ class WalberlaLbmpyCodegenTest(unittest.TestCase): ...@@ -75,6 +75,21 @@ class WalberlaLbmpyCodegenTest(unittest.TestCase):
cr = create_lb_collision_rule(**parameters) cr = create_lb_collision_rule(**parameters)
generate_lattice_model(ctx, 'Model', cr) generate_lattice_model(ctx, 'Model', cr)
@staticmethod
def test_fluctuating():
with ManualCodeGenerationContext(openmp=True, double_accuracy=True) as ctx:
omega_shear, omega_bulk = sp.symbols("omega, omega_free")
force_field, vel_field = ps.fields("force(3), velocity(3): [3D]", layout='fzyx')
# the collision rule of the LB method where the some advanced features
collision_rule = create_lb_collision_rule(
stencil='D3Q19', compressible=True, fluctuating=True,
method='mrt3', relaxation_rates=[omega_shear, omega_bulk],
force_model='guo', force=force_field.center_vector,
optimization={'cse_global': False}
)
generate_lattice_model(ctx, 'FluctuatingMRT', collision_rule)
@staticmethod @staticmethod
def test_boundary(): def test_boundary():
with ManualCodeGenerationContext(openmp=True, double_accuracy=True) as ctx: with ManualCodeGenerationContext(openmp=True, double_accuracy=True) as ctx:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment