mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
18 lines
547 B
Python
18 lines
547 B
Python
|
|
import pytest
|
|
from netgen.csg import *
|
|
|
|
@pytest.mark.parametrize("outside", [True, False])
|
|
def test_boundarylayer(outside):
|
|
mesh = unit_cube.GenerateMesh(maxh=0.3)
|
|
ne_before = mesh.ne
|
|
nse_in_layer = 0
|
|
layer_surfacenames = ["right", "top"]
|
|
for el in mesh.Elements2D():
|
|
if mesh.GetBCName(el.index-1) in layer_surfacenames:
|
|
nse_in_layer += 1
|
|
mesh.BoundaryLayer("|".join(layer_surfacenames), [0.01, 0.02], "layer", outside=outside, grow_edges=True)
|
|
assert mesh.ne == ne_before + 2 * nse_in_layer
|
|
|
|
|