Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
sim_flux_lens.h File Reference

Flux lens state and skew-Burgers flux utilities. More...

#include <complex.h>
#include <stdbool.h>
#include <stddef.h>
#include "field.h"
#include "operators/common/fft_plan.h"
Include dependency graph for sim_flux_lens.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FluxMarks
 Spectral flux landmarks computed from the latest flux-lens analysis. More...
 
struct  FluxLensState
 Persistent flux-lens band state and analysis buffers for a simulation context. More...
 
struct  FluxLensWorkspace
 Scratch workspace used while computing and reconstructing flux-lens bands. More...
 

Typedefs

typedef struct FluxMarks FluxMarks
 Spectral flux landmarks computed from the latest flux-lens analysis.
 
typedef struct FluxLensState FluxLensState
 Persistent flux-lens band state and analysis buffers for a simulation context.
 
typedef struct FluxLensWorkspace FluxLensWorkspace
 Scratch workspace used while computing and reconstructing flux-lens bands.
 

Functions

void flux_lens_init (FluxLensState *lens)
 
void flux_lens_workspace_init (FluxLensWorkspace *workspace)
 
void flux_lens_force_refresh (FluxLensState *lens)
 
void flux_lens_set_field_index (FluxLensState *lens, size_t field_index)
 
void flux_lens_scale_width (FluxLensState *lens, double scale)
 
void flux_lens_shift_center (FluxLensState *lens, double shift)
 
void flux_lens_set_band (FluxLensState *lens, double band_lo, double band_hi)
 
SimResult flux_lens_ensure_capacity (FluxLensState *lens, FluxLensWorkspace *workspace, struct SimContext *context, size_t length)
 
void flux_lens_release (FluxLensState *lens, FluxLensWorkspace *workspace, struct SimContext *context)
 
bool flux_compute (const struct SimField *field, FluxLensState *lens, FluxLensWorkspace *workspace, struct SimContext *context)
 
void flux_lens_after_flux (FluxLensState *lens)
 
void flux_lens_update_targets_from_marks (FluxLensState *lens)
 
void flux_lens_relax_band (FluxLensState *lens)
 
bool flux_lens_reconstruct (const struct SimField *field, FluxLensState *lens, FluxLensWorkspace *workspace)
 
void flux_lens_update (struct SimContext *context)
 
double flux_total_work (const double *S, size_t length)
 
double flux_total_energy (const double complex *u_hat, size_t length)
 
void flux_release_scratch (FluxLensWorkspace *workspace, struct SimContext *context)
 

Detailed Description

Flux lens state and skew-Burgers flux utilities.

Typedef Documentation

◆ FluxLensState

typedef struct FluxLensState FluxLensState

Persistent flux-lens band state and analysis buffers for a simulation context.

The state owns band spectra, physical reconstructions, and bucket arrays after flux_lens_ensure_capacity(); release them with flux_lens_release().

◆ FluxLensWorkspace

Scratch workspace used while computing and reconstructing flux-lens bands.

The workspace owns temporary buffers and its FFT plan after capacity is ensured; release them with flux_release_scratch() or flux_lens_release().