Nodemag dynamic solver¶
Z_sim_dynamic_stereo_nodemag
subclasses Z_sim_dynamic_stereo_base
with mixed unknowns (q_A, q_B) only. The demag term is stripped from energy_terms;
set_magnetostatics and set_BEMcpp are no-ops.
Use when shape demagnetization is negligible or when external Zeeman fields are prescribed.
Exchange, anisotropy, Zeeman, atlas logic, BDF stepping, and acceptance gates match the demag
variant. Allowed outputs are listed under Output targets (demag-only names raise
ValueError).
Typical call sequence¶
set_mesh → set_materials → set_external_field → initialize charts →
init_dynamic → solve_problem.
Configuration keys: Configuration reference. Workflow example: Getting started.
- class Zmag_bins.Zmag_dynamic_stereo_nodemag.Z_sim_dynamic_stereo_nodemag(args_init_sim: dict)[source]¶
Bases:
Z_sim_dynamic_stereo_baseStereographic LLG with mixed unknowns
(q_A, q_B)only.Shares the base-class time loop and atlas with the demag variant but omits
V_phiand magnetostatics.- __init__(args_init_sim: dict) None[source]¶
Initialize no-demag solver configuration and chart basis.
- Parameters:
args_init_sim (dict) – See class docstring. Raises
ValueErrorif no energy terms remain after removingdemag.
- init_dynamic(args_init_dyn: dict)[source]¶
Configure time integration, SNES, BDF history, ramps, and I/O for
(q_A, q_B).Same contract as the demag solver except magnetostatics, demag continuation, and demag-only outputs are absent.
- Parameters:
args_init_dyn (dict) – Dynamic configuration dictionary (requires
cfl_settings). See Configuration reference in the manual.- Raises:
ValueError – On invalid configuration keys or values.
FileNotFoundError – If required
path_dirsentries are missing.KeyError – If a required
path_dirskey is absent.
- compute_energy()[source]¶
Evaluate atlas-weighted energy without a demag term.
- Returns:
numpy.ndarray
Energy components followed by
total.
- solve_weak_form(max_outer_override=None)[source]¶
Advance one timestep on
(q_A,q_B)with q-only outer fixed-point and SNES.Called from
solve_problem()inside each retry attempt. Acceptance gates (residual, thermo, closure) run in the base class after this returns.- Parameters:
max_outer_override (int, optional) – Cap outer-split iterations.
- Returns:
q_defect,converged, outer-iteration metadata.- Return type:
dict
- solve_magnetostatics(step)[source]¶
Write restart magnetization checkpoint when resuming from a saved state.
- open_output(target: str, filename: str)[source]¶
Open BP (VTX) and optional XDMF time-series writers for a field target.
- Parameters:
target (str) – Field name (see FEATURE_MATRIX.md). Demag-only targets raise in nodemag.
filename (str) – Base path for
.bpoutput (XDMF uses parallel.xdmfnaming).
- write_output(target: str)[source]¶
Update and write fields for
targetat current timeself.t.- Parameters:
target (str)
- write_xdmf_checkpoint(target: str, filename: str)[source]¶
Checkpoint field in XDMF for no-demag qA/qB model.
- set_magnetostatics(interfaces: list[dict], surface_tag: int)[source]¶
Ignored in nodemag; present so shared drivers can call the demag API safely.
See also
Module overview: Zmag_bins.Zmag_dynamic_stereo_nodemag