Comments (2)
I think the simplest way to do this would be to overload the calc_sources!
function in the elixir that is used with libtrixi. E.g. define something like
struct Forcing
data::Vector{Float64} # received from external application
dof2index::Array{Int, 4} # maps (i,j,k,elem) to idx in data
end
function Trixi.calc_sources!(du, u, t, source_terms::Forcing,
equations::AbstractEquations{3}, dg::DG, cache)
# do something
end
Note that overloading an internal function leads to stricter compat limits, i.e. such elixir is not guaranteed to work with any future version of Trixi.jl. But for initial experimentation this may be fine.
from trixi.jl.
I do not see a clean and nice way how to do this (but this may be my fault). Instead, I would create another ODE RHS in libtrixi that adds the required source terms via indices. It kind of has to live there since the conversion of the indices to the external data is something Trixi.jl does not know.
from trixi.jl.
Related Issues (20)
- Restart does not work with TreeMesh + AMR + MPI
- Restart does not work with p4est + AMR HOT 1
- Performance evaluation for Julia v1.11
- Fix MPI tests on Apple Silicon HOT 5
- Missing documentation of source_terms HOT 2
- Add Positivity Preserving Feature for GaussSBP nodes HOT 2
- `AnalysisSurfaceIntegral` not ready for AMR HOT 1
- Filter out dependabot commits in release changelog HOT 2
- Parallel p4est simulation crashes when ranks have zero elements HOT 3
- Missing tests for boundary conditions HOT 1
- Finalize formatting
- Release v0.9 HOT 1
- The GLL method cannot perform exact numerical integration for DGSEM ? HOT 2
- A few questions about the formulas in the flux differencing tutorial HOT 2
- Spatially-varying number of fields HOT 2
- Converting StructuredMesh to uniform grid HOT 2
- hamilton-jacobi / level-set equations HOT 1
- Unused parameter in `AnalysisSurfaceIntegral` constructor
- `trixi_include` does not expose variables inside a Pluto notebook HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trixi.jl.