From a3ab8e88244eea1788a281938055ca7916378602 Mon Sep 17 00:00:00 2001 From: German <germanmartinezayuso@gmail.com> Date: Thu, 15 Dec 2022 18:18:27 +0100 Subject: [PATCH] line length formatting --- .pre-commit-config.yaml | 13 ++-- doc/source/conf.py | 8 ++- .../00-mapdl-examples/2d_plate_with_a_hole.py | 15 +++- examples/00-mapdl-examples/composite_dcb.py | 11 ++- examples/00-mapdl-examples/cyclic_analysis.py | 4 +- .../exhaust_manifold_thermal_stress.py | 6 +- examples/00-mapdl-examples/path_operations.py | 6 +- examples/02-geometry/00-keypoints.py | 5 +- .../00-how_finite_element_works.py | 13 +++- .../vm-006-pinched_cylinder.py | 7 +- ...-plastic_compression_of_a_pipe_assembly.py | 23 +++++- .../mapdl/core/_commands/apdl/array_param.py | 19 ++++- .../mapdl/core/_commands/apdl/matrix_op.py | 9 ++- .../core/_commands/aux12_/radiosity_solver.py | 9 ++- src/ansys/mapdl/core/_commands/aux3_.py | 9 ++- src/ansys/mapdl/core/_commands/conn.py | 18 ++++- .../core/_commands/database/coord_sys.py | 7 +- .../mapdl/core/_commands/database/picking.py | 7 +- .../core/_commands/database/selecting.py | 67 ++++++++++++++++-- .../core/_commands/database/working_plane.py | 36 +++++++++- .../core/_commands/graphics_/annotation.py | 12 +++- .../core/_commands/graphics_/labeling.py | 12 +++- .../mapdl/core/_commands/post1_/animation.py | 9 ++- .../core/_commands/post1_/element_table.py | 36 ++++++++-- .../mapdl/core/_commands/post1_/listing.py | 18 ++++- .../core/_commands/post1_/path_operations.py | 10 ++- .../mapdl/core/_commands/post1_/special.py | 9 ++- .../_commands/post1_/surface_operations.py | 8 ++- .../mapdl/core/_commands/post26_/controls.py | 9 ++- .../mapdl/core/_commands/post26_/listing.py | 9 ++- .../core/_commands/post26_/operations.py | 13 +++- .../mapdl/core/_commands/post26_/special.py | 10 ++- .../mapdl/core/_commands/preproc/areas.py | 20 +++++- .../core/_commands/preproc/element_type.py | 6 +- .../mapdl/core/_commands/preproc/elements.py | 20 +++++- .../_commands/preproc/explicit_dynamics.py | 10 ++- .../core/_commands/preproc/hard_points.py | 10 ++- .../mapdl/core/_commands/preproc/keypoints.py | 32 ++++++++- .../mapdl/core/_commands/preproc/lines.py | 20 +++++- .../_commands/preproc/material_data_tables.py | 7 +- .../mapdl/core/_commands/preproc/materials.py | 24 ++++++- .../mapdl/core/_commands/preproc/meshing.py | 70 +++++++++++++++++-- .../core/_commands/preproc/primitives.py | 9 ++- .../core/_commands/preproc/real_constants.py | 28 +++++++- .../mapdl/core/_commands/preproc/sections.py | 10 ++- .../core/_commands/preproc/special_purpose.py | 18 ++++- .../mapdl/core/_commands/preproc/volumes.py | 20 +++++- .../core/_commands/reduced/generation.py | 10 ++- .../mapdl/core/_commands/reduced/use_pass.py | 19 ++++- .../_commands/solution/analysis_options.py | 33 +++++++-- .../core/_commands/solution/fe_body_loads.py | 20 +++++- .../core/_commands/solution/fe_constraints.py | 9 ++- .../_commands/solution/miscellaneous_loads.py | 10 ++- .../mapdl/core/_commands/solution/ocean.py | 10 ++- .../_commands/solution/spectrum_options.py | 11 ++- src/ansys/mapdl/core/_version.py | 15 +++- src/ansys/mapdl/core/commands.py | 5 +- src/ansys/mapdl/core/convert.py | 20 ++++-- src/ansys/mapdl/core/database/database.py | 4 +- src/ansys/mapdl/core/krylov.py | 8 ++- src/ansys/mapdl/core/launcher.py | 9 ++- src/ansys/mapdl/core/licensing.py | 3 +- src/ansys/mapdl/core/logging.py | 9 ++- src/ansys/mapdl/core/mapdl.py | 39 +++++++++-- src/ansys/mapdl/core/mapdl_console.py | 19 +++-- src/ansys/mapdl/core/mapdl_grpc.py | 50 ++++++++++--- src/ansys/mapdl/core/math.py | 30 ++++++-- src/ansys/mapdl/core/mesh_grpc.py | 5 +- src/ansys/mapdl/core/plotting.py | 25 +++++-- src/ansys/mapdl/core/post.py | 47 +++++++++---- src/ansys/mapdl/core/xpl.py | 9 ++- tests/conftest.py | 13 +++- tests/test_commands.py | 8 ++- tests/test_convert.py | 8 ++- tests/test_corba.py | 9 ++- tests/test_element.py | 7 +- tests/test_launcher.py | 7 +- tests/test_logging.py | 14 +++- tests/test_mapdl.py | 14 +++- tests/test_parameters.py | 4 +- tests/test_plotting.py | 20 ++++-- tests/test_post.py | 6 +- 82 files changed, 1097 insertions(+), 183 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f60787b74b..3f45eb096e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,17 @@ repos: -- repo: https://github.com/psf/black - rev: 22.10.0 - hooks: - - id: black - repo: https://github.com/pycqa/isort - rev: 5.10.1 + rev: 5.11.2 hooks: - id: isort +- repo: https://github.com/psf/black + rev: 22.12.0 + hooks: + - id: black + args: + - --line-length=88 + - repo: https://github.com/PyCQA/flake8 rev: 6.0.0 hooks: diff --git a/doc/source/conf.py b/doc/source/conf.py index fbd239f1fc..e45a4f763c 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -254,7 +254,13 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, "ansys.mapdl.core", "ansys.mapdl.core Documentation", [author], 1) + ( + master_doc, + "ansys.mapdl.core", + "ansys.mapdl.core Documentation", + [author], + 1, + ) ] diff --git a/examples/00-mapdl-examples/2d_plate_with_a_hole.py b/examples/00-mapdl-examples/2d_plate_with_a_hole.py index 8563bd9b4f..c4ab2bcc7d 100644 --- a/examples/00-mapdl-examples/2d_plate_with_a_hole.py +++ b/examples/00-mapdl-examples/2d_plate_with_a_hole.py @@ -98,7 +98,12 @@ mapdl.esize(plate_esize) mapdl.amesh(plate_with_hole_anum) mapdl.eplot( - vtk=True, cpos="xy", show_edges=True, show_axes=False, line_width=2, background="w" + vtk=True, + cpos="xy", + show_edges=True, + show_axes=False, + line_width=2, + background="w", ) ############################################################################### @@ -160,7 +165,13 @@ # grab the result from the ``mapdl`` instance result = mapdl.result result.plot_principal_nodal_stress( - 0, "SEQV", lighting=False, cpos="xy", background="w", text_color="k", add_text=False + 0, + "SEQV", + lighting=False, + cpos="xy", + background="w", + text_color="k", + add_text=False, ) nnum, stress = result.principal_nodal_stress(0) diff --git a/examples/00-mapdl-examples/composite_dcb.py b/examples/00-mapdl-examples/composite_dcb.py index 9a804d5c37..31eba483fd 100644 --- a/examples/00-mapdl-examples/composite_dcb.py +++ b/examples/00-mapdl-examples/composite_dcb.py @@ -223,7 +223,11 @@ # Apply the fix condition mapdl.allsel() mapdl.nsel( - type_="s", item="loc", comp="x", vmin=length + pre_crack, vmax=length + pre_crack + type_="s", + item="loc", + comp="x", + vmin=length + pre_crack, + vmax=length + pre_crack, ) mapdl.d(node="all", lab="ux", value=0.0) mapdl.d(node="all", lab="uy", value=0.0) @@ -435,7 +439,10 @@ # an animation. disp = model.results.displacement.on_all_time_freqs.eval() camera_pos = disp.animate( - scale_factor=10.0, save_as="dcb_animate.gif", return_cpos=True, show_axes=True + scale_factor=10.0, + save_as="dcb_animate.gif", + return_cpos=True, + show_axes=True, ) ############################################################################### diff --git a/examples/00-mapdl-examples/cyclic_analysis.py b/examples/00-mapdl-examples/cyclic_analysis.py index 71d16084dd..a78a08211f 100644 --- a/examples/00-mapdl-examples/cyclic_analysis.py +++ b/examples/00-mapdl-examples/cyclic_analysis.py @@ -44,7 +44,9 @@ def gen_sector(mapdl, sectors): # radius rad = 0.01 # M arc = pv.CircularArc( - [rad, 0, 0], [np.cos(arc_end) * rad, np.sin(arc_end) * rad, 0], [0, 0, 0] + [rad, 0, 0], + [np.cos(arc_end) * rad, np.sin(arc_end) * rad, 0], + [0, 0, 0], ) # interior circle diff --git a/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py b/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py index 7c79545811..ad26252e0f 100644 --- a/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py +++ b/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py @@ -109,7 +109,11 @@ # Perform data mapping inter_grid = grid.interpolate( - wrapped, sharpness=5, radius=0.0001, strategy="closest_point", progress_bar=True + wrapped, + sharpness=5, + radius=0.0001, + strategy="closest_point", + progress_bar=True, ) # Map the imported data to MAPDL grid inter_grid.plot(show_edges=False) # Plot the interpolated data on MAPDL grid temperature_load_val = pv.convert_array( diff --git a/examples/00-mapdl-examples/path_operations.py b/examples/00-mapdl-examples/path_operations.py index 31fb2bb903..95579515df 100644 --- a/examples/00-mapdl-examples/path_operations.py +++ b/examples/00-mapdl-examples/path_operations.py @@ -190,7 +190,11 @@ scalar_bar_args={"title": "Stress YZ"}, ) pl.add_mesh( - stress_slice, scalars="Stress YZ", opacity=0.25, clim=clim, show_scalar_bar=False + stress_slice, + scalars="Stress YZ", + opacity=0.25, + clim=clim, + show_scalar_bar=False, ) pl.add_mesh(rst.grid, color="w", style="wireframe", show_scalar_bar=False) pl.camera_position = cpos diff --git a/examples/02-geometry/00-keypoints.py b/examples/02-geometry/00-keypoints.py index 76bf4f452f..f4fe41084a 100644 --- a/examples/02-geometry/00-keypoints.py +++ b/examples/02-geometry/00-keypoints.py @@ -138,7 +138,10 @@ # There are a variety of plotting options available for all the common # plotting methods. mapdl.kplot( - show_keypoint_numbering=True, background="black", show_bounds=True, font_size=26 + show_keypoint_numbering=True, + background="black", + show_bounds=True, + font_size=26, ) ############################################################################### diff --git a/examples/04-general-fea/00-how_finite_element_works.py b/examples/04-general-fea/00-how_finite_element_works.py index 46ffc016ef..3cd3c3791b 100644 --- a/examples/04-general-fea/00-how_finite_element_works.py +++ b/examples/04-general-fea/00-how_finite_element_works.py @@ -145,7 +145,12 @@ def __init__(self, nodes): def shape_functions(self, s, t): return 0.25 * np.array( - [(1 - s) * (1 - t), (1 + s) * (1 - t), (1 + s) * (1 + t), (1 - s) * (1 + t)], + [ + (1 - s) * (1 - t), + (1 + s) * (1 - t), + (1 + s) * (1 + t), + (1 - s) * (1 + t), + ], dtype=float, ) @@ -553,7 +558,8 @@ def __init__(self, ex, nu): def evaluate(self): d = np.array( - [[1, self.nu, 0], [self.nu, 1, 0], [0, 0, (1 - self.nu) / 2.0]], dtype=float + [[1, self.nu, 0], [self.nu, 1, 0], [0, 0, (1 - self.nu) / 2.0]], + dtype=float, ) return d * (self.ex / (1 - self.nu**2)) @@ -772,7 +778,8 @@ def __init__(self, ex, nu): def evaluate(self): d = np.array( - [[1, self.nu, 0], [self.nu, 1, 0], [0, 0, (1 - self.nu) / 2.0]], dtype=float + [[1, self.nu, 0], [self.nu, 1, 0], [0, 0, (1 - self.nu) / 2.0]], + dtype=float, ) return d * (self.ex / (1 - self.nu**2)) diff --git a/examples/06-verif-manual/vm-006-pinched_cylinder.py b/examples/06-verif-manual/vm-006-pinched_cylinder.py index bd61ec56a6..e53f473817 100644 --- a/examples/06-verif-manual/vm-006-pinched_cylinder.py +++ b/examples/06-verif-manual/vm-006-pinched_cylinder.py @@ -239,7 +239,12 @@ def meshing(): # Plot the nodes using VTK. mapdl.nplot( - vtk=True, nnum=True, background="", cpos="iso", show_bounds=True, point_size=10 + vtk=True, + nnum=True, + background="", + cpos="iso", + show_bounds=True, + point_size=10, ) # Print the list of nodes. diff --git a/examples/06-verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py b/examples/06-verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py index 29ed4b535c..fc2f33655c 100644 --- a/examples/06-verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py +++ b/examples/06-verif-manual/vm-007-plastic_compression_of_a_pipe_assembly.py @@ -215,7 +215,10 @@ ) # Define stress - strain properties of the aluminum. -aluminum = {"stress_a": [0, 55000, 55000, 55000], "strain_a": [0, 0.05, 0.1, 0.2]} +aluminum = { + "stress_a": [0, 55000, 55000, 55000], + "strain_a": [0, 0.05, 0.1, 0.2], +} # Define yielding strength point of the Aluminum on the curve. xp = aluminum["strain_a"][1] @@ -492,7 +495,11 @@ def getload(): load_181 = load_181_theta * 360 / theta # Return load results of each element model. - return abs(round(load_288, 0)), abs(round(load_185, 0)), abs(round(load_181, 0)) + return ( + abs(round(load_288, 0)), + abs(round(load_185, 0)), + abs(round(load_181, 0)), + ) ############################################################################### @@ -525,7 +532,17 @@ def getload(): # - 3rd Load Step with deflection :math:`\delta = 0.1 (in)` has :math:`load_3 = 1262000\,(lb)`. target_res = np.asarray( - [1024400, 1262000, 1262000, 1024400, 1262000, 1262000, 1024400, 1262000, 1262000] + [ + 1024400, + 1262000, + 1262000, + 1024400, + 1262000, + 1262000, + 1024400, + 1262000, + 1262000, + ] ) simulation_res = np.asarray( diff --git a/src/ansys/mapdl/core/_commands/apdl/array_param.py b/src/ansys/mapdl/core/_commands/apdl/array_param.py index f807a1972e..f082576692 100644 --- a/src/ansys/mapdl/core/_commands/apdl/array_param.py +++ b/src/ansys/mapdl/core/_commands/apdl/array_param.py @@ -466,7 +466,14 @@ def starvput( return self.run(command, **kwargs) def sread( - self, strarray="", fname="", ext="", nchar="", nskip="", nread="", **kwargs + self, + strarray="", + fname="", + ext="", + nchar="", + nskip="", + nread="", + **kwargs, ): """Reads a file into a string array parameter. @@ -509,7 +516,15 @@ def sread( return self.run(command, **kwargs) def toper( - self, parr="", par1="", oper="", par2="", fact1="", fact2="", con1="", **kwargs + self, + parr="", + par1="", + oper="", + par2="", + fact1="", + fact2="", + con1="", + **kwargs, ): """Operates on table parameters. diff --git a/src/ansys/mapdl/core/_commands/apdl/matrix_op.py b/src/ansys/mapdl/core/_commands/apdl/matrix_op.py index 374cb92dfb..f03dc64034 100644 --- a/src/ansys/mapdl/core/_commands/apdl/matrix_op.py +++ b/src/ansys/mapdl/core/_commands/apdl/matrix_op.py @@ -197,7 +197,14 @@ def eigen(self, kmatrix="", mmatrix="", cmatrix="", evals="", evects="", **kwarg return self.run(command, **kwargs) def export( - self, matrix="", format_="", fname="", val1="", val2="", val3="", **kwargs + self, + matrix="", + format_="", + fname="", + val1="", + val2="", + val3="", + **kwargs, ): """Exports a matrix to a file in the specified format. diff --git a/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py b/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py index a1fca56a14..7201c54824 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py +++ b/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py @@ -299,7 +299,14 @@ def vfsm(self, action="", encl="", opt="", maxiter="", conv="", **kwargs): return self.run(command, **kwargs) def vfopt( - self, opt="", filename="", ext="", dir_="", filetype="", fileformat="", **kwargs + self, + opt="", + filename="", + ext="", + dir_="", + filetype="", + fileformat="", + **kwargs, ): """Specifies options for the view factor file and calculates view factors. diff --git a/src/ansys/mapdl/core/_commands/aux3_.py b/src/ansys/mapdl/core/_commands/aux3_.py index ac799bfe1e..295f5e96ca 100644 --- a/src/ansys/mapdl/core/_commands/aux3_.py +++ b/src/ansys/mapdl/core/_commands/aux3_.py @@ -50,7 +50,14 @@ def fileaux3(self, fname="", ext="", **kwargs): return self.run(command, **kwargs) def modify( - self, set_="", lstep="", iter_="", cumit="", time="", ktitle="", **kwargs + self, + set_="", + lstep="", + iter_="", + cumit="", + time="", + ktitle="", + **kwargs, ): """Changes the listed values of the data in a set. diff --git a/src/ansys/mapdl/core/_commands/conn.py b/src/ansys/mapdl/core/_commands/conn.py index abea3bc7b8..bc8caedd1f 100644 --- a/src/ansys/mapdl/core/_commands/conn.py +++ b/src/ansys/mapdl/core/_commands/conn.py @@ -107,7 +107,14 @@ def catiain(self, name="", extension="", path="", blank="", **kwargs): return self.run(f"~CATIAIN,{name},{extension},{path},,,{blank}", **kwargs) def parain( - self, name="", extension="", path="", entity="", fmt="", scale="", **kwargs + self, + name="", + extension="", + path="", + entity="", + fmt="", + scale="", + **kwargs, ): """Transfers a Parasolid file into the ANSYS program. @@ -277,7 +284,14 @@ def satin( return self.run(command, **kwargs) def ugin( - self, name="", extension="", path="", entity="", layer="", fmt="", **kwargs + self, + name="", + extension="", + path="", + entity="", + layer="", + fmt="", + **kwargs, ): """Transfers an NX part into the ANSYS program. diff --git a/src/ansys/mapdl/core/_commands/database/coord_sys.py b/src/ansys/mapdl/core/_commands/database/coord_sys.py index f85778e10f..97008afbc2 100644 --- a/src/ansys/mapdl/core/_commands/database/coord_sys.py +++ b/src/ansys/mapdl/core/_commands/database/coord_sys.py @@ -357,7 +357,12 @@ def cswpla(self, kcn="", kcs="", par1="", par2="", **kwargs): This command is valid in any processor. """ - command = "CSWPLA,%s,%s,%s,%s" % (str(kcn), str(kcs), str(par1), str(par2)) + command = "CSWPLA,%s,%s,%s,%s" % ( + str(kcn), + str(kcs), + str(par1), + str(par2), + ) return self.run(command, **kwargs) def csys(self, kcn="", **kwargs): diff --git a/src/ansys/mapdl/core/_commands/database/picking.py b/src/ansys/mapdl/core/_commands/database/picking.py index cabeb8225f..96faf05414 100644 --- a/src/ansys/mapdl/core/_commands/database/picking.py +++ b/src/ansys/mapdl/core/_commands/database/picking.py @@ -49,7 +49,12 @@ def fitem(self, nfield="", item="", itemy="", itemz="", **kwargs): This command is valid in any processor. """ - command = "FITEM,%s,%s,%s,%s" % (str(nfield), str(item), str(itemy), str(itemz)) + command = "FITEM,%s,%s,%s,%s" % ( + str(nfield), + str(item), + str(itemy), + str(itemz), + ) return self.run(command, **kwargs) def flst(self, nfield="", narg="", type_="", otype="", leng="", **kwargs): diff --git a/src/ansys/mapdl/core/_commands/database/selecting.py b/src/ansys/mapdl/core/_commands/database/selecting.py index 288a385202..396609de95 100644 --- a/src/ansys/mapdl/core/_commands/database/selecting.py +++ b/src/ansys/mapdl/core/_commands/database/selecting.py @@ -103,7 +103,15 @@ def asll(self, type_="", arkey="", **kwargs): return self.run(command, **kwargs) def asel( - self, type_="", item="", comp="", vmin="", vmax="", vinc="", kswp="", **kwargs + self, + type_="", + item="", + comp="", + vmin="", + vmax="", + vinc="", + kswp="", + **kwargs, ): """Selects a subset of areas. @@ -249,7 +257,15 @@ def aslv(self, type_="", **kwargs): return self.run(f"ASLV,{type_}", **kwargs) def dofsel( - self, type_="", dof1="", dof2="", dof3="", dof4="", dof5="", dof6="", **kwargs + self, + type_="", + dof1="", + dof2="", + dof3="", + dof4="", + dof5="", + dof6="", + **kwargs, ): """Selects a DOF label set for reference by other commands. @@ -607,7 +623,15 @@ def eslv(self, type_: str = "", **kwargs) -> Optional[str]: return self.run(command, **kwargs) def ksel( - self, type_="", item="", comp="", vmin="", vmax="", vinc="", kabs="", **kwargs + self, + type_="", + item="", + comp="", + vmin="", + vmax="", + vinc="", + kabs="", + **kwargs, ): """Selects a subset of keypoints or hard points. @@ -769,7 +793,15 @@ def ksln(self, type_="", **kwargs): return self.run(command, **kwargs) def lsel( - self, type_="", item="", comp="", vmin="", vmax="", vinc="", kswp="", **kwargs + self, + type_="", + item="", + comp="", + vmin="", + vmax="", + vinc="", + kswp="", + **kwargs, ): """Selects a subset of lines. @@ -941,7 +973,15 @@ def lslk(self, type_="", lskey="", **kwargs): return self.run(command, **kwargs) def nsel( - self, type_="", item="", comp="", vmin="", vmax="", vinc="", kabs="", **kwargs + self, + type_="", + item="", + comp="", + vmin="", + vmax="", + vinc="", + kabs="", + **kwargs, ): """Selects a subset of nodes. @@ -1375,11 +1415,24 @@ def partsel(self, type_="", pmin="", pmax="", pinc="", **kwargs): Distributed ANSYS Restriction: This command is not supported in Distributed ANSYS. """ - command = "PARTSEL,%s,%s,%s,%s" % (str(type_), str(pmin), str(pmax), str(pinc)) + command = "PARTSEL,%s,%s,%s,%s" % ( + str(type_), + str(pmin), + str(pmax), + str(pinc), + ) return self.run(command, **kwargs) def vsel( - self, type_="", item="", comp="", vmin="", vmax="", vinc="", kswp="", **kwargs + self, + type_="", + item="", + comp="", + vmin="", + vmax="", + vinc="", + kswp="", + **kwargs, ): """Selects a subset of volumes. diff --git a/src/ansys/mapdl/core/_commands/database/working_plane.py b/src/ansys/mapdl/core/_commands/database/working_plane.py index d584ecc990..c9fd69dd65 100644 --- a/src/ansys/mapdl/core/_commands/database/working_plane.py +++ b/src/ansys/mapdl/core/_commands/database/working_plane.py @@ -1,6 +1,16 @@ class WorkingPlane: def kwpave( - self, p1="", p2="", p3="", p4="", p5="", p6="", p7="", p8="", p9="", **kwargs + self, + p1="", + p2="", + p3="", + p4="", + p5="", + p6="", + p7="", + p8="", + p9="", + **kwargs, ): """Moves the working plane origin to the average location of keypoints. @@ -100,7 +110,17 @@ def lwplan(self, wn="", nl1="", ratio="", **kwargs): return self.run(command, **kwargs) def nwpave( - self, n1="", n2="", n3="", n4="", n5="", n6="", n7="", n8="", n9="", **kwargs + self, + n1="", + n2="", + n3="", + n4="", + n5="", + n6="", + n7="", + n8="", + n9="", + **kwargs, ): """Moves the working plane origin to the average location of nodes. @@ -166,7 +186,17 @@ def nwplan(self, wn="", norig="", nxax="", nplan="", **kwargs): return self.run(command, **kwargs) def wpave( - self, x1="", y1="", z1="", x2="", y2="", z2="", x3="", y3="", z3="", **kwargs + self, + x1="", + y1="", + z1="", + x2="", + y2="", + z2="", + x3="", + y3="", + z3="", + **kwargs, ): """Moves the working plane origin to the average of specified points. diff --git a/src/ansys/mapdl/core/_commands/graphics_/annotation.py b/src/ansys/mapdl/core/_commands/graphics_/annotation.py index 58d594eff8..4c6c859444 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/annotation.py +++ b/src/ansys/mapdl/core/_commands/graphics_/annotation.py @@ -398,7 +398,17 @@ def pmore(self, x5="", y5="", x6="", y6="", x7="", y7="", x8="", y8="", **kwargs return self.run(command, **kwargs) def polygon( - self, nvert="", x1="", y1="", x2="", y2="", x3="", y3="", x4="", y4="", **kwargs + self, + nvert="", + x1="", + y1="", + x2="", + y2="", + x3="", + y3="", + x4="", + y4="", + **kwargs, ): """Creates annotation polygons (GUI). diff --git a/src/ansys/mapdl/core/_commands/graphics_/labeling.py b/src/ansys/mapdl/core/_commands/graphics_/labeling.py index 859fc952a8..6292803ec1 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/labeling.py +++ b/src/ansys/mapdl/core/_commands/graphics_/labeling.py @@ -144,7 +144,17 @@ def contour(self, wn="", ncont="", vmin="", vinc="", vmax="", **kwargs): return self.run(command, **kwargs) def cval( - self, wn="", v1="", v2="", v3="", v4="", v5="", v6="", v7="", v8="", **kwargs + self, + wn="", + v1="", + v2="", + v3="", + v4="", + v5="", + v6="", + v7="", + v8="", + **kwargs, ): """Specifies nonuniform contour values on stress displays. diff --git a/src/ansys/mapdl/core/_commands/post1_/animation.py b/src/ansys/mapdl/core/_commands/post1_/animation.py index f55a1ea613..c9c6cb5e76 100644 --- a/src/ansys/mapdl/core/_commands/post1_/animation.py +++ b/src/ansys/mapdl/core/_commands/post1_/animation.py @@ -255,7 +255,14 @@ def ancyc(self, numframes="", kcycl="", delay="", **kwargs): return self.run(command, **kwargs) def andyna( - self, delay="", ncycl="", start="", end="", inc="", autocontourkey="", **kwargs + self, + delay="", + ncycl="", + start="", + end="", + inc="", + autocontourkey="", + **kwargs, ): """Produces an animated sequence of contour values through substeps. diff --git a/src/ansys/mapdl/core/_commands/post1_/element_table.py b/src/ansys/mapdl/core/_commands/post1_/element_table.py index 57cd101747..2da045a03e 100644 --- a/src/ansys/mapdl/core/_commands/post1_/element_table.py +++ b/src/ansys/mapdl/core/_commands/post1_/element_table.py @@ -5,7 +5,16 @@ class ElementTable: def detab( - self, elem="", lab="", v1="", v2="", v3="", v4="", v5="", v6="", **kwargs + self, + elem="", + lab="", + v1="", + v2="", + v3="", + v4="", + v5="", + v6="", + **kwargs, ): """Modifies element table results in the database. @@ -105,7 +114,12 @@ def esort( return self.run(command, **kwargs) def etable( - self, lab: str = "", item: str = "", comp: str = "", option: str = "", **kwargs + self, + lab: str = "", + item: str = "", + comp: str = "", + option: str = "", + **kwargs, ) -> Optional[str]: """Fills a table of element values for further processing. @@ -499,7 +513,14 @@ def sadd(self, labr="", lab1="", lab2="", fact1="", fact2="", const="", **kwargs return self.run(command, **kwargs) def sallow( - self, strs1="", strs2="", strs3="", strs4="", strs5="", strs6="", **kwargs + self, + strs1="", + strs2="", + strs3="", + strs4="", + strs5="", + strs6="", + **kwargs, ): """Defines the allowable stress table for safety factor calculations. @@ -768,7 +789,14 @@ def ssum(self, **kwargs): return self.run(command, **kwargs) def tallow( - self, temp1="", temp2="", temp3="", temp4="", temp5="", temp6="", **kwargs + self, + temp1="", + temp2="", + temp3="", + temp4="", + temp5="", + temp6="", + **kwargs, ): """Defines the temperature table for safety factor calculations. diff --git a/src/ansys/mapdl/core/_commands/post1_/listing.py b/src/ansys/mapdl/core/_commands/post1_/listing.py index a4a8b03795..deeb97d4b9 100644 --- a/src/ansys/mapdl/core/_commands/post1_/listing.py +++ b/src/ansys/mapdl/core/_commands/post1_/listing.py @@ -1,6 +1,13 @@ class Listing: def format( - self, ndigit="", ftype="", nwidth="", dsignf="", line="", char="", **kwargs + self, + ndigit="", + ftype="", + nwidth="", + dsignf="", + line="", + char="", + **kwargs, ): """Specifies format controls for tables. @@ -56,7 +63,14 @@ def format( return self.run(command, **kwargs) def header( - self, header="", stitle="", idstmp="", notes="", colhed="", minmax="", **kwargs + self, + header="", + stitle="", + idstmp="", + notes="", + colhed="", + minmax="", + **kwargs, ): """Sets page and table heading print controls. diff --git a/src/ansys/mapdl/core/_commands/post1_/path_operations.py b/src/ansys/mapdl/core/_commands/post1_/path_operations.py index 111a06d5e7..31a067affb 100644 --- a/src/ansys/mapdl/core/_commands/post1_/path_operations.py +++ b/src/ansys/mapdl/core/_commands/post1_/path_operations.py @@ -217,7 +217,15 @@ def path(self, name="", npts="", nsets="", ndiv="", **kwargs): return self.run(command, **kwargs) def pcalc( - self, oper="", labr="", lab1="", lab2="", fact1="", fact2="", const="", **kwargs + self, + oper="", + labr="", + lab1="", + lab2="", + fact1="", + fact2="", + const="", + **kwargs, ): """Forms additional labeled path items by operating on existing path diff --git a/src/ansys/mapdl/core/_commands/post1_/special.py b/src/ansys/mapdl/core/_commands/post1_/special.py index b662eca5af..74659aed3b 100644 --- a/src/ansys/mapdl/core/_commands/post1_/special.py +++ b/src/ansys/mapdl/core/_commands/post1_/special.py @@ -1499,7 +1499,14 @@ def plfar( return self.run(command, **kwargs) def plmc( - self, lstep="", sbstep="", timfrq="", kimg="", hibeg="", hiend="", **kwargs + self, + lstep="", + sbstep="", + timfrq="", + kimg="", + hibeg="", + hiend="", + **kwargs, ): """Plots the modal coordinates from a mode-superposition solution. diff --git a/src/ansys/mapdl/core/_commands/post1_/surface_operations.py b/src/ansys/mapdl/core/_commands/post1_/surface_operations.py index 345caeecfd..32c4578b3c 100644 --- a/src/ansys/mapdl/core/_commands/post1_/surface_operations.py +++ b/src/ansys/mapdl/core/_commands/post1_/surface_operations.py @@ -70,7 +70,13 @@ def sucalc( return self.run(command, **kwargs) def sucr( - self, surfname="", surftype="", nrefine="", radius="", tolout="", **kwargs + self, + surfname="", + surftype="", + nrefine="", + radius="", + tolout="", + **kwargs, ): """Create a surface. diff --git a/src/ansys/mapdl/core/_commands/post26_/controls.py b/src/ansys/mapdl/core/_commands/post26_/controls.py index ee3d1e0812..206bcfd1ad 100644 --- a/src/ansys/mapdl/core/_commands/post26_/controls.py +++ b/src/ansys/mapdl/core/_commands/post26_/controls.py @@ -1,6 +1,13 @@ class Controls: def cfact( - self, rfacta="", ifacta="", rfactb="", ifactb="", rfactc="", ifactc="", **kwargs + self, + rfacta="", + ifacta="", + rfactb="", + ifactb="", + rfactc="", + ifactc="", + **kwargs, ): """Defines complex scaling factors to be used with operations. diff --git a/src/ansys/mapdl/core/_commands/post26_/listing.py b/src/ansys/mapdl/core/_commands/post26_/listing.py index 8bfde9caaa..4faa70386a 100644 --- a/src/ansys/mapdl/core/_commands/post26_/listing.py +++ b/src/ansys/mapdl/core/_commands/post26_/listing.py @@ -108,7 +108,14 @@ def prtime(self, tmin="", tmax="", **kwargs): return self.run(command, **kwargs) def prvar( - self, nvar1="", nvar2="", nvar3="", nvar4="", nvar5="", nvar6="", **kwargs + self, + nvar1="", + nvar2="", + nvar3="", + nvar4="", + nvar5="", + nvar6="", + **kwargs, ): """Lists variables vs. time (or frequency). diff --git a/src/ansys/mapdl/core/_commands/post26_/operations.py b/src/ansys/mapdl/core/_commands/post26_/operations.py index 03435ffe09..222d68a958 100644 --- a/src/ansys/mapdl/core/_commands/post26_/operations.py +++ b/src/ansys/mapdl/core/_commands/post26_/operations.py @@ -351,7 +351,15 @@ def imagin(self, ir="", ia="", name="", facta="", **kwargs): return self.run(f"IMAGIN,{ir},{ia},,,{name},,,{facta}", **kwargs) def int1( - self, ir="", iy="", ix="", name="", facta="", factb="", const="", **kwargs + self, + ir="", + iy="", + ix="", + name="", + facta="", + factb="", + const="", + **kwargs, ): """Integrates a variable. @@ -522,7 +530,8 @@ def prod( ``IR = (FACTA x IA) x (FACTB x IB) x (FACTC x IC)`` """ return self.run( - f"PROD,{ir},{ia},{ib},{ic},{name},,,{facta},{factb},{factc}", **kwargs + f"PROD,{ir},{ia},{ib},{ic},{name},,,{facta},{factb},{factc}", + **kwargs, ) def quot(self, ir="", ia="", ib="", name="", facta="", factb="", **kwargs): diff --git a/src/ansys/mapdl/core/_commands/post26_/special.py b/src/ansys/mapdl/core/_commands/post26_/special.py index 02db40d174..37e75e9d3d 100644 --- a/src/ansys/mapdl/core/_commands/post26_/special.py +++ b/src/ansys/mapdl/core/_commands/post26_/special.py @@ -263,7 +263,15 @@ def resp( return self.run(command, **kwargs) def rpsd( - self, ir="", ia="", ib="", itype="", datum="", name="", signif="", **kwargs + self, + ir="", + ia="", + ib="", + itype="", + datum="", + name="", + signif="", + **kwargs, ): """Calculates response power spectral density (PSD). diff --git a/src/ansys/mapdl/core/_commands/preproc/areas.py b/src/ansys/mapdl/core/_commands/preproc/areas.py index 0a039576ed..065d25af00 100644 --- a/src/ansys/mapdl/core/_commands/preproc/areas.py +++ b/src/ansys/mapdl/core/_commands/preproc/areas.py @@ -753,7 +753,15 @@ def arscale( return self.run(command, **kwargs) def arsym( - self, ncomp="", na1="", na2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + ncomp="", + na1="", + na2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ): """Generates areas from an area pattern by symmetry reflection. @@ -968,7 +976,15 @@ def asum(self, lab="", **kwargs): return self.run(command, **kwargs) def atran( - self, kcnto="", na1="", na2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + kcnto="", + na1="", + na2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ): """Transfers a pattern of areas to another coordinate system. diff --git a/src/ansys/mapdl/core/_commands/preproc/element_type.py b/src/ansys/mapdl/core/_commands/preproc/element_type.py index e3ba253dbe..0ee9215995 100644 --- a/src/ansys/mapdl/core/_commands/preproc/element_type.py +++ b/src/ansys/mapdl/core/_commands/preproc/element_type.py @@ -401,7 +401,11 @@ def etdele( return self.run(command, **kwargs) def etlist( - self, ityp1: MapdlInt = "", ityp2: MapdlInt = "", inc: MapdlInt = "", **kwargs + self, + ityp1: MapdlInt = "", + ityp2: MapdlInt = "", + inc: MapdlInt = "", + **kwargs, ) -> Optional[str]: """Lists currently defined element types. diff --git a/src/ansys/mapdl/core/_commands/preproc/elements.py b/src/ansys/mapdl/core/_commands/preproc/elements.py index c6fc46f397..d9645fc769 100644 --- a/src/ansys/mapdl/core/_commands/preproc/elements.py +++ b/src/ansys/mapdl/core/_commands/preproc/elements.py @@ -151,7 +151,11 @@ def ecpchg(self, **kwargs): return self.run("ECPCHG", **kwargs) def edele( - self, iel1: MapdlInt = "", iel2: MapdlInt = "", inc: MapdlInt = "", **kwargs + self, + iel1: MapdlInt = "", + iel2: MapdlInt = "", + inc: MapdlInt = "", + **kwargs, ) -> Optional[str]: """Deletes selected elements from the model. @@ -1337,7 +1341,11 @@ def ereinf(self, **kwargs) -> Optional[str]: return self.run(command, **kwargs) def errang( - self, emin: MapdlInt = "", emax: MapdlInt = "", einc: MapdlInt = "", **kwargs + self, + emin: MapdlInt = "", + emax: MapdlInt = "", + einc: MapdlInt = "", + **kwargs, ) -> Optional[str]: """Specifies the element range to be read from a file. @@ -1686,7 +1694,13 @@ def gcdef(self, option="", sect1="", sect2="", matid="", realid="", **kwargs): return self.run(command, **kwargs) def gcgen( - self, option="", featureangle="", edgekey="", splitkey="", selopt="", **kwargs + self, + option="", + featureangle="", + edgekey="", + splitkey="", + selopt="", + **kwargs, ): """Creates contact elements for general contact. diff --git a/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py b/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py index d9c6862966..e385f428b0 100644 --- a/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py +++ b/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py @@ -1726,7 +1726,15 @@ def edadapt(self, part="", key="", **kwargs): return self.run(command, **kwargs) def edale( - self, option="", afac="", bfac="", dfac="", efac="", start="", end="", **kwargs + self, + option="", + afac="", + bfac="", + dfac="", + efac="", + start="", + end="", + **kwargs, ): """Assigns mesh smoothing to explicit dynamic elements that use diff --git a/src/ansys/mapdl/core/_commands/preproc/hard_points.py b/src/ansys/mapdl/core/_commands/preproc/hard_points.py index 5b627bc984..5fb3ea72f3 100644 --- a/src/ansys/mapdl/core/_commands/preproc/hard_points.py +++ b/src/ansys/mapdl/core/_commands/preproc/hard_points.py @@ -1,6 +1,14 @@ class HardPoints: def hptcreate( - self, type_="", entity="", nhp="", label="", val1="", val2="", val3="", **kwargs + self, + type_="", + entity="", + nhp="", + label="", + val1="", + val2="", + val3="", + **kwargs, ): """Defines a hard point. diff --git a/src/ansys/mapdl/core/_commands/preproc/keypoints.py b/src/ansys/mapdl/core/_commands/preproc/keypoints.py index fc5bd82a9f..15fb208758 100644 --- a/src/ansys/mapdl/core/_commands/preproc/keypoints.py +++ b/src/ansys/mapdl/core/_commands/preproc/keypoints.py @@ -483,7 +483,17 @@ def kmodif(self, npt="", x="", y="", z="", **kwargs): return self.run(command, **kwargs) def kmove( - self, npt="", kc1="", x1="", y1="", z1="", kc2="", x2="", y2="", z2="", **kwargs + self, + npt="", + kc1="", + x1="", + y1="", + z1="", + kc2="", + x2="", + y2="", + z2="", + **kwargs, ): """Calculates and moves a keypoint to an intersection. @@ -725,7 +735,15 @@ def ksum(self, **kwargs): return self.run(command, **kwargs) def ksymm( - self, ncomp="", np1="", np2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + ncomp="", + np1="", + np2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ): """Generates a reflected set of keypoints. @@ -788,7 +806,15 @@ def ksymm( return self.run(command, **kwargs) def ktran( - self, kcnto="", np1="", np2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + kcnto="", + np1="", + np2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ): """Transfers a pattern of keypoints to another coordinate system. diff --git a/src/ansys/mapdl/core/_commands/preproc/lines.py b/src/ansys/mapdl/core/_commands/preproc/lines.py index 2d0f31d8ce..85606f1e93 100644 --- a/src/ansys/mapdl/core/_commands/preproc/lines.py +++ b/src/ansys/mapdl/core/_commands/preproc/lines.py @@ -1212,7 +1212,15 @@ def lsum(self, **kwargs): return self.run(command, **kwargs) def lsymm( - self, ncomp="", nl1="", nl2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + ncomp="", + nl1="", + nl2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ): """Generates lines from a line pattern by symmetry reflection. @@ -1319,7 +1327,15 @@ def ltan(self, nl1="", p3="", xv3="", yv3="", zv3="", **kwargs) -> int: return parse.parse_line_no(self.run(command, **kwargs)) def ltran( - self, kcnto="", nl1="", nl2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + kcnto="", + nl1="", + nl2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ): """Transfers a pattern of lines to another coordinate system. diff --git a/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py b/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py index 114145bfa9..463108f77c 100644 --- a/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py +++ b/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py @@ -388,7 +388,12 @@ def tbdele(self, lab="", mat1="", mat2="", inc="", **kwargs): ----- This command is also valid in SOLUTION. """ - command = "TBDELE,%s,%s,%s,%s" % (str(lab), str(mat1), str(mat2), str(inc)) + command = "TBDELE,%s,%s,%s,%s" % ( + str(lab), + str(mat1), + str(mat2), + str(inc), + ) return self.run(command, **kwargs) def tbeo(self, par="", value="", **kwargs): diff --git a/src/ansys/mapdl/core/_commands/preproc/materials.py b/src/ansys/mapdl/core/_commands/preproc/materials.py index 009c5e9277..164e249d6a 100644 --- a/src/ansys/mapdl/core/_commands/preproc/materials.py +++ b/src/ansys/mapdl/core/_commands/preproc/materials.py @@ -556,7 +556,12 @@ def mpdres(self, labf="", matf="", labt="", matt="", **kwargs): This command is also valid in SOLUTION. """ - command = "MPDRES,%s,%s,%s,%s" % (str(labf), str(matf), str(labt), str(matt)) + command = "MPDRES,%s,%s,%s,%s" % ( + str(labf), + str(matf), + str(labt), + str(matt), + ) return self.run(command, **kwargs) def mplib(self, r_w_opt="", path="", **kwargs): @@ -816,7 +821,12 @@ def mptgen(self, stloc="", num="", tstrt="", tinc="", **kwargs): This command is also valid in SOLUTION. """ - command = "MPTGEN,%s,%s,%s,%s" % (str(stloc), str(num), str(tstrt), str(tinc)) + command = "MPTGEN,%s,%s,%s,%s" % ( + str(stloc), + str(num), + str(tstrt), + str(tinc), + ) return self.run(command, **kwargs) def mptres(self, lab="", mat="", **kwargs): @@ -996,7 +1006,15 @@ def tbft( return self.run(command, **kwargs) def uimp( - self, mat="", lab1="", lab2="", lab3="", val1="", val2="", val3="", **kwargs + self, + mat="", + lab1="", + lab2="", + lab3="", + val1="", + val2="", + val3="", + **kwargs, ): """APDL Command: UIMP diff --git a/src/ansys/mapdl/core/_commands/preproc/meshing.py b/src/ansys/mapdl/core/_commands/preproc/meshing.py index bfe435d415..f2a58ba2f9 100644 --- a/src/ansys/mapdl/core/_commands/preproc/meshing.py +++ b/src/ansys/mapdl/core/_commands/preproc/meshing.py @@ -182,7 +182,15 @@ def amesh(self, na1="", na2="", ninc="", **kwargs): return self.run(command, **kwargs) def arefine( - self, na1="", na2="", ninc="", level="", depth="", post="", retain="", **kwargs + self, + na1="", + na2="", + ninc="", + level="", + depth="", + post="", + retain="", + **kwargs, ): """Refines the mesh around specified areas. @@ -304,7 +312,15 @@ def clrmshln(self, **kwargs): return self.run(command, **kwargs) def cpcyc( - self, lab="", toler="", kcn="", dx="", dy="", dz="", knonrot="", **kwargs + self, + lab="", + toler="", + kcn="", + dx="", + dy="", + dz="", + knonrot="", + **kwargs, ): """Couples the two side faces of a cyclically symmetric model for loading that are the same on every segment. @@ -388,7 +404,14 @@ def czdel(self, grp1="", grp2="", grp3="", **kwargs): return self.run(command, **kwargs) def czmesh( - self, ecomps1="", ecomps2="", kcn="", kdir="", value="", cztol="", **kwargs + self, + ecomps1="", + ecomps2="", + kcn="", + kdir="", + value="", + cztol="", + **kwargs, ): """Create and mesh an interface area composed of cohesive zone elements. @@ -886,7 +909,16 @@ def gsgdata(self, lfiber="", xref="", yref="", rotx0="", roty0="", **kwargs): return self.run(command, **kwargs) def imesh( - self, laky="", nsla="", ntla="", kcn="", dx="", dy="", dz="", tol="", **kwargs + self, + laky="", + nsla="", + ntla="", + kcn="", + dx="", + dy="", + dz="", + tol="", + **kwargs, ): """Generates nodes and interface elements along lines or areas. @@ -1073,7 +1105,15 @@ def kmesh(self, np1="", np2="", ninc="", **kwargs): return self.run(command, **kwargs) def krefine( - self, np1="", np2="", ninc="", level="", depth="", post="", retain="", **kwargs + self, + np1="", + np2="", + ninc="", + level="", + depth="", + post="", + retain="", + **kwargs, ): """Refines the mesh around specified keypoints. @@ -1479,7 +1519,15 @@ def lmesh(self, nl1="", nl2="", ninc="", **kwargs): return self.run(command, **kwargs) def lrefine( - self, nl1="", nl2="", ninc="", level="", depth="", post="", retain="", **kwargs + self, + nl1="", + nl2="", + ninc="", + level="", + depth="", + post="", + retain="", + **kwargs, ): """Refines the mesh around specified lines. @@ -1963,7 +2011,15 @@ def mshpattern(self, key="", **kwargs): return self.run(command, **kwargs) def nrefine( - self, nn1="", nn2="", ninc="", level="", depth="", post="", retain="", **kwargs + self, + nn1="", + nn2="", + ninc="", + level="", + depth="", + post="", + retain="", + **kwargs, ): """Refines the mesh around specified nodes. diff --git a/src/ansys/mapdl/core/_commands/preproc/primitives.py b/src/ansys/mapdl/core/_commands/preproc/primitives.py index 3f899aeb37..a5252e71ce 100644 --- a/src/ansys/mapdl/core/_commands/preproc/primitives.py +++ b/src/ansys/mapdl/core/_commands/preproc/primitives.py @@ -661,7 +661,14 @@ def rpoly(self, nsides="", lside="", majrad="", minrad="", **kwargs): return self.run(command, **kwargs) def rpr4( - self, nsides="", xcenter="", ycenter="", radius="", theta="", depth="", **kwargs + self, + nsides="", + xcenter="", + ycenter="", + radius="", + theta="", + depth="", + **kwargs, ): """Creates a regular polygonal area or prism volume anywhere on the working plane. diff --git a/src/ansys/mapdl/core/_commands/preproc/real_constants.py b/src/ansys/mapdl/core/_commands/preproc/real_constants.py index e9e1fc86ef..2b8504200f 100644 --- a/src/ansys/mapdl/core/_commands/preproc/real_constants.py +++ b/src/ansys/mapdl/core/_commands/preproc/real_constants.py @@ -90,7 +90,12 @@ def rdele(self, nset1="", nset2="", ninc="", lchk="", **kwargs): This command is also valid in SOLUTION. """ - command = "RDELE,%s,%s,%s,%s" % (str(nset1), str(nset2), str(ninc), str(lchk)) + command = "RDELE,%s,%s,%s,%s" % ( + str(nset1), + str(nset2), + str(ninc), + str(lchk), + ) return self.run(command, **kwargs) def rlist(self, nset1="", nset2="", ninc="", **kwargs): @@ -117,7 +122,16 @@ def rlist(self, nset1="", nset2="", ninc="", **kwargs): return self.run(command, **kwargs) def rmodif( - self, nset="", stloc="", v1="", v2="", v3="", v4="", v5="", v6="", **kwargs + self, + nset="", + stloc="", + v1="", + v2="", + v3="", + v4="", + v5="", + v6="", + **kwargs, ): """APDL Command: RMODIF @@ -205,7 +219,15 @@ def rmore(self, r7="", r8="", r9="", r10="", r11="", r12="", **kwargs): return self.run(command, **kwargs) def setfgap( - self, gap="", ropt="", pamb="", acf1="", acf2="", pref="", mfp="", **kwargs + self, + gap="", + ropt="", + pamb="", + acf1="", + acf2="", + pref="", + mfp="", + **kwargs, ): """APDL Command: SETFGAP diff --git a/src/ansys/mapdl/core/_commands/preproc/sections.py b/src/ansys/mapdl/core/_commands/preproc/sections.py index b3db804837..bbbeb8d6ab 100644 --- a/src/ansys/mapdl/core/_commands/preproc/sections.py +++ b/src/ansys/mapdl/core/_commands/preproc/sections.py @@ -662,7 +662,15 @@ def secdata( return self.run(command, **kwargs) def secjoint( - self, kywrd="", val1="", val2="", val3="", val4="", val5="", val6="", **kwargs + self, + kywrd="", + val1="", + val2="", + val3="", + val4="", + val5="", + val6="", + **kwargs, ): """Defines local coordinate systems at joint element nodes and other data diff --git a/src/ansys/mapdl/core/_commands/preproc/special_purpose.py b/src/ansys/mapdl/core/_commands/preproc/special_purpose.py index 17dc6b872a..2a79c65ab2 100644 --- a/src/ansys/mapdl/core/_commands/preproc/special_purpose.py +++ b/src/ansys/mapdl/core/_commands/preproc/special_purpose.py @@ -169,7 +169,14 @@ def cint( return self.run(command, **kwargs) def cycfreq( - self, option="", value1="", value2="", value3="", value4="", value5="", **kwargs + self, + option="", + value1="", + value2="", + value3="", + value4="", + value5="", + **kwargs, ): """Specifies solution options for a cyclic symmetry mode-superposition @@ -296,7 +303,14 @@ def cycfreq( return self.run(command, **kwargs) def cyclic( - self, nsector="", angle="", kcn="", name="", usrcomp="", usrnmap="", **kwargs + self, + nsector="", + angle="", + kcn="", + name="", + usrcomp="", + usrnmap="", + **kwargs, ): """Specifies a cyclic symmetry analysis. diff --git a/src/ansys/mapdl/core/_commands/preproc/volumes.py b/src/ansys/mapdl/core/_commands/preproc/volumes.py index 9612c1ea93..d67b04e353 100644 --- a/src/ansys/mapdl/core/_commands/preproc/volumes.py +++ b/src/ansys/mapdl/core/_commands/preproc/volumes.py @@ -986,7 +986,15 @@ def vsum(self, lab="", **kwargs): return self.run(command, **kwargs) def vsymm( - self, ncomp="", nv1="", nv2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + ncomp="", + nv1="", + nv2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ) -> str: """Generate volumes from a volume pattern by symmetry reflection. @@ -1068,7 +1076,15 @@ def vsymm( return self.run(command, **kwargs) def vtran( - self, kcnto="", nv1="", nv2="", ninc="", kinc="", noelem="", imove="", **kwargs + self, + kcnto="", + nv1="", + nv2="", + ninc="", + kinc="", + noelem="", + imove="", + **kwargs, ): """Transfers a pattern of volumes to another coordinate system. diff --git a/src/ansys/mapdl/core/_commands/reduced/generation.py b/src/ansys/mapdl/core/_commands/reduced/generation.py index 2922b367af..3451c88dac 100644 --- a/src/ansys/mapdl/core/_commands/reduced/generation.py +++ b/src/ansys/mapdl/core/_commands/reduced/generation.py @@ -138,7 +138,15 @@ def rmmlist(self, **kwargs): return self.run(command, **kwargs) def rmmrange( - self, mode="", key="", min_="", max_="", nstep="", damp="", scale="", **kwargs + self, + mode="", + key="", + min_="", + max_="", + nstep="", + damp="", + scale="", + **kwargs, ): """Defines and edits various modal parameters for the ROM method. diff --git a/src/ansys/mapdl/core/_commands/reduced/use_pass.py b/src/ansys/mapdl/core/_commands/reduced/use_pass.py index c7be7dc995..c7644d94c2 100644 --- a/src/ansys/mapdl/core/_commands/reduced/use_pass.py +++ b/src/ansys/mapdl/core/_commands/reduced/use_pass.py @@ -1,6 +1,14 @@ class UsePass: def dcvswp( - self, option="", elem="", cnum="", vmax="", vinc1="", vinc2="", gap="", **kwargs + self, + option="", + elem="", + cnum="", + vmax="", + vinc1="", + vinc2="", + gap="", + **kwargs, ): """Performs a DC voltage sweep on a ROM element. @@ -67,7 +75,14 @@ def dcvswp( return self.run(command, **kwargs) def rmlvscale( - self, nload="", fact1="", fact2="", fact3="", fact4="", fact5="", **kwargs + self, + nload="", + fact1="", + fact2="", + fact3="", + fact4="", + fact5="", + **kwargs, ): """Defines element load vector scaling for a ROM use pass. diff --git a/src/ansys/mapdl/core/_commands/solution/analysis_options.py b/src/ansys/mapdl/core/_commands/solution/analysis_options.py index 0a288cfc29..585c9b42ea 100644 --- a/src/ansys/mapdl/core/_commands/solution/analysis_options.py +++ b/src/ansys/mapdl/core/_commands/solution/analysis_options.py @@ -546,7 +546,13 @@ def cgrow(self, action="", par1="", par2="", **kwargs): return self.run(command, **kwargs) def cmatrix( - self, symfac="", condname="", numcond="", grndkey="", capname="", **kwargs + self, + symfac="", + condname="", + numcond="", + grndkey="", + capname="", + **kwargs, ): """Performs electrostatic field solutions and calculates the self and mutual capacitances between multiple conductors.x @@ -1141,7 +1147,14 @@ def ddoption(self, decomp="", **kwargs): return self.run(command, **kwargs) def dmpext( - self, smode="", tmode="", dmpname="", freqb="", freqe="", nsteps="", **kwargs + self, + smode="", + tmode="", + dmpname="", + freqb="", + freqe="", + nsteps="", + **kwargs, ): """Extracts modal damping coefficients in a specified frequency range. @@ -1317,7 +1330,12 @@ def dmpoption(self, filetype="", combine="", **kwargs): return self.run(command, **kwargs) def dspoption( - self, reord_option="", memory_option="", memory_size="", solve_info="", **kwargs + self, + reord_option="", + memory_option="", + memory_size="", + solve_info="", + **kwargs, ): """Sets memory option for the distributed sparse solver. @@ -3185,7 +3203,14 @@ def seexp(self, sename="", usefil="", imagky="", expopt="", **kwargs): return self.run(command, **kwargs) def seopt( - self, sename="", sematr="", sepr="", sesst="", expmth="", seoclvl="", **kwargs + self, + sename="", + sematr="", + sepr="", + sesst="", + expmth="", + seoclvl="", + **kwargs, ): """Specifies substructure analysis options. diff --git a/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py b/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py index 4b94682e7e..e787f6a0e0 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py @@ -170,7 +170,15 @@ def bfdele(self, node="", lab="", **kwargs): return self.run(command, **kwargs) def bfe( - self, elem="", lab="", stloc="", val1="", val2="", val3="", val4="", **kwargs + self, + elem="", + lab="", + stloc="", + val1="", + val2="", + val3="", + val4="", + **kwargs, ): """Defines an element body force load. @@ -535,7 +543,15 @@ def bfunif(self, lab="", value="", **kwargs): return self.run(command, **kwargs) def ldread( - self, lab="", lstep="", sbstep="", time="", kimg="", fname="", ext="", **kwargs + self, + lab="", + lstep="", + sbstep="", + time="", + kimg="", + fname="", + ext="", + **kwargs, ): """Reads results from the results file and applies them as loads. diff --git a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py index e01bf3efa6..4e5c1b1d4d 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py @@ -648,7 +648,14 @@ def dval(self, baseid="", lab="", value="", value2="", keycal="", **kwargs): return self.run(command, **kwargs) def gsbdata( - self, labz="", valuez="", labx="", valuex="", laby="", valuey="", **kwargs + self, + labz="", + valuez="", + labx="", + valuex="", + laby="", + valuey="", + **kwargs, ): """Specifies the constraints or applies the load at the ending point for diff --git a/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py b/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py index 6732b2a2cf..8156be111c 100644 --- a/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py @@ -153,7 +153,15 @@ def aport( return self.run(command, **kwargs) def asifile( - self, opt="", fname="", ext="", oper="", kdim="", kout="", limit="", **kwargs + self, + opt="", + fname="", + ext="", + oper="", + kdim="", + kout="", + limit="", + **kwargs, ): """Writes or reads one-way acoustic-structural coupling data. diff --git a/src/ansys/mapdl/core/_commands/solution/ocean.py b/src/ansys/mapdl/core/_commands/solution/ocean.py index 5f985a8267..b213fb66a5 100644 --- a/src/ansys/mapdl/core/_commands/solution/ocean.py +++ b/src/ansys/mapdl/core/_commands/solution/ocean.py @@ -226,7 +226,15 @@ def ocread(self, fname="", ext="", option="", **kwargs): return self.run(command, **kwargs) def octable( - self, val1="", val2="", val3="", val4="", val5="", val6="", val7="", **kwargs + self, + val1="", + val2="", + val3="", + val4="", + val5="", + val6="", + val7="", + **kwargs, ): """Defines an ocean load using table data. diff --git a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py index 7cdd9e380b..ff65b77274 100644 --- a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py +++ b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py @@ -829,7 +829,16 @@ def psdunit(self, tblno="", type_="", gvalue="", **kwargs): return self.run(command, **kwargs) def psdval( - self, tblno="", sv1="", sv2="", sv3="", sv4="", sv5="", sv6="", sv7="", **kwargs + self, + tblno="", + sv1="", + sv2="", + sv3="", + sv4="", + sv5="", + sv6="", + sv7="", + **kwargs, ): """Defines PSD values. diff --git a/src/ansys/mapdl/core/_version.py b/src/ansys/mapdl/core/_version.py index e92e8f723b..67c83ab231 100644 --- a/src/ansys/mapdl/core/_version.py +++ b/src/ansys/mapdl/core/_version.py @@ -18,4 +18,17 @@ __version__ = importlib_metadata.version("ansys-mapdl-core") # In descending order -SUPPORTED_ANSYS_VERSIONS = [231, 222, 221, 212, 211, 202, 201, 195, 194, 193, 192, 191] +SUPPORTED_ANSYS_VERSIONS = [ + 231, + 222, + 221, + 212, + 211, + 202, + 201, + 195, + 194, + 193, + 192, + 191, +] diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index 990cf4d940..150c3407d6 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -203,7 +203,10 @@ def inject_docs(docstring): indentation = get_section_indentation(sect_after_parameter, docstring) indented_doc_inject = indent_text(indentation, docstring_injection) return inject_before( - sect_after_parameter, indentation, indented_doc_inject, docstring + sect_after_parameter, + indentation, + indented_doc_inject, + docstring, ) elif "notes" in sections: diff --git a/src/ansys/mapdl/core/convert.py b/src/ansys/mapdl/core/convert.py index 913293e6ff..330801fa03 100644 --- a/src/ansys/mapdl/core/convert.py +++ b/src/ansys/mapdl/core/convert.py @@ -634,7 +634,8 @@ def translate_line(self, line): if cmd_caps_short in ["SOLV", "LSSO"] and self._comment_solve: self.store_command( - "com", ["The following line has been commented due to `comment_solve`:"] + "com", + ["The following line has been commented due to `comment_solve`:"], ) self.store_command("com", [line]) return @@ -842,8 +843,14 @@ def start_function(self, func_name): func_name, ", ".join(["ARG%d=''" % i for i in range(1, 7)]), ) - line += "%s%s," % (spacing, ", ".join(["ARG%d=''" % i for i in range(7, 13)])) - line += "%s%s):" % (spacing, ", ".join(["ARG%d=''" % i for i in range(13, 19)])) + line += "%s%s," % ( + spacing, + ", ".join(["ARG%d=''" % i for i in range(7, 13)]), + ) + line += "%s%s):" % ( + spacing, + ", ".join(["ARG%d=''" % i for i in range(13, 19)]), + ) self.lines.append(line) self.indent = self.indent + " " @@ -930,7 +937,12 @@ def store_command(self, function, parameters): self.comment, ) else: - line = "%s%s.%s(%s)" % (self.indent, self.obj_name, function, parameter_str) + line = "%s%s.%s(%s)" % ( + self.indent, + self.obj_name, + function, + parameter_str, + ) self.lines.append(line) diff --git a/src/ansys/mapdl/core/database/database.py b/src/ansys/mapdl/core/database/database.py index fbffe98712..12109e4041 100644 --- a/src/ansys/mapdl/core/database/database.py +++ b/src/ansys/mapdl/core/database/database.py @@ -175,7 +175,9 @@ def _start(self) -> int: port = int(status.split(":")[1]) except Exception as e: # pragma: no cover self._mapdl._log.error( - "Unable to read port number from '%s' due to\n%s", status, str(e) + "Unable to read port number from '%s' due to\n%s", + status, + str(e), ) port = 50055 diff --git a/src/ansys/mapdl/core/krylov.py b/src/ansys/mapdl/core/krylov.py index ad672e382a..af2ec33490 100644 --- a/src/ansys/mapdl/core/krylov.py +++ b/src/ansys/mapdl/core/krylov.py @@ -586,7 +586,10 @@ def expand( xii_usr_ordered.append(dof_each_freq) # Compute residual norm (if requested) - if residual_computation or residual_algorithm.lower() in ["no", "off"]: + if residual_computation or residual_algorithm.lower() in [ + "no", + "off", + ]: norm_rz, norm_fz = self.compute_residuals(iFreq, RzV, Xi, omega) if not self.residuals: self.residuals = [] @@ -596,7 +599,8 @@ def expand( # Storing solution in class if compute_solution_vectors: self.solution_vectors = np.array( - xii_usr_ordered, dtype=[("node", "i4"), ("equ", "i4"), ("x", "c8")] + xii_usr_ordered, + dtype=[("node", "i4"), ("equ", "i4"), ("x", "c8")], ) if return_solution: diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index c5cc91e7c6..dbd34e6631 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -596,7 +596,9 @@ def launch_remote_mapdl( ] ) return MapdlGrpc( - channel=channel, cleanup_on_exit=cleanup_on_exit, remote_instance=instance + channel=channel, + cleanup_on_exit=cleanup_on_exit, + remote_instance=instance, ) @@ -623,7 +625,10 @@ def get_start_instance(start_instance_default=True): """ if "PYMAPDL_START_INSTANCE" in os.environ: - if os.environ["PYMAPDL_START_INSTANCE"].lower() not in ["true", "false"]: + if os.environ["PYMAPDL_START_INSTANCE"].lower() not in [ + "true", + "false", + ]: val = os.environ["PYMAPDL_START_INSTANCE"] raise OSError( f'Invalid value "{val}" for PYMAPDL_START_INSTANCE\n' diff --git a/src/ansys/mapdl/core/licensing.py b/src/ansys/mapdl/core/licensing.py index 77c89489b2..2ae73c1288 100644 --- a/src/ansys/mapdl/core/licensing.py +++ b/src/ansys/mapdl/core/licensing.py @@ -202,7 +202,8 @@ def _check_license_file(self, timeout=30, notify_at_second=5): # pragma: no cov """ licdebug_file = os.path.join( - get_ansys_license_debug_file_path(), get_ansys_license_debug_file_name() + get_ansys_license_debug_file_path(), + get_ansys_license_debug_file_name(), ) file_iterator = get_ansys_license_debug_file_tail(licdebug_file) diff --git a/src/ansys/mapdl/core/logging.py b/src/ansys/mapdl/core/logging.py index 69651d43e6..6304221e43 100644 --- a/src/ansys/mapdl/core/logging.py +++ b/src/ansys/mapdl/core/logging.py @@ -325,7 +325,11 @@ class Logger: _instances = {} def __init__( - self, level=logging.DEBUG, to_file=False, to_stdout=True, filename=FILE_NAME + self, + level=logging.DEBUG, + to_file=False, + to_stdout=True, + filename=FILE_NAME, ): """Customized logger class for Pymapdl. @@ -549,7 +553,8 @@ def handle_exception(exc_type, exc_value, exc_traceback): sys.__excepthook__(exc_type, exc_value, exc_traceback) return logger.critical( - "Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback) + "Uncaught exception", + exc_info=(exc_type, exc_value, exc_traceback), ) sys.excepthook = handle_exception diff --git a/src/ansys/mapdl/core/mapdl.py b/src/ansys/mapdl/core/mapdl.py index 21a2b17647..2f928e0767 100644 --- a/src/ansys/mapdl/core/mapdl.py +++ b/src/ansys/mapdl/core/mapdl.py @@ -1599,7 +1599,10 @@ def aplot( ) if show_line_numbering: labels.append( - {"points": lines.points[50::101], "labels": lines["entity_num"]} + { + "points": lines.points[50::101], + "labels": lines["entity_num"], + } ) return general_plotter(meshes, [], labels, **kwargs) @@ -1763,12 +1766,18 @@ def lplot( labels = [] if show_line_numbering: labels.append( - {"points": lines.points[50::101], "labels": lines["entity_num"]} + { + "points": lines.points[50::101], + "labels": lines["entity_num"], + } ) if show_keypoint_numbering: labels.append( - {"points": self.geometry.keypoints, "labels": self.geometry.knum} + { + "points": self.geometry.keypoints, + "labels": self.geometry.knum, + } ) return general_plotter(meshes, [], labels, **kwargs) @@ -1904,7 +1913,10 @@ def result(self) -> "ansys.mapdl.reader.rst.Result": result_path = self._result_file else: # return the file with the last access time - filenames = [self._distributed_result_file, self._result_file] + filenames = [ + self._distributed_result_file, + self._result_file, + ] result_path = last_created(filenames) if result_path is None: # if same return result_file result_path = self._result_file @@ -2086,7 +2098,14 @@ def _flush_stored(self): # pragma: no cover self._log.info(self._response) def get_value( - self, entity="", entnum="", item1="", it1num="", item2="", it2num="", **kwargs + self, + entity="", + entnum="", + item1="", + it1num="", + item2="", + it2num="", + **kwargs, ): """Runs the MAPDL GET command and returns a Python value. @@ -3180,7 +3199,15 @@ def _get_array( self._vget_arr_counter += 1 out = self.starvget( - parm_name, entity, entnum, item1, it1num, item2, it2num, kloop, mute=False + parm_name, + entity, + entnum, + item1, + it1num, + item2, + it2num, + kloop, + mute=False, ) # check if empty array diff --git a/src/ansys/mapdl/core/mapdl_console.py b/src/ansys/mapdl/core/mapdl_console.py index 4da96d5520..d3698999fc 100644 --- a/src/ansys/mapdl/core/mapdl_console.py +++ b/src/ansys/mapdl/core/mapdl_console.py @@ -57,7 +57,12 @@ def launch_pexpect( """ import pexpect - command = "%s -j %s -np %d %s" % (exec_file, jobname, nproc, additional_switches) + command = "%s -j %s -np %d %s" % ( + exec_file, + jobname, + nproc, + additional_switches, + ) process = pexpect.spawn(command, cwd=run_location) process.delaybeforesend = None @@ -166,7 +171,9 @@ def _run(self, command, **kwargs): elif i >= ERROR_IDX and i < PROMPT_IDX: # error self._log.debug( - "Error index %i. Matched %s", i, ready_items[i].decode("utf-8") + "Error index %i. Matched %s", + i, + ready_items[i].decode("utf-8"), ) self._log.error(response) response += ready_items[i].decode("utf-8") @@ -174,7 +181,9 @@ def _run(self, command, **kwargs): elif i >= PROMPT_IDX: # prompt self._log.debug( - "Prompt index %i. Matched %s", i, ready_items[i].decode("utf-8") + "Prompt index %i. Matched %s", + i, + ready_items[i].decode("utf-8"), ) self._log.info(response + ready_items[i].decode("utf-8")) raise RuntimeError( @@ -182,7 +191,9 @@ def _run(self, command, **kwargs): ) else: # continue item self._log.debug( - "continue index %i. Matched %s", i, ready_items[i].decode("utf-8") + "continue index %i. Matched %s", + i, + ready_items[i].decode("utf-8"), ) break diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index d5bf581f01..3b632c9709 100755 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -535,7 +535,8 @@ def _connect(self, timeout=5, set_no_abort=True, enable_health_check=False): self._t_trigger = time.time() self._t_delay = 30 self._timer = threading.Thread( - target=MapdlGrpc._threaded_heartbeat, args=(weakref.proxy(self),) + target=MapdlGrpc._threaded_heartbeat, + args=(weakref.proxy(self),), ) self._timer.daemon = True self._timer.start() @@ -1003,7 +1004,9 @@ def _run_cleanup_script(self): # pragma: no cover # always communicate to allow process to run output, err = process.communicate() self._log.debug( - "Cleanup output:\n\n%s\n%s", output.decode(), err.decode() + "Cleanup output:\n\n%s\n%s", + output.decode(), + err.decode(), ) def list_files(self, refresh_cache=True): @@ -1880,10 +1883,16 @@ def _download( out_file_name = target_name request = pb_types.DownloadFileRequest(name=target_name) - metadata = [("time_step_stream", "200"), ("chunk_size", str(chunk_size))] + metadata = [ + ("time_step_stream", "200"), + ("chunk_size", str(chunk_size)), + ] chunks = self._stub.DownloadFile(request, metadata=metadata) file_size = save_chunks_to_file( - chunks, out_file_name, progress_bar=progress_bar, target_name=target_name + chunks, + out_file_name, + progress_bar=progress_bar, + target_name=target_name, ) if not file_size: @@ -2352,7 +2361,10 @@ def result(self): result_path = self._result_file else: # return the file with the last access time - filenames = [self._distributed_result_file, self._result_file] + filenames = [ + self._distributed_result_file, + self._result_file, + ] result_path = last_created(filenames) if result_path is None: # if same return result_file result_path = self._result_file @@ -2398,7 +2410,13 @@ def igesin(self, fname="", ext="", **kwargs): @wraps(_MapdlCore.cmatrix) def cmatrix( - self, symfac="", condname="", numcond="", grndkey="", capname="", **kwargs + self, + symfac="", + condname="", + numcond="", + grndkey="", + capname="", + **kwargs, ): """Run CMATRIX in non-interactive mode and return the response from file. @@ -2612,7 +2630,14 @@ def get_variable(self, ir, tstrt="", kcplx="", **kwargs): @wraps(_MapdlCore.nsol) def nsol( - self, nvar=VAR_IR, node="", item="", comp="", name="", sector="", **kwargs + self, + nvar=VAR_IR, + node="", + item="", + comp="", + name="", + sector="", + **kwargs, ): """Wraps NSOL to return the variable as an array.""" super().nsol( @@ -2711,7 +2736,16 @@ def get_nsol(self, node, item, comp, name="", sector="", **kwargs): ) def get_esol( - self, elem, node, item, comp, name="", sector="", tstrt="", kcplx="", **kwargs + self, + elem, + node, + item, + comp, + name="", + sector="", + tstrt="", + kcplx="", + **kwargs, ): """Get ESOL data. diff --git a/src/ansys/mapdl/core/math.py b/src/ansys/mapdl/core/math.py index c280b9f433..bead46447d 100755 --- a/src/ansys/mapdl/core/math.py +++ b/src/ansys/mapdl/core/math.py @@ -215,7 +215,15 @@ def vec(self, size=0, dtype=np.double, init=None, name=None, asarray=False): else: return ans_vec - def mat(self, nrow=0, ncol=0, dtype=np.double, init=None, name=None, asarray=False): + def mat( + self, + nrow=0, + ncol=0, + dtype=np.double, + init=None, + name=None, + asarray=False, + ): """Create an APDLMath matrix. Parameters @@ -679,7 +687,12 @@ def damp(self, dtype=np.double, name=None, fname="file.full", asarray=False): return self.load_matrix_from_file(dtype, name, fname, "DAMP", asarray) def get_vec( - self, dtype=None, name=None, fname="file.full", mat_id="RHS", asarray=False + self, + dtype=None, + name=None, + fname="file.full", + mat_id="RHS", + asarray=False, ): """Load a vector from a file. @@ -723,7 +736,9 @@ def get_vec( raise TypeError("``name`` parameter must be a string") self._mapdl._log.info( - "Call MAPDL to extract the %s vector from the file %s", mat_id, fname + "Call MAPDL to extract the %s vector from the file %s", + mat_id, + fname, ) if mat_id.upper() not in ["RHS", "GVEC", "BACK", "FORWARD"]: @@ -739,7 +754,8 @@ def get_vec( fname = self._load_file(fname) self._mapdl.run( - f"*VEC,{name},{MYCTYPE[dtype]},IMPORT,FULL,{fname},{mat_id}", mute=True + f"*VEC,{name},{MYCTYPE[dtype]},IMPORT,FULL,{fname},{mat_id}", + mute=True, ) ans_vec = AnsVec(name, self._mapdl) if asarray: @@ -1513,7 +1529,11 @@ def sym(self) -> bool: info = self._mapdl._data_info(self.id) if meets_version(self._mapdl._server_version, (0, 5, 0)): # pragma: no cover - return info.mattype in [0, 1, 2] # [UPPER, LOWER, DIAG] respectively + return info.mattype in [ + 0, + 1, + 2, + ] # [UPPER, LOWER, DIAG] respectively warn( "Call to ``sym`` cannot evaluate if this matrix " diff --git a/src/ansys/mapdl/core/mesh_grpc.py b/src/ansys/mapdl/core/mesh_grpc.py index 2e2afaa057..baef576b39 100644 --- a/src/ansys/mapdl/core/mesh_grpc.py +++ b/src/ansys/mapdl/core/mesh_grpc.py @@ -543,7 +543,10 @@ def _load_nodes(self, chunk_size=DEFAULT_CHUNKSIZE): def _update_cache_elem(self): """Update the element and element offset cache""" if self._cache_elem is None: - self._cache_elem, self._cache_elem_off = self._load_elements_offset() + ( + self._cache_elem, + self._cache_elem_off, + ) = self._load_elements_offset() @property def _elem(self): diff --git a/src/ansys/mapdl/core/plotting.py b/src/ansys/mapdl/core/plotting.py index 7a9e9db7fa..0c038787f7 100644 --- a/src/ansys/mapdl/core/plotting.py +++ b/src/ansys/mapdl/core/plotting.py @@ -49,14 +49,26 @@ TEMP = pv.Sphere(center=(0, 0, 0), radius=0.5) UX = pv.Arrow( - start=(-1, 0, 0), direction=(1, 0, 0), tip_length=1, tip_radius=0.5, scale=1.0 + start=(-1, 0, 0), + direction=(1, 0, 0), + tip_length=1, + tip_radius=0.5, + scale=1.0, ) UY = pv.Arrow( - start=(0, -1, 0), direction=(0, 1, 0), tip_length=1, tip_radius=0.5, scale=1.0 + start=(0, -1, 0), + direction=(0, 1, 0), + tip_length=1, + tip_radius=0.5, + scale=1.0, ) UZ = pv.Arrow( - start=(0, 0, -1), direction=(0, 0, 1), tip_length=1, tip_radius=0.5, scale=1.0 + start=(0, 0, -1), + direction=(0, 0, 1), + tip_length=1, + tip_radius=0.5, + scale=1.0, ) FX = pv.Arrow( @@ -778,7 +790,12 @@ def general_plotter( # permit user to save the figure as a screenshot if savefig: - pl.show(title=title, auto_close=False, window_size=window_size, screenshot=True) + pl.show( + title=title, + auto_close=False, + window_size=window_size, + screenshot=True, + ) pl.screenshot(savefig) # return unclosed plotter diff --git a/src/ansys/mapdl/core/post.py b/src/ansys/mapdl/core/post.py index 5553b394b2..6f54523818 100644 --- a/src/ansys/mapdl/core/post.py +++ b/src/ansys/mapdl/core/post.py @@ -664,7 +664,10 @@ def _plot_cell_scalars(self, scalars, show_elem_numbering=False, **kwargs): labels = [] if show_elem_numbering: labels = [ - {"points": surf.cell_centers().points, "labels": surf["ansys_elem_num"]} + { + "points": surf.cell_centers().points, + "labels": surf["ansys_elem_num"], + } ] return general_plotter(meshes, [], labels, mapdl=self, **kwargs) @@ -852,7 +855,9 @@ def plot_nodal_temperature(self, show_node_numbering=False, **kwargs): """ kwargs.setdefault("scalar_bar_args", {"title": "Nodal\nTemperature"}) return self._plot_point_scalars( - self.nodal_temperature(), show_node_numbering=show_node_numbering, **kwargs + self.nodal_temperature(), + show_node_numbering=show_node_numbering, + **kwargs, ) def nodal_displacement(self, component="NORM") -> np.ndarray: @@ -1164,7 +1169,11 @@ def element_displacement(self, component="ALL", option="AVG") -> np.ndarray: return self.element_values("U", component, option) def plot_element_displacement( - self, component="NORM", option="AVG", show_elem_numbering=False, **kwargs + self, + component="NORM", + option="AVG", + show_elem_numbering=False, + **kwargs, ): """Plot element displacement. @@ -1363,11 +1372,13 @@ def plot_element_stress( if component in COMPONENT_STRESS_TYPE: kwargs.setdefault( - "scalar_bar_args", {"title": f"{component} Component Element Stress"} + "scalar_bar_args", + {"title": f"{component} Component Element Stress"}, ) elif component in ["1", "2", "3"]: kwargs.setdefault( - "scalar_bar_args", {"title": f"{component} Principal Element Stress"} + "scalar_bar_args", + {"title": f"{component} Principal Element Stress"}, ) elif component == "INT": kwargs.setdefault("scalar_bar_args", {"title": "Element Stress Intensity"}) @@ -1549,7 +1560,9 @@ def plot_nodal_pressure(self, show_node_numbering=False, **kwargs): """ kwargs.setdefault("scalar_bar_args", {"title": "Nodal\nPressure"}) return self._plot_point_scalars( - self.nodal_pressure(), show_node_numbering=show_node_numbering, **kwargs + self.nodal_pressure(), + show_node_numbering=show_node_numbering, + **kwargs, ) def nodal_voltage(self) -> np.ndarray: @@ -1636,7 +1649,9 @@ def plot_nodal_voltage(self, show_node_numbering=False, **kwargs): """ kwargs.setdefault("scalar_bar_args", {"title": "Nodal\nVoltage"}) return self._plot_point_scalars( - self.nodal_voltage(), show_node_numbering=show_node_numbering, **kwargs + self.nodal_voltage(), + show_node_numbering=show_node_numbering, + **kwargs, ) def nodal_component_stress(self, component) -> np.ndarray: @@ -2116,7 +2131,8 @@ def plot_nodal_total_component_strain( """ disp = self.nodal_total_component_strain(component) kwargs.setdefault( - "scalar_bar_args", {"title": f"{component} Total Nodal\nComponent Strain"} + "scalar_bar_args", + {"title": f"{component} Total Nodal\nComponent Strain"}, ) return self._plot_point_scalars( disp, show_node_numbering=show_node_numbering, **kwargs @@ -2221,7 +2237,8 @@ def plot_nodal_total_principal_strain( """ disp = self.nodal_total_principal_strain(component) kwargs.setdefault( - "scalar_bar_args", {"title": "%s Nodal\nPrincipal Strain" % component} + "scalar_bar_args", + {"title": "%s Nodal\nPrincipal Strain" % component}, ) return self._plot_point_scalars( disp, show_node_numbering=show_node_numbering, **kwargs @@ -2604,7 +2621,8 @@ def plot_nodal_elastic_principal_strain( """ disp = self.nodal_elastic_principal_strain(component) kwargs.setdefault( - "scalar_bar_args", {"title": "%s Nodal\nPrincipal Strain" % component} + "scalar_bar_args", + {"title": "%s Nodal\nPrincipal Strain" % component}, ) return self._plot_point_scalars( disp, show_node_numbering=show_node_numbering, **kwargs @@ -2990,7 +3008,8 @@ def plot_nodal_plastic_principal_strain( """ disp = self.nodal_plastic_principal_strain(component) kwargs.setdefault( - "scalar_bar_args", {"title": "%s Nodal\nPrincipal Strain" % component} + "scalar_bar_args", + {"title": "%s Nodal\nPrincipal Strain" % component}, ) return self._plot_point_scalars( disp, show_node_numbering=show_node_numbering, **kwargs @@ -3289,7 +3308,8 @@ def plot_nodal_thermal_component_strain( """ disp = self.nodal_thermal_component_strain(component) kwargs.setdefault( - "scalar_bar_args", {"title": f"{component} Thermal Nodal\nComponent Strain"} + "scalar_bar_args", + {"title": f"{component} Thermal Nodal\nComponent Strain"}, ) return self._plot_point_scalars( disp, show_node_numbering=show_node_numbering, **kwargs @@ -3390,7 +3410,8 @@ def plot_nodal_thermal_principal_strain( """ disp = self.nodal_thermal_principal_strain(component) kwargs.setdefault( - "scalar_bar_args", {"title": "%s Nodal\nPrincipal Strain" % component} + "scalar_bar_args", + {"title": "%s Nodal\nPrincipal Strain" % component}, ) return self._plot_point_scalars( disp, show_node_numbering=show_node_numbering, **kwargs diff --git a/src/ansys/mapdl/core/xpl.py b/src/ansys/mapdl/core/xpl.py index 0ee3562f16..209df873eb 100644 --- a/src/ansys/mapdl/core/xpl.py +++ b/src/ansys/mapdl/core/xpl.py @@ -425,7 +425,9 @@ def extract(self, recordname, sets="ALL", asarray=False): # pragma: no cover rand_name = id_generator() self._mapdl._log.info( - "Calling MAPDL to extract the %s matrix from %s", recordname, self._filename + "Calling MAPDL to extract the %s matrix from %s", + recordname, + self._filename, ) num_first = 1 num_last = 1 @@ -481,7 +483,10 @@ def read(self, recordname, asarray=False): # return either vector or matrix type if data_info.objtype == mapdl_pb2.DataType.VEC: out = self._mapdl.math.vec(dtype=dtype, name=rand_name) - elif data_info.objtype in [mapdl_pb2.DataType.DMAT, mapdl_pb2.DataType.SMAT]: + elif data_info.objtype in [ + mapdl_pb2.DataType.DMAT, + mapdl_pb2.DataType.SMAT, + ]: out = self._mapdl.math.mat(dtype=dtype, name=rand_name) else: # pragma: no cover raise ValueError(f"Unhandled MAPDL matrix object type {data_info.objtype}") diff --git a/tests/conftest.py b/tests/conftest.py index e884f04959..998e4f859d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -28,7 +28,8 @@ pyvista.OFF_SCREEN = True SpacedPaths = namedtuple( - "SpacedPaths", ["path_without_spaces", "path_with_spaces", "path_with_single_quote"] + "SpacedPaths", + ["path_without_spaces", "path_with_spaces", "path_with_single_quote"], ) from _pytest.terminal import TerminalReporter @@ -174,11 +175,17 @@ def pytest_addoption(parser): "--corba", action="store_true", default=False, help="run CORBA tests" ) parser.addoption( - "--console", action="store_true", default=False, help="run console tests" + "--console", + action="store_true", + default=False, + help="run console tests", ) parser.addoption("--gui", action="store_true", default=False, help="run GUI tests") parser.addoption( - "--only-gui", action="store_true", default=False, help="run only GUI tests" + "--only-gui", + action="store_true", + default=False, + help="run only GUI tests", ) diff --git a/tests/test_commands.py b/tests/test_commands.py index 59d2a1cdee..a69af6454e 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -685,7 +685,13 @@ def test_magicwords(output, last_element): obj = CommandListingOutput( output, magicwords=magicwords, - columns_names=["SET", "TIME/FREQ", "LOAD STEP", "SUBSTEP", "CUMULATIVE"], + columns_names=[ + "SET", + "TIME/FREQ", + "LOAD STEP", + "SUBSTEP", + "CUMULATIVE", + ], ) assert obj.to_list() is not None diff --git a/tests/test_convert.py b/tests/test_convert.py index c20555c929..ab762db5b9 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -321,7 +321,9 @@ def test_header(): def test_com(): converted_output = convert_apdl_block( - "/com, this is a comment !inline comment!", header=False, add_imports=False + "/com, this is a comment !inline comment!", + header=False, + add_imports=False, ) assert 'mapdl.com("this is a comment")' in converted_output @@ -369,7 +371,9 @@ def test_commands_to_not_be_converted(cmd): @pytest.mark.parametrize("ending", ["\n", "\r\n"]) def test_detect_line_ending(ending): assert ending in convert_apdl_block( - f"/com First line{ending}/com Second line", header=False, add_imports=False + f"/com First line{ending}/com Second line", + header=False, + add_imports=False, ) assert ending in convert_apdl_block( f"/com First line{ending}/com Second line", diff --git a/tests/test_corba.py b/tests/test_corba.py index 8f69e865c7..443d0e0927 100644 --- a/tests/test_corba.py +++ b/tests/test_corba.py @@ -555,7 +555,10 @@ def test_cyclic_solve(mapdl_corba, cleared): @pytest.mark.parametrize( "dim_cols", np.concatenate( - (np.ones(2, dtype=int) * 2, np.random.randint(2, 100, size=2, dtype=int)) + ( + np.ones(2, dtype=int) * 2, + np.random.randint(2, 100, size=2, dtype=int), + ) ), ) def test_load_table(mapdl, dim_rows, dim_cols): @@ -568,7 +571,9 @@ def test_load_table(mapdl, dim_rows, dim_cols): dim_cols == 2 ): # because mapdl output arrays with shape (x,1) not (X,) See issue: #883 assert np.allclose( - mapdl.parameters["my_conv"], my_conv[1:, 1].reshape((dim_rows - 1, 1)), 1e-7 + mapdl.parameters["my_conv"], + my_conv[1:, 1].reshape((dim_rows - 1, 1)), + 1e-7, ) else: assert np.allclose(mapdl.parameters["my_conv"], my_conv[1:, 1:], 1e-7) diff --git a/tests/test_element.py b/tests/test_element.py index 40a086f650..caad0c7651 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -160,7 +160,12 @@ def test_parse_et_valid(self, message): @pytest.mark.parametrize( "message", - ["Element Type 8", "eLEMENT TyPe 0", "other thing entirely", "ELEMENT TYPE 8"], + [ + "Element Type 8", + "eLEMENT TyPe 0", + "other thing entirely", + "ELEMENT TYPE 8", + ], ) def test_parse_et_invalid(self, message): response = parse_e(message[0]) diff --git a/tests/test_launcher.py b/tests/test_launcher.py index e3eebaaf42..fbf649f102 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -325,7 +325,9 @@ def test_is_valid_executable_path(tmpdir, file, result): pytest.param("random/v221/random/bin/ans221", False, id="No ansys directory"), pytest.param("random/v221/ansys/random/ans221", False, id="No bin directory"), pytest.param( - "random/v221/ansys/bin/ansys22", False, id="version number incomplete" + "random/v221/ansys/bin/ansys22", + False, + id="version number incomplete", ), pytest.param("random/v221/ansys/bin/ansys222", False, id="Different version"), ], @@ -346,7 +348,8 @@ def test_is_common_executable_path(tmpdir, file_path, result): def test_warn_uncommon_executable_path(): with pytest.warns( - UserWarning, match="does not match the usual ansys executable path style" + UserWarning, + match="does not match the usual ansys executable path style", ): warn_uncommon_executable_path("") diff --git a/tests/test_logging.py b/tests/test_logging.py index 8bffc9d570..cffc550f9d 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -14,7 +14,13 @@ # - capfd: for testing console printing. # - caplog: for testing logging printing. -LOG_LEVELS = {"CRITICAL": 50, "ERROR": 40, "WARNING": 30, "INFO": 20, "DEBUG": 10} +LOG_LEVELS = { + "CRITICAL": 50, + "ERROR": 40, + "WARNING": 30, + "INFO": 20, + "DEBUG": 10, +} def fake_record( @@ -118,7 +124,11 @@ def test_global_logger_logging(caplog): msg = f"This is an {each_log_name} message." LOG.logger.log(each_log_number, msg) # Make sure we are using the right logger, the right level and message. - assert caplog.record_tuples[-1] == ("pymapdl_global", each_log_number, msg) + assert caplog.record_tuples[-1] == ( + "pymapdl_global", + each_log_number, + msg, + ) def test_global_logger_debug_mode(): diff --git a/tests/test_mapdl.py b/tests/test_mapdl.py index 2a1035b346..4f0699c5dd 100644 --- a/tests/test_mapdl.py +++ b/tests/test_mapdl.py @@ -816,7 +816,10 @@ def test_cyclic_solve(mapdl, cleared): @pytest.mark.parametrize( "dim_cols", np.concatenate( - (np.ones(2, dtype=int) * 2, np.random.randint(2, 100, size=2, dtype=int)) + ( + np.ones(2, dtype=int) * 2, + np.random.randint(2, 100, size=2, dtype=int), + ) ), ) def test_load_table(mapdl, dim_rows, dim_cols): @@ -1203,7 +1206,11 @@ def test_get_file_path(mapdl, tmpdir): @pytest.mark.parametrize( "option2,option3,option4", - [("expdata.dat", "", ""), ("expdata", ".dat", ""), ("expdata", "dat", "DIR")], + [ + ("expdata.dat", "", ""), + ("expdata", ".dat", ""), + ("expdata", "dat", "DIR"), + ], ) def test_tbft(mapdl, tmpdir, option2, option3, option4): @@ -1312,7 +1319,8 @@ def test_print_com(mapdl, capfd): def test_extra_argument_in_get(mapdl, make_block): assert isinstance( - mapdl.get("_MAXNODENUM_", "node", 0, "NUM", "MAX", "", "", "INTERNAL"), float + mapdl.get("_MAXNODENUM_", "node", 0, "NUM", "MAX", "", "", "INTERNAL"), + float, ) diff --git a/tests/test_parameters.py b/tests/test_parameters.py index 0aecd0bdaf..3cd919b40c 100644 --- a/tests/test_parameters.py +++ b/tests/test_parameters.py @@ -75,7 +75,9 @@ def test__get_parameter_array(mapdl, number): "123asdf", marks=pytest.mark.xfail, id="Starting by several numbers" ), pytest.param( - "asa12df+", marks=pytest.mark.xfail, id="Invalid symbol in parameter name." + "asa12df+", + marks=pytest.mark.xfail, + id="Invalid symbol in parameter name.", ), # function args pytest.param( diff --git a/tests/test_plotting.py b/tests/test_plotting.py index d031417588..a4722b4404 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -178,7 +178,10 @@ def test_bc_plot_options( ) def test_bc_plot_bc_labels(mapdl, bc_example, bc_labels): p = mapdl.nplot( - return_plotter=True, plot_bc=True, plot_bc_labels=True, bc_labels=bc_labels + return_plotter=True, + plot_bc=True, + plot_bc_labels=True, + bc_labels=bc_labels, ) assert isinstance(p, Plotter) @@ -197,7 +200,10 @@ def test_bc_plot_bc_labels(mapdl, bc_example, bc_labels): ) def test_bc_plot_bc_target(mapdl, bc_example, bc_target): p = mapdl.nplot( - return_plotter=True, plot_bc=True, plot_bc_labels=True, bc_target=bc_target + return_plotter=True, + plot_bc=True, + plot_bc_labels=True, + bc_target=bc_target, ) assert isinstance(p, Plotter) @@ -272,7 +278,10 @@ def debug_orders(pl, point): point = (0.5, 0.5) selected = mapdl.nsel( - selection, "P", _debug=lambda x: debug_orders(x, point=point), tolerance=0.2 + selection, + "P", + _debug=lambda x: debug_orders(x, point=point), + tolerance=0.2, ) # Selects node 2 assert selected @@ -327,7 +336,10 @@ def debug_orders(pl, point): point = (0.5, 0.5) selected = mapdl.ksel( - selection, "P", _debug=lambda x: debug_orders(x, point=point), tolerance=0.2 + selection, + "P", + _debug=lambda x: debug_orders(x, point=point), + tolerance=0.2, ) assert selected diff --git a/tests/test_post.py b/tests/test_post.py index 139ec47092..988930ec0f 100644 --- a/tests/test_post.py +++ b/tests/test_post.py @@ -803,7 +803,8 @@ def test_general_plotter_returns(mapdl, static_solve): def test_time_frequency_values(mapdl, contact_solve): assert np.allclose( - mapdl.post_processing.time_values, mapdl.post_processing.frequency_values + mapdl.post_processing.time_values, + mapdl.post_processing.frequency_values, ) @@ -852,7 +853,8 @@ def test_meta_post_plot_docstrings(): assert ( len( re.findall( - "<ansys.mapdl.core.plotting.general_plotter>`", docstring + "<ansys.mapdl.core.plotting.general_plotter>`", + docstring, ) ) >= 3