This commit uses global pre allocated work space to dramatically reduce memory usage and allocation time
30 lines
708 B
Python
30 lines
708 B
Python
from stroid.config import MeshConfig
|
|
from stroid.IO import SaveStroidMesh
|
|
from stroid import GenerateMesh
|
|
import stroid
|
|
|
|
cfg = MeshConfig(
|
|
core_mapping="multi_block",
|
|
order=4,
|
|
refinement_levels=2,
|
|
include_external_domain=True,
|
|
r_core=0.25,
|
|
r_star=1.0,
|
|
r_infinity=5.0,
|
|
flattening=0.0,
|
|
core_id=1,
|
|
envelope_id=2,
|
|
vacuum_id=3,
|
|
surface_bdr_id=1,
|
|
inf_bdr_id=2,
|
|
optimization_methods=stroid.config.OptimizationMethods(
|
|
tmop=False,
|
|
smoothstep=True,
|
|
),
|
|
)
|
|
|
|
mesh = GenerateMesh(cfg)
|
|
SaveStroidMesh(mesh, "sandbox.smesh")
|
|
print(mesh)
|
|
|