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

Analytic Laplace-Beltrami eigenmode stimulus on simple manifolds. More...

#include "coords.h"
#include "oakfield/operator_split.h"
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for laplace_beltrami.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SimStimulusLaplaceBeltramiConfig
 Configuration for analytic Laplace-Beltrami eigenmode stimuli. More...
 

Typedefs

typedef enum SimStimulusLaplaceBeltramiManifold SimStimulusLaplaceBeltramiManifold
 Analytic manifold families supported by Laplace-Beltrami stimuli.
 
typedef struct SimStimulusLaplaceBeltramiConfig SimStimulusLaplaceBeltramiConfig
 Configuration for analytic Laplace-Beltrami eigenmode stimuli.
 

Enumerations

enum  SimStimulusLaplaceBeltramiManifold { SIM_STIMULUS_LAPLACE_BELTRAMI_RECTANGLE = 0 , SIM_STIMULUS_LAPLACE_BELTRAMI_FLAT_TORUS , SIM_STIMULUS_LAPLACE_BELTRAMI_CYLINDER }
 Analytic manifold families supported by Laplace-Beltrami stimuli. More...
 

Functions

SimResult sim_add_stimulus_laplace_beltrami_operator (struct SimContext *context, const SimStimulusLaplaceBeltramiConfig *config, size_t *out_index)
 Register an analytic Laplace-Beltrami eigenmode stimulus operator.
 
SimResult sim_stimulus_laplace_beltrami_config (struct SimContext *context, size_t operator_index, SimStimulusLaplaceBeltramiConfig *out_config)
 Copy the current Laplace-Beltrami configuration from a registered operator.
 
SimResult sim_stimulus_laplace_beltrami_update (struct SimContext *context, size_t operator_index, const SimStimulusLaplaceBeltramiConfig *config)
 Replace or renormalize a registered Laplace-Beltrami configuration.
 

Detailed Description

Analytic Laplace-Beltrami eigenmode stimulus on simple manifolds.

Evaluates a local chart (u, v) and injects a manifold eigenmode A * Phi_{m,n}(u,v; M) * exp(i * (-omega * (t + t_0) + phi)), where M is one of:

  • rectangle: centered Dirichlet chart on [-L_u/2, L_u/2] x [-L_v/2, L_v/2]
  • flat_torus: periodic chart with periods L_u and L_v
  • cylinder: periodic in u with period L_u, Dirichlet in v on [-L_v/2, L_v/2]

Real fields receive the real component. Complex fields receive the full complex mode with an additional global rotation.

Enumeration Type Documentation

◆ SimStimulusLaplaceBeltramiManifold

Analytic manifold families supported by Laplace-Beltrami stimuli.

Enumerator
SIM_STIMULUS_LAPLACE_BELTRAMI_RECTANGLE 

Rectangular Dirichlet chart.

SIM_STIMULUS_LAPLACE_BELTRAMI_FLAT_TORUS 

Periodic flat torus chart.

SIM_STIMULUS_LAPLACE_BELTRAMI_CYLINDER 

Cylinder chart.

Function Documentation

◆ sim_add_stimulus_laplace_beltrami_operator()

SimResult sim_add_stimulus_laplace_beltrami_operator ( struct SimContext context,
const SimStimulusLaplaceBeltramiConfig config,
size_t *  out_index 
)

Register an analytic Laplace-Beltrami eigenmode stimulus operator.

The implementation copies and normalizes config, then registers a split operator that evaluates the selected manifold eigenmode on the target field.

Parameters
contextSimulation context that will own the operator.
configOptional Laplace-Beltrami configuration; NULL selects normalized defaults.
[out]out_indexOptional destination for the registered operator index.
Returns
SIM_RESULT_OK on success, or an error code from validation, allocation, or split-operator registration.

◆ sim_stimulus_laplace_beltrami_config()

SimResult sim_stimulus_laplace_beltrami_config ( struct SimContext context,
size_t  operator_index,
SimStimulusLaplaceBeltramiConfig out_config 
)

Copy the current Laplace-Beltrami configuration from a registered operator.

Parameters
contextSimulation context containing the operator.
operator_indexIndex returned by sim_add_stimulus_laplace_beltrami_operator().
[out]out_configReceives the operator's normalized configuration.
Returns
SIM_RESULT_OK on success, SIM_RESULT_INVALID_ARGUMENT for NULL pointers, SIM_RESULT_NOT_FOUND for a missing operator, or SIM_RESULT_INVALID_STATE when the operator has no stimulus state.

◆ sim_stimulus_laplace_beltrami_update()

SimResult sim_stimulus_laplace_beltrami_update ( struct SimContext context,
size_t  operator_index,
const SimStimulusLaplaceBeltramiConfig config 
)

Replace or renormalize a registered Laplace-Beltrami configuration.

Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update refreshes symbolic state and invalidates the scheduler plan.

Parameters
contextSimulation context containing the operator.
operator_indexIndex of the Laplace-Beltrami operator to update.
configOptional replacement configuration.
Returns
SIM_RESULT_OK on success, or an error code if lookup or state validation fails.