Skip to content

Commit 5958b76

Browse files
authored
Reducing times for docs and testing (#1482)
* Reducing times. * Reducing computation times. * Reducing couple example running time.
1 parent c78ca04 commit 5958b76

File tree

6 files changed

+12
-37
lines changed

6 files changed

+12
-37
lines changed

examples/00-mapdl-examples/2d_plate_with_a_hole.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def compute_stress_con(ratio):
331331
###############################################################################
332332
# Run the batch and record the stress concentration
333333
k_t_exp = []
334-
ratios = np.linspace(0.01, 0.5, 15)
334+
ratios = np.linspace(0.01, 0.5, 10)
335335
print(" Ratio : Stress Concentration (K_t)")
336336
for ratio in ratios:
337337
stress_con = compute_stress_con(ratio)

examples/01-apdlmath-examples/solve_dense_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Allocate a Dense Matrix in the APDLMath workspace
2121
#
2222
mapdl.clear()
23-
dim = 10000
23+
dim = 1000
2424
a = mm.rand(dim, dim)
2525
b = mm.rand(dim)
2626
x = mm.zeros(dim)

examples/02-geometry/03-volumes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def generate_random_volume():
273273
mapdl.vsymm("Y", "ALL")
274274

275275
# Plot while showing bounds and disabling extra line plotting.
276-
mapdl.vplot(show_bounds=True, show_lines=False, quality=5)
276+
mapdl.vplot(show_bounds=True, show_lines=False, quality=1)
277277

278278

279279
###############################################################################

tests/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,14 @@ def make_block(mapdl, cleared):
490490

491491
@pytest.fixture(scope="function")
492492
def coupled_example(mapdl, cleared):
493-
mapdl.input(vmfiles["vm33"])
493+
vm33 = vmfiles["vm33"]
494+
with open(vm33, "r") as fid:
495+
mapdl_code = fid.read()
496+
497+
mapdl_code = mapdl_code.replace(
498+
"SOLVE", "SOLVE\n/COM Ending script after first simulation\n/EOF"
499+
)
500+
mapdl.input_strings(mapdl_code)
494501

495502

496503
@pytest.fixture(scope="function")

tests/test_files/full26.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sectype,2,shell
2222
secdata,0.0005,2
2323

2424
block,,0.02,,0.03,,0.015
25-
esize,0.005
25+
esize,0.5
2626
vmesh,all
2727

2828
type,2

tests/test_files/static.dat

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -95985,36 +95985,4 @@ stabilize,off ! Stabilization turned OFF by user
9598595985
! *********** WB SOLVE COMMAND ***********
9598695986
! check interactive state
9598795987
*get,ANSINTER_,active,,int
95988-
*if,ANSINTER_,ne,0,then
95989-
/eof
95990-
*endif
95991-
solve
95992-
/com *************** Write FE CONNECTORS *********
95993-
CEWRITE,file,ce,,INTE
95994-
/com,****************************************************
95995-
/com,*************** FINISHED SOLVE FOR LS 1 *************
95996-
save,file,db
95997-
*set,_DS_PROGRESS ! turn off progress updates to avoid virus scanning bug
95998-
*get,_wallasol,active,,time,wall
95999-
/nopr
96000-
*get,_numnode,node,0,count
96001-
*get,_numelem,elem,0,count
96002-
*get, _MAXELEMNUM, elem, 0, NUM, MAX
96003-
*get, _MAXNODENUM, node, 0, NUM, MAX,,,INTERNAL
96004-
*get, _MAXELEMTYPE, etyp, 0, NUM, MAX
96005-
*get, _MAXREALCONST, real, 0, NUM, MAX
96006-
/gopr
96007-
*get,_PCGITER,active,,solu,cgiter
96008-
/post1
96009-
xmlo,ENCODING,ISO-8859-1
96010-
xmlo,parm
96011-
/xml,parm,xml
96012-
fini
96013-
/gopr
96014-
*get,_walldone,active,,time,wall
96015-
_preptime=(_wallbsol-_wallstrt)*3600
96016-
_solvtime=(_wallasol-_wallbsol)*3600
96017-
_posttime=(_walldone-_wallasol)*3600
96018-
_totaltim=(_walldone-_wallstrt)*3600
96019-
/wb,file,end ! done with WB generated input
9602095988
/com, PyMAPDL: Simulation Finished.

0 commit comments

Comments
 (0)