Class Laplacian

java.lang.Object
org.episteme.core.mathematics.analysis.vectorcalculus.Laplacian

public class Laplacian extends Object
Computes the Laplacian of a scalar field.

The Laplacian is the divergence of the gradient: ∇²f = ∇·(∇f)

Definition: ∇²f = ∂²f/∂x₁² + ∂²f/∂x₂² + ... + ∂²f/∂xₙ²

Physical interpretation and applications: - Heat equation: ∂T/∂t = α∇²T (heat diffusion) - Wave equation: ∂²u/∂t² = c²∇²u (wave propagation) - Laplace's equation: ∇²φ = 0 (electrostatics, gravity) - Poisson's equation: ∇²φ = -ρ/ε₀ (electrostatics with charges) - Schrödinger equation: iℏ∂ψ/∂t = -ℏ²/(2m)∇²ψ + Vψ - Harmonic functions: functions where ∇²f = 0

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • Laplacian

      public Laplacian()
  • Method Details

    • compute

      public static Real compute(ScalarField<PointND> field, PointND point, Real h)
      Computes the Laplacian of a scalar field at a point.

      Uses second-order central difference: ∂²f/∂xᵢ² ≈ (f(x + h*eᵢ) - 2f(x) + f(x - h*eᵢ)) / h²

      Parameters:
      field - the scalar field
      point - the point at which to compute Laplacian
      h - the step size for numerical differentiation
      Returns:
      the Laplacian (scalar value)
    • asField

      public static ScalarField<PointND> asField(ScalarField<PointND> field, Real h)
      Returns a scalar field representing the Laplacian of the input field.
      Parameters:
      field - the scalar field
      h - the step size for numerical differentiation
      Returns:
      the Laplacian as a scalar field
    • computeVector

      public static Vector<Real> computeVector(VectorField<PointND> field, PointND point, Real h)
      Computes the vector Laplacian of a vector field.

      For a vector field F, the vector Laplacian is: ∇²F = (∇²F₁, ∇²F₂, ..., ∇²Fₙ)

      Note: In some contexts, ∇²F = ∇(∇·F) - ∇×(∇×F), but this is only equivalent in 3D and for certain coordinate systems.

      Parameters:
      field - the vector field
      point - the point
      h - the step size
      Returns:
      the vector Laplacian