mrx
0.0

Contents

  • Overview
    • Ways to use mrx
      • Input files
      • JAX and jit-compilation
      • Optimization
    • Mathematical Formulation
    • Finite Element Discretization
    • Geometry and Coordinate Transformations
    • Magnetic Relaxation Method
  • Installation
    • Requirements
    • Installing MRX
    • Optional Packages
    • Post-Installation
  • Generating the Documentation
  • Source code on GitHub
  • Publications

API Reference

  • MRX API Reference
    • Module contents
      • DESCWrapper
        • DESCWrapper.__init__()
        • DESCWrapper.compute_at_points()
      • DerivativeSpline
        • DerivativeSpline.n
        • DerivativeSpline.p
        • DerivativeSpline.type
        • DerivativeSpline.T
        • DerivativeSpline.s
        • DerivativeSpline.__call__()
        • DerivativeSpline.__getitem__()
        • DerivativeSpline.__init__()
        • DerivativeSpline.evaluate()
      • DifferentialForm
        • DifferentialForm.d
        • DifferentialForm.k
        • DifferentialForm.n
        • DifferentialForm.nr
        • DifferentialForm.nt
        • DifferentialForm.nz
        • DifferentialForm.pr
        • DifferentialForm.pt
        • DifferentialForm.pz
        • DifferentialForm.ns
        • DifferentialForm.Λ
        • DifferentialForm.dΛ
        • DifferentialForm.types
        • DifferentialForm.bases
        • DifferentialForm.shape
        • DifferentialForm.__call__()
        • DifferentialForm.__getitem__()
        • DifferentialForm.__init__()
        • DifferentialForm.__iter__()
        • DifferentialForm.__len__()
        • DifferentialForm._ravel_index()
        • DifferentialForm._unravel_index()
        • DifferentialForm._vector_index()
        • DifferentialForm.d
        • DifferentialForm.evaluate()
        • DifferentialForm.k
        • DifferentialForm.n
        • DifferentialForm.nr
        • DifferentialForm.ns
        • DifferentialForm.nt
        • DifferentialForm.nz
        • DifferentialForm.pr
        • DifferentialForm.pt
        • DifferentialForm.pz
      • DiscreteFunction
        • DiscreteFunction.dof
        • DiscreteFunction.Λ
        • DiscreteFunction.n
        • DiscreteFunction.ns
        • DiscreteFunction.E
        • DiscreteFunction.__call__()
        • DiscreteFunction.__init__()
      • LazyBoundaryOperator
        • LazyBoundaryOperator.k
        • LazyBoundaryOperator.Lambda_0
        • LazyBoundaryOperator.types
        • LazyBoundaryOperator.nr
        • LazyBoundaryOperator.nt
        • LazyBoundaryOperator.nz
        • LazyBoundaryOperator.dr
        • LazyBoundaryOperator.dt
        • LazyBoundaryOperator.dz
        • LazyBoundaryOperator.n1
        • LazyBoundaryOperator.n2
        • LazyBoundaryOperator.n3
        • LazyBoundaryOperator.n
        • LazyBoundaryOperator.M
        • LazyBoundaryOperator.__array__()
        • LazyBoundaryOperator.__init__()
        • LazyBoundaryOperator._element()
        • LazyBoundaryOperator._unravel_index()
        • LazyBoundaryOperator._vector_index()
        • LazyBoundaryOperator.assemble()
        • LazyBoundaryOperator.matrix()
      • LazyDerivativeMatrix
        • LazyDerivativeMatrix.assemble()
        • LazyDerivativeMatrix.gradient_assemble()
        • LazyDerivativeMatrix.curl_assemble()
        • LazyDerivativeMatrix.div_assemble()
        • LazyDerivativeMatrix.assemble()
        • LazyDerivativeMatrix.curl_assemble()
        • LazyDerivativeMatrix.div_assemble()
        • LazyDerivativeMatrix.gradient_assemble()
      • LazyDoubleCurlMatrix
        • LazyDoubleCurlMatrix.__init__()
        • LazyDoubleCurlMatrix.assemble()
        • LazyDoubleCurlMatrix.__init__()
        • LazyDoubleCurlMatrix.assemble()
      • LazyDoubleDivergenceMatrix
        • LazyDoubleDivergenceMatrix.__init__()
        • LazyDoubleDivergenceMatrix.assemble()
        • LazyDoubleDivergenceMatrix.__init__()
        • LazyDoubleDivergenceMatrix.assemble()
      • LazyExtractionOperator
        • LazyExtractionOperator.k
        • LazyExtractionOperator.Λ
        • LazyExtractionOperator.xi
        • LazyExtractionOperator.nr
        • LazyExtractionOperator.nt
        • LazyExtractionOperator.nz
        • LazyExtractionOperator.dr
        • LazyExtractionOperator.dt
        • LazyExtractionOperator.dz
        • LazyExtractionOperator.o
        • LazyExtractionOperator.n1
        • LazyExtractionOperator.n2
        • LazyExtractionOperator.n3
        • LazyExtractionOperator.n
        • LazyExtractionOperator.__array__()
        • LazyExtractionOperator.__init__()
        • LazyExtractionOperator._element()
        • LazyExtractionOperator._inner_zeroform()
        • LazyExtractionOperator._outer_zeroform()
        • LazyExtractionOperator._threeform()
        • LazyExtractionOperator._vector_index()
        • LazyExtractionOperator.assemble()
        • LazyExtractionOperator.inner_oneform_r()
        • LazyExtractionOperator.inner_oneform_θ()
        • LazyExtractionOperator.matrix()
      • LazyMassMatrix
        • LazyMassMatrix.__init__()
        • LazyMassMatrix.assemble()
        • LazyMassMatrix.zeroform_assemble()
        • LazyMassMatrix.oneform_assemble()
        • LazyMassMatrix.twoform_assemble()
        • LazyMassMatrix.threeform_assemble()
        • LazyMassMatrix.__init__()
        • LazyMassMatrix.assemble()
        • LazyMassMatrix.oneform_assemble()
        • LazyMassMatrix.threeform_assemble()
        • LazyMassMatrix.twoform_assemble()
        • LazyMassMatrix.vector_assemble()
        • LazyMassMatrix.zeroform_assemble()
      • LazyMatrix
        • LazyMatrix.Λ0
        • LazyMatrix.Λ1
        • LazyMatrix.Q
        • LazyMatrix.F
        • LazyMatrix.E0
        • LazyMatrix.E1
        • LazyMatrix.n0
        • LazyMatrix.n1
        • LazyMatrix.ns0
        • LazyMatrix.ns1
        • LazyMatrix.M
        • LazyMatrix.__init__()
        • LazyMatrix.__getitem__()
        • LazyMatrix.__array__()
        • LazyMatrix.assemble()
        • LazyMatrix.E0
        • LazyMatrix.E1
        • LazyMatrix.F
        • LazyMatrix.Lambda_0
        • LazyMatrix.Lambda_1
        • LazyMatrix.Q
        • LazyMatrix.__array__()
        • LazyMatrix.__init__()
        • LazyMatrix.assemble()
        • LazyMatrix.matrix()
        • LazyMatrix.n0
        • LazyMatrix.n1
        • LazyMatrix.ns0
        • LazyMatrix.ns1
        • LazyMatrix.sparse()
      • LazyProjectionMatrix
        • LazyProjectionMatrix.assemble()
        • LazyProjectionMatrix.assemble()
      • LazyStiffnessMatrix
        • LazyStiffnessMatrix.__init__()
        • LazyStiffnessMatrix.assemble()
        • LazyStiffnessMatrix.__init__()
        • LazyStiffnessMatrix.assemble()
      • Projector
        • Projector.k
        • Projector.Seq
        • Projector.Seq
        • Projector.__call__()
        • Projector.__init__()
        • Projector.k
        • Projector.oneform_projection()
        • Projector.threeform_projection()
        • Projector.twoform_projection()
        • Projector.zeroform_projection()
      • Pullback
        • Pullback.k
        • Pullback.f
        • Pullback.F
        • Pullback.__call__()
        • Pullback.__init__()
      • Pushforward
        • Pushforward.k
        • Pushforward.f
        • Pushforward.F
        • Pushforward.__call__()
        • Pushforward.__init__()
      • QuadratureRule
        • QuadratureRule.x_x
        • QuadratureRule.x_y
        • QuadratureRule.x_z
        • QuadratureRule.w_x
        • QuadratureRule.w_y
        • QuadratureRule.w_z
        • QuadratureRule.x
        • QuadratureRule.w
        • QuadratureRule.__init__()
      • SplineBasis
        • SplineBasis.n
        • SplineBasis.ns
        • SplineBasis.p
        • SplineBasis.type
        • SplineBasis.T
        • SplineBasis.T
        • SplineBasis.__call__()
        • SplineBasis.__getitem__()
        • SplineBasis.__init__()
        • SplineBasis._const_spline()
        • SplineBasis._evaluate()
        • SplineBasis._init_knots()
        • SplineBasis._p_spline()
        • SplineBasis.evaluate()
        • SplineBasis.n
        • SplineBasis.ns
        • SplineBasis.p
        • SplineBasis.type
      • TensorBasis
        • TensorBasis.bases
        • TensorBasis.shape
        • TensorBasis.n
        • TensorBasis.ns
        • TensorBasis.__call__()
        • TensorBasis.__getitem__()
        • TensorBasis.__init__()
        • TensorBasis.evaluate()
      • append_to_trace_dict()
      • converge_plot()
      • curl()
      • div()
      • get_1d_grids()
      • get_2d_grids()
      • get_3d_grids()
      • get_xi()
      • grad()
      • interpolate_B()
      • inv33()
      • is_running_in_github_actions()
      • jacobian_determinant()
      • l2_product()
      • newton_solver()
      • picard_solver()
      • poincare_plot()
      • pressure_plot()
      • project_desc_equilibrium()
      • trace_plot()
      • update_config()

Tutorials:

  • Poisson equation on the unit disk
    • Mapping
    • Manufactured solution
    • Resolution and periodicity
    • de Rham sequence
    • Matrix assembly
    • Differential forms
    • Handling the polar singularity and boundary conditions
    • Pre-computations
    • Matrix solve
  • Mixed Poisson equation on the unit disk
    • Mixed formulation
    • Discrete formulation
    • Strong and weak operators
    • Manufactured solution
    • Code
  • Poisson equation on a toroid
  • Harmonic fields in a hollow torus
    • Parameters
    • de Rham sequence
    • Harmonic fields
    • Ampère’s law
    • Final checks
  • GVEC mappings
    • GVEC
    • Input
    • Approximating the mapping in spline space
    • Verifying the mapping
  • A simple tokamak equilibrium
  • Helicity minimization

Tutorial Scripts:

  • Poisson Problem on a disc
    • Code Walkthrough
  • Mixed Polar Poisson Problem
    • Code Walkthrough
  • Toroid Poisson Problem
    • Code Walkthrough

Configuration Scripts:

  • Solovev Configuration
    • Code Walkthrough
  • Stellarator Configuration
    • Code Walkthrough
  • Iterative Island Calculation
    • Code Walkthrough
  • Hopf Configuration
    • Code Walkthrough

Interactive Scripts:

  • GVEC Tokamak Interface Test
    • Code Walkthrough
  • GVEC Stellarator Interface Test
    • Code Walkthrough
  • Toroid Poisson (Interactive)
    • Code Walkthrough
  • Toroid Cavity
    • Code Walkthrough
  • Cylinder Cavity
    • Code Walkthrough
  • Cylinder Vector Poisson
    • Code Walkthrough
  • Drum Shape Optimization
    • Code Walkthrough
mrx
  • Search


© Copyright 2025, MRX Development Team.

Built with Sphinx using a theme provided by Read the Docs.