Skip to content

Commit

Permalink
Merge pull request #745 from ansys/fix/examples_doc_mapdl_errors
Browse files Browse the repository at this point in the history
Added exit call to avoid problems when building documentation
  • Loading branch information
SRaimondi authored Dec 19, 2024
2 parents db5c9f4 + 7e636ac commit 80f16ca
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/use_cases/01-optimizing-ply-angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,3 +493,6 @@ def get_max_irf_for_parameters(

plt.tight_layout()
plt.show()

# Close MAPDL instance
mapdl.exit()
3 changes: 3 additions & 0 deletions examples/workflows/01-pymapdl-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,6 @@
# %%
# Release the composite model to close the open streams to the result file.
composite_model = None # type: ignore

# Close MAPDL instance
mapdl.exit()
3 changes: 3 additions & 0 deletions examples/workflows/02-advanced-pymapdl-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,6 @@ def add_ply(mg, name, ply_material, angle, oss):
# Query and plot the results.
irf_field = output_all_elements.get_field({"failure_label": FailureOutput.FAILURE_VALUE})
irf_field.plot()

# Close MAPDL instance
mapdl.exit()
3 changes: 3 additions & 0 deletions examples/workflows/05-pymechanical-to-cdb-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,6 @@
{"failure_label": pydpf_composites.constants.FailureOutput.FAILURE_VALUE}
)
irf_field.plot()

# Close MAPDL instance
mapdl.exit()
3 changes: 3 additions & 0 deletions src/ansys/acp/core/extras/example_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,6 @@ def _run_analysis(model: "Model") -> None:
# %%
# Release composite model to close open streams to result file.
composite_model = None # type: ignore

# Close MAPDL instance
mapdl.exit()

0 comments on commit 80f16ca

Please sign in to comment.