Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 24, 2022
1 parent d4b281d commit 0147f25
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pymech/meshtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def extrude(mesh: HexaData, z, bc1=["P"], bc2=["P"], internal_bcs=True):
return -3
# Is it possible to have periodic conditions for only some of the fields? If not, we should check for it too.
for bc1_field, bc2_field in zip(bc1, bc2):
if (bc1_field == "P" and bc2_field != "P") or (bc1_field != "P" and bc2_field == "P"):
if (bc1_field == "P" and bc2_field != "P") or (
bc1_field != "P" and bc2_field == "P"
):
logger.critical(
"Inconsistent boundary conditions: one end is periodic ('P') but the other isn't"
)
Expand Down Expand Up @@ -1515,7 +1517,15 @@ def build_connectivity(mesh, ni, nj):
build_connectivity(box_square, ns, ns)
# boundary conditions: dummy BCs to signal that the faces should be glued
connectivity_bc = ["con"] * nbc
apply_bcs(box_square, ns, ns, connectivity_bc, connectivity_bc, connectivity_bc, connectivity_bc)
apply_bcs(
box_square,
ns,
ns,
connectivity_bc,
connectivity_bc,
connectivity_bc,
connectivity_bc,
)

# Box 2: quarter-O
nel_o = no * ns
Expand Down

0 comments on commit 0147f25

Please sign in to comment.