wolfhece 2.0.11__py3-none-any.whl → 2.0.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wolfhece/PyDraw.py +139 -57
- wolfhece/PyGui.py +55 -47
- wolfhece/PyPalette.py +8 -1
- wolfhece/Results2DGPU.py +1 -1
- wolfhece/mesh2d/bc_manager.py +1 -1
- wolfhece/scenario/config_manager.py +10 -5
- wolfhece/scenario/imposebc_void.py +5 -1
- wolfhece/shaders/quad_geom_shader.glsl +33 -0
- wolfhece/shaders/simple_vertex_shader_wo_mvp.glsl +7 -0
- wolfhece/wolf_array.py +379 -157
- wolfhece/wolfresults_2D.py +57 -11
- {wolfhece-2.0.11.dist-info → wolfhece-2.0.13.dist-info}/METADATA +1 -1
- {wolfhece-2.0.11.dist-info → wolfhece-2.0.13.dist-info}/RECORD +16 -14
- {wolfhece-2.0.11.dist-info → wolfhece-2.0.13.dist-info}/WHEEL +0 -0
- {wolfhece-2.0.11.dist-info → wolfhece-2.0.13.dist-info}/entry_points.txt +0 -0
- {wolfhece-2.0.11.dist-info → wolfhece-2.0.13.dist-info}/top_level.txt +0 -0
@@ -615,13 +615,14 @@ class Config_Manager_2D_GPU:
|
|
615
615
|
if (self.workingdir / 'bathymetry.tif').exists():
|
616
616
|
locheader = self.get_header()
|
617
617
|
infilzones = WolfArray(srcheader=locheader, whichtype= WOLF_ARRAY_FULL_INTEGER)
|
618
|
-
infilzones.array.data[:,:] =
|
619
|
-
infilzones.
|
618
|
+
infilzones.array.data[:,:] = 0
|
619
|
+
infilzones.nullvalue = -1
|
620
|
+
infilzones.write_all(str(self.workingdir / 'infiltration.tif'))
|
620
621
|
|
621
|
-
if (self.workingdir / '
|
622
|
-
logging.info(_('
|
622
|
+
if (self.workingdir / 'infiltration.tif').exists():
|
623
|
+
logging.info(_('infiltration.tif created and set to -1 ! -- Please edit it !'))
|
623
624
|
else:
|
624
|
-
logging.error(_("
|
625
|
+
logging.error(_("infiltration.tif not created ! -- Does 'bathymetry.tif' or any '.tif' file exist in the root directory ?"))
|
625
626
|
else:
|
626
627
|
logging.error(_("No 'bathymetry.tif' file found in the root directory !"))
|
627
628
|
|
@@ -1118,6 +1119,10 @@ class UI_Manager_2D_GPU():
|
|
1118
1119
|
|
1119
1120
|
self._parent.load_data()
|
1120
1121
|
|
1122
|
+
if allsims is None:
|
1123
|
+
logging.error(_('No simulation created !'))
|
1124
|
+
return
|
1125
|
+
|
1121
1126
|
if len(allsims)>0:
|
1122
1127
|
|
1123
1128
|
self._txtctrl.write(_('You have created {} simulations\n\n'.format(len(allsims))))
|
@@ -3,11 +3,15 @@ import ast
|
|
3
3
|
import importlib.util
|
4
4
|
from pathlib import Path
|
5
5
|
import tempfile
|
6
|
+
import logging
|
6
7
|
|
7
8
|
from wolfhece.wolf_array import WolfArray
|
8
9
|
from wolfhece.PyVertexvectors import Zones, zone, vector, wolfvertex
|
9
|
-
from wolfgpu.simple_simulation import SimpleSimulation, BoundaryConditionsTypes, Direction
|
10
10
|
|
11
|
+
try:
|
12
|
+
from wolfgpu.simple_simulation import SimpleSimulation, BoundaryConditionsTypes, Direction
|
13
|
+
except:
|
14
|
+
logging.error(_('WOLFGPU not installed !'))
|
11
15
|
|
12
16
|
class Impose_Boundary_Conditions:
|
13
17
|
"""
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#version 460 core
|
2
|
+
|
3
|
+
layout (points) in;
|
4
|
+
layout (triangle_strip, max_vertices = 4) out;
|
5
|
+
|
6
|
+
uniform sampler2D texture;
|
7
|
+
uniform float zScale;
|
8
|
+
uniform float dx;
|
9
|
+
uniform float origx;
|
10
|
+
uniform float origy;
|
11
|
+
|
12
|
+
void main() {
|
13
|
+
|
14
|
+
float halfdx = dx/2.0;
|
15
|
+
|
16
|
+
vec2 texCoord = (gl_in[0].gl_Position.xy - vec2(origx, origy)) / dx + 0.5;
|
17
|
+
|
18
|
+
float zValue = texture(texture, texCoord).r * zScale;
|
19
|
+
|
20
|
+
gl_Position = vec4(gl_in[0].gl_Position.x - halfdx, gl_in[0].gl_Position.y - halfdx, zValue, 1.0);
|
21
|
+
EmitVertex();
|
22
|
+
|
23
|
+
gl_Position = vec4(gl_in[0].gl_Position.x + halfdx, gl_in[0].gl_Position.y - halfdx, zValue, 1.0);
|
24
|
+
EmitVertex();
|
25
|
+
|
26
|
+
gl_Position = vec4(gl_in[0].gl_Position.x + halfdx, gl_in[0].gl_Position.y + halfdx, zValue, 1.0);
|
27
|
+
EmitVertex();
|
28
|
+
|
29
|
+
gl_Position = vec4(gl_in[0].gl_Position.x - halfdx, gl_in[0].gl_Position.y + halfdx, zValue, 1.0);
|
30
|
+
EmitVertex();
|
31
|
+
|
32
|
+
EndPrimitive();
|
33
|
+
}
|