Skip to content

Commit

Permalink
Merge pull request #56 from isteinbrecher/dont-print-emppyt-bc-sections
Browse files Browse the repository at this point in the history
Dont print empyt BC sections to input file
  • Loading branch information
isteinbrecher authored Feb 11, 2025
2 parents 923f86d + 4e11329 commit 37d7a0d
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 38 deletions.
11 changes: 6 additions & 5 deletions cubitpy/cubitpy_to_dat.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,12 @@ def add_node_sets(dat_lines, cubit, exo):
],
]
for geo, section_name, set_label in name_geometry_tuple:
dat_lines.append(section_name)
for i_set, node_set in enumerate(node_sets[geo]):
node_set.sort()
for i_node in node_set:
dat_lines.append(f"NODE {i_node:6d} {set_label} {i_set+1}")
if len(node_sets[geo]) > 0:
dat_lines.append(section_name)
for i_set, node_set in enumerate(node_sets[geo]):
node_set.sort()
for i_node in node_set:
dat_lines.append(f"NODE {i_node:6d} {set_label} {i_set+1}")


def get_element_connectivity_string(connectivity):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
----------------------------------------BEAM INTERACTION/BEAM TO SOLID SURFACE CONTACT SURFACE
// block1_contact_side
E 1 COUPLING_ID 1
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 1 DSURFACE 1
NODE 4 DSURFACE 1
NODE 5 DSURFACE 1
NODE 8 DSURFACE 1
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD -5.0000000000000000e-01 -5.0000000000000000e-01 5.0000000000000000e-01
NODE 2 COORD -5.0000000000000000e-01 -5.0000000000000000e-01 -5.0000000000000000e-01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
E 1 0 Master
// block2_contact_side
E 2 0 Slave
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 1 DSURFACE 1
NODE 4 DSURFACE 1
Expand All @@ -15,7 +13,6 @@ NODE 9 DSURFACE 2
NODE 10 DSURFACE 2
NODE 11 DSURFACE 2
NODE 12 DSURFACE 2
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD -5.0000000000000000e-01 -5.0000000000000000e-01 5.0000000000000000e-01
NODE 2 COORD -5.0000000000000000e-01 -5.0000000000000000e-01 -5.0000000000000000e-01
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_create_block.dat
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ E 4 NUMDOF 6 ONOFF 1 1 1 0 0 0 VAL 0.0 0.0 0.0 0.0 0.0 0.0 FUNCT 0 0 0 0 0 0
E 5 NUMDOF 6 ONOFF 1 1 1 0 0 0 VAL 0.0 0.0 0.0 0.0 0.0 0.0 FUNCT 0 0 0 0 0 0
// load5
E 6 NUMDOF 6 ONOFF 1 1 1 0 0 0 VAL 0.0 0.0 0.0 0.0 0.0 0.0 FUNCT 0 0 0 0 0 0
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 1 DSURFACE 1
NODE 4 DSURFACE 1
Expand Down Expand Up @@ -192,7 +190,6 @@ NODE 132 DSURFACE 6
NODE 133 DSURFACE 6
NODE 134 DSURFACE 6
NODE 135 DSURFACE 6
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD -5.0000000000000003e-02 -5.0000000000000000e-01 0.0000000000000000e+00
NODE 2 COORD -5.0000000000000003e-02 -5.0000000000000000e-01 -1.2500000000000000e+00
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_cubit_tutorial.dat
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ E 1 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
----------------------------------------DESIGN SURF NEUMANN CONDITIONS
// load
E 2 NUMDOF 3 ONOFF 0 1 0 VAL 0 0.1 0 FUNCT 0 1 0
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 18 DSURFACE 1
NODE 20 DSURFACE 1
Expand All @@ -70,7 +68,6 @@ NODE 11 DSURFACE 2
NODE 35 DSURFACE 2
NODE 36 DSURFACE 2
NODE 37 DSURFACE 2
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD 1.8369701987210294e-16 3.0000000000000000e+00 0.0000000000000000e+00
NODE 2 COORD 2.1213203435596428e+00 2.1213203435596419e+00 0.0000000000000000e+00
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_element_types_hex.dat
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ E 2 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
E 3 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
// fix_3
E 4 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 1 DSURFACE 1
NODE 2 DSURFACE 1
Expand All @@ -44,7 +42,6 @@ NODE 124 DSURFACE 4
NODE 125 DSURFACE 4
NODE 128 DSURFACE 4
NODE 129 DSURFACE 4
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD 9.0000000000000002e-01 0.0000000000000000e+00 0.0000000000000000e+00
NODE 2 COORD 1.1000000000000001e+00 0.0000000000000000e+00 0.0000000000000000e+00
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_element_types_tet.dat
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ DISPLACEMENT Yes
E 1 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
// fix_1
E 2 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 1 DSURFACE 1
NODE 3 DSURFACE 1
Expand All @@ -24,7 +22,6 @@ NODE 8 DSURFACE 2
NODE 11 DSURFACE 2
NODE 12 DSURFACE 2
NODE 14 DSURFACE 2
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD 5.9999999999999998e-01 -1.0392304845413263e+00 -5.0000000000000000e-01
NODE 2 COORD 5.9999999999999998e-01 1.0392304845413263e+00 -5.0000000000000000e-01
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_fluid_functionality.dat
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ E 1 1
----------------------------------------FLUID NEUMANN INFLOW SURF CONDITIONS
// inflow_stabilization
E 2 1
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 1 DSURFACE 1
NODE 2 DSURFACE 1
Expand All @@ -16,7 +14,6 @@ NODE 3 DSURFACE 2
NODE 6 DSURFACE 2
NODE 8 DSURFACE 2
NODE 9 DSURFACE 2
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD -5.0000000000000000e-01 -5.0000000000000000e-01 5.0000000000000000e-01
NODE 2 COORD 5.0000000000000000e-01 -5.0000000000000000e-01 5.0000000000000000e-01
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_fsi_functionality.dat
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ E 2 1
----------------------------------------DESIGN SURF ALE DIRICH CONDITIONS
// ale_dirichlet_side
E 3 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 9 DSURFACE 1
NODE 12 DSURFACE 1
Expand All @@ -22,7 +20,6 @@ NODE 9 DSURFACE 3
NODE 10 DSURFACE 3
NODE 11 DSURFACE 3
NODE 12 DSURFACE 3
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD -5.0000000000000000e-01 -5.0000000000000000e-01 5.0000000000000000e-01
NODE 2 COORD -5.0000000000000000e-01 -5.0000000000000000e-01 -5.0000000000000000e-01
Expand Down
2 changes: 0 additions & 2 deletions tests/input-files-ref/test_groups.dat
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ NODE 75 DNODE 2
NODE 76 DNODE 2
NODE 79 DNODE 2
NODE 80 DNODE 2
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
NODE 1 DSURFACE 1
NODE 2 DSURFACE 1
Expand Down Expand Up @@ -236,7 +235,6 @@ NODE 17 DSURFACE 4
NODE 19 DSURFACE 4
NODE 20 DSURFACE 4
NODE 23 DSURFACE 4
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD -2.0000000000000000e+00 -1.0000000000000000e+00 5.0000000000000000e-01
NODE 2 COORD -2.0000000000000000e+00 -1.0000000000000000e+00 0.0000000000000000e+00
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_groups_multiple_sets.dat
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ E 1 NUMDOF 3 ONOFF 1 1 1 VAL 0 0 0 FUNCT 0 0 0
----------------------------------------DESIGN VOL NEUMANN CONDITIONS
// all_vol_1
E 2 NUMDOF 3 ONOFF 0 0 1 VAL 0 0 1 FUNCT 0 0 0
-----------------------------------------------DNODE-NODE TOPOLOGY
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
-----------------------------------------------DVOL-NODE TOPOLOGY
NODE 1 DVOL 1
NODE 2 DVOL 1
Expand Down
3 changes: 0 additions & 3 deletions tests/input-files-ref/test_point_coupling.dat
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ NODE 27 DNODE 12
NODE 62 DNODE 12
NODE 17 DNODE 13
NODE 36 DNODE 13
-----------------------------------------------DLINE-NODE TOPOLOGY
-----------------------------------------------DSURF-NODE TOPOLOGY
-----------------------------------------------DVOL-NODE TOPOLOGY
-------------------------------------------------------NODE COORDS
NODE 1 COORD -5.0000000000000000e-01 -1.0000000000000000e+00 5.0000000000000000e-01
NODE 2 COORD -5.0000000000000000e-01 -1.0000000000000000e+00 0.0000000000000000e+00
Expand Down
1 change: 0 additions & 1 deletion tests/testing_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"""This script is used to test the tutorial."""

import os
import sys
import unittest

from cubitpy_tutorial import cubit_step_by_step_tutorial_cli
Expand Down

0 comments on commit 37d7a0d

Please sign in to comment.