perf(allocations): reduced overall allocations by 95%, increaseed jacobian applicatin by 2x
This commit uses global pre allocated work space to dramatically reduce memory usage and allocation time
This commit is contained in:
@@ -1,11 +1,27 @@
|
||||
from stroid.config import MeshConfig
|
||||
from stroid.IO import SaveStroidMesh
|
||||
from stroid import GenerateMesh
|
||||
import stroid
|
||||
|
||||
cfg = MeshConfig()
|
||||
cfg.order = 4
|
||||
cfg.refinement_levels = 2
|
||||
print(cfg)
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user