Skip to content

How to add Gauge/Tau Method #970

Open

Description

@Veenty

Im trying to use the interlace operator to get the US matrix representation of the system for functions $u,v, q$ and real numbers $\tau_1, \tau_2$
kl

$$ \begin{matrix} u^{(4)} + q = f_1 \\ v^{(4)} + q^{(1)} = f_2 \\ -u^{(1)} + v + \tau_1 \phi_1 + \tau_2 \phi_2 = f_3 \\ u(\pm 1) = u_{\pm} \\ v(\pm 1) = v_{\pm} \end{matrix} $$

The thing is that I'm not sure how to add this variables $\tau_1, \tau_2$ through the block structure that comes in approx fun. If there was not any dummy variables, I was writing the system as

a,b = -1,1;
d = a..b;
D⁴ = Derivative(d, 4)
D¹ = Derivative(d, 1)

γ₀ = Dirichlet(d)
γ₁ = Neumann(d)
operator = [ γ₀  0    0 ;
             0   γ₀   0;
            γ₁  0    0 ;
             0   γ₁   0 ;
             I  -D¹  0;
            D⁴  0  I;
             0   D⁴  D¹
            ]

Another issue, is that there is a missmatch on how many coefficients I can enforce each of the equations, and not sure how to resolve that either using the notation of the library

Activity

  1. dlfivefifty commented on Dec 9, 2025

    @dlfivefifty
    Member

    I think ClassicalOrthogonalPolynomials.jl might be a better package for finite-dimensional truncations. I've added an example implementing your operator:

    https://github.com/JuliaApproximation/ClassicalOrthogonalPolynomials.jl/blob/dl/taumethod/examples/taumethod.jl

    Though probably the truncartion sizes need to be modified as this doesn't result in a square discretization

  2. Veenty commented on Dec 11, 2025

    @Veenty
    Author

    Thank you! Yeah the optimal for each equation is different (which makes it quite annoying tbh), $u,v$ need to be discretized in $N+4$ modes and $q$ in $N+1$ modes, and each equation is discretized in a different number of modes as well, as

    $$ \begin{matrix} u^{(4)} + q = f_1 \quad N \text{ modes}\\ v^{(4)} + q^{(1)} = f_2 \quad N \text{ modes}\\ -u^{(1)} + v + \tau_1 \phi_1 + \tau_2 \phi_2 = f_3 \quad N+3 \text{ modes}\\ u(\pm 1) = u_{\pm} \\ v(\pm 1) = v_{\pm} \end{matrix} $$

  3. dlfivefifty commented on Dec 11, 2025

    @dlfivefifty
    Member

    Ok hopefully it's clear how to modify the code for that situation but let me know if not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions