-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Dan Wills' patterns to CMakeLists.txt and Help/changes.html. Fi…
…xed usual float/double issue for intolerant OpenCL drivers.
- Loading branch information
Showing
7 changed files
with
185 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,16 @@ | |
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor"> | ||
<RD format_version="4"> | ||
<description> | ||
A gray-scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e. | ||
The c reagent implements a diffuse kind of 'history' of the other reagents (ie so that gliders can leave a 'trail'). | ||
The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley 'wake' behind them). | ||
The extra reagents can feed back into the gray-scott ones, and also control the gray-scott parameters (including diffusion). | ||
Implemented by Dan Wills ([email protected]) based on existing work in the Ready codebase. | ||
A Gray-Scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e. | ||
The c reagent implements a diffuse kind of 'history' of the other reagents (ie so that gliders can leave a 'trail'). | ||
The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley 'wake' behind them). | ||
The extra reagents can feed back into the Gray-Scott ones, and also control the Gray-Scott parameters (including diffusion). | ||
|
||
Implemented by Dan Wills ([email protected]) based on existing work in the Ready codebase. | ||
|
||
This example starts as flowing maze-like growth which *usually* (not always) decays forming a flowing field of worms and solitons. When conditions are right, they switch back to this 'elevated' form of growth, that is both stronger growing and generally more maze-forming. The dynamic behaviour switching has an interesting long-term chaotic effect on the underlying behaviour, which would otherwise tend to end in a constant state or loop. | ||
This example starts as flowing maze-like growth which *usually* (not always) decays forming a flowing field of worms and solitons. When conditions are right, they switch back to this 'elevated' form of growth, that is both stronger growing and generally more maze-forming. The dynamic behaviour switching has an interesting long-term chaotic effect on the underlying behaviour, which would otherwise tend to end in a constant state or loop. | ||
|
||
There are very rare initial states that end up with the system stuck in the 'elevated' state, and it may stay that way for some time. So, if it looks flowing fingerprints and no dots for ages, you might need to generate a new initial state. | ||
There are very rare initial states that end up with the system stuck in the 'elevated' state, and it may stay that way for some time. So, if it looks flowing fingerprints and no dots for ages, you might need to generate a new initial state. | ||
</description> | ||
<rule name="Gray-Scott" type="formula" wrap="1" neighborhood_type="vertex" neighborhood_range="1" neighborhood_weight="laplacian"> | ||
<param name="timestep"> | ||
|
@@ -122,13 +123,13 @@ There are very rare initial states that end up with the system stuck in the 'ele | |
0.0056 | ||
</param> | ||
<formula number_of_chemicals="5"> | ||
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a; | ||
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b; | ||
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c; | ||
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max ); | ||
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp); | ||
delta_e = (laplacian_d) * wave_diffusion; | ||
delta_d = e + delta_e; | ||
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a; | ||
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b; | ||
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c; | ||
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max ); | ||
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp); | ||
delta_e = (laplacian_d) * wave_diffusion; | ||
delta_d = e + delta_e; | ||
</formula> | ||
|
||
</rule> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,15 @@ | |
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor"> | ||
<RD format_version="4"> | ||
<description> | ||
A gray-scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e. | ||
The c reagent implements a diffuse kind of 'history' of the other reagents (ie so that gliders can leave a 'trail'). | ||
The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley 'wake' behind them). | ||
The extra reagents can feed back into the gray-scott ones, and also control the gray-scott parameters (including diffusion). | ||
Implemented by Dan Wills ([email protected]) based on earlier work from the Ready codebase. | ||
A Gray-Scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e. | ||
|
||
The c reagent implements a diffuse kind of 'history' of the other reagents (ie so that gliders can leave a 'trail'). | ||
|
||
The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley 'wake' behind them). | ||
|
||
The extra reagents can feed back into the Gray-Scott ones, and also control the Gray-Scott parameters (including diffusion). | ||
|
||
Implemented by Dan Wills ([email protected]) based on earlier work from the Ready codebase. | ||
</description> | ||
<rule name="Gray-Scott" type="formula" wrap="1" neighborhood_type="vertex" neighborhood_range="1" neighborhood_weight="laplacian"> | ||
<param name="timestep"> | ||
|
@@ -118,13 +122,13 @@ Implemented by Dan Wills ([email protected]) based on earlier work from the Ready | |
0 | ||
</param> | ||
<formula number_of_chemicals="5"> | ||
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a; | ||
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b; | ||
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c; | ||
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max ); | ||
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp); | ||
delta_e = (laplacian_d) * wave_diffusion; | ||
delta_d = e + delta_e; | ||
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a; | ||
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b; | ||
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c; | ||
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max ); | ||
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp); | ||
delta_e = (laplacian_d) * wave_diffusion; | ||
delta_d = e + delta_e; | ||
</formula> | ||
|
||
</rule> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.