-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |