Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bmxam authored Dec 2, 2024
1 parent 93eb4f5 commit 72dd8ce
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
# BcubeCGNS.jl
Implementation of Bcube IO interface for CGNS format
Implementation of [`Bcube`](https://github.com/bcube-project/Bcube.jl) IO interface for CGNS format. Checkout the relative `Bcube` [documentation](https://bcube-project.github.io/Bcube.jl/stable/api/io/io_interface/) for more infos.

Note that all CGNS specifications are not implemented (for instance, NGON elements).

## Basic usage
```julia
using Bcube
using BcubeCGNS

mesh = rectangle_mesh(10, 20)
U = TrialFESpace(FunctionSpace(:Lagrange, 1), mesh)
u = FEFunction(U)
projection_l2!(u, PhysicalFunction(x -> sum(x)), CellDomain(mesh))

write_file("output.cgns", mesh, Dict("u" => u, "grad_u" => (u)))

result = read_file("output.cgns"; varnames = "*")
mesh = result.mesh
data = result.data # Dict of variable name (String) to MeshData
```

0 comments on commit 72dd8ce

Please sign in to comment.