Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GridapODEs - Changes in the LinearStageOperator Struct #1075

Open
shreyas02 opened this issue Jan 15, 2025 · 1 comment
Open

GridapODEs - Changes in the LinearStageOperator Struct #1075

shreyas02 opened this issue Jan 15, 2025 · 1 comment

Comments

@shreyas02
Copy link

shreyas02 commented Jan 15, 2025

Hi all,

I am working on implementing strong form coupling for linear transient fluid-structure interaction problems. For that, I need to modify the linear system before solving the matrix for each time step. I want to implement this with as few changes in the Gridap library as possible. We need previous time step data and some ODE-specific data for these modifications.

The solution we arrived at was creating a CustomSolver wrapper (solve, solve!, symbolicsetup, numericalsetup) and performing all the matrix modifications in the custom numericalsetup function. The problem arises when transferring previous time-step data from the ode solver to the numerical setup function while solving a linear problem.

Solution -

The solution we arrived at was modifying the LinearStageOperator struct to include ws and usx. The struct definition for the NonlinearStageOperator contains usx and ws.

I will link the code snippets below -

Linear Stage Operator -

struct LinearStageOperator <: StageOperator
J::AbstractMatrix
r::AbstractVector
reuse::Bool
end

Non-Linear Stage Operator -

struct NonlinearStageOperator <: StageOperator
odeop::ODEOperator
odeopcache
tx::Real
usx::Function
ws::Tuple{Vararg{Real}}
end

Can this change be introduced in Gridap? This will make it possible to perform strong coupling for linear transient multiphysics problems. If this solution is not feasible, I would be happy to discuss alternatives.

Thanks,
Shreyas

@JordiManyer
Copy link
Member

@AlexandreMagueresse any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants