Skip to content

Commit

Permalink
Update write_mesh.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FEA-eng authored Feb 19, 2024
1 parent bf8b5c3 commit 3bb565b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Mod/Fem/femsolver/calculix/write_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ def write_mesh(ccxwriter):
if ccxwriter.member.geos_fluidsection:
meshtools.write_D_network_element_to_inputfile(ccxwriter.femmesh_file)

# Use reduced integration beam elements if this option is enabled in ccx solver settings
if ccxwriter.solver_obj.BeamReducedIntegration is True:
meshtools.beam_reduced_integration(ccxwriter.femmesh_file)

Check failure on line 56 in src/Mod/Fem/femsolver/calculix/write_mesh.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Module 'femmesh.meshtools' has no 'beam_reduced_integration' member (no-member)

Check warning on line 57 in src/Mod/Fem/femsolver/calculix/write_mesh.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

<-- trailing whitespace
inpfile = codecs.open(ccxwriter.file_name, "w", encoding="utf-8")
inpfile.write("{}\n".format(59 * "*"))

Check warning on line 59 in src/Mod/Fem/femsolver/calculix/write_mesh.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
inpfile.write("** {}\n".format(write_name))

Check warning on line 60 in src/Mod/Fem/femsolver/calculix/write_mesh.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Formatting a regular string which could be an f-string (consider-using-f-string)
Expand All @@ -69,6 +73,10 @@ def write_mesh(ccxwriter):
# inpfile is closed
meshtools.write_D_network_element_to_inputfile(ccxwriter.femmesh_file)

# Use reduced integration beam elements if this option is enabled in ccx solver settings
if ccxwriter.solver_obj.BeamReducedIntegration is True:
meshtools.beam_reduced_integration(ccxwriter.femmesh_file)

Check failure on line 78 in src/Mod/Fem/femsolver/calculix/write_mesh.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Module 'femmesh.meshtools' has no 'beam_reduced_integration' member (no-member)

# reopen file with "append" to add all the rest
inpfile = codecs.open(ccxwriter.femmesh_file, "a", encoding="utf-8")

Check warning on line 81 in src/Mod/Fem/femsolver/calculix/write_mesh.py

View workflow job for this annotation

GitHub Actions / Lint / Lint

Consider using 'with' for resource-allocating operations (consider-using-with)
inpfile.write("\n\n")
Expand Down

0 comments on commit 3bb565b

Please sign in to comment.