Skip to content

Commit

Permalink
fixed failing docstests
Browse files Browse the repository at this point in the history
  • Loading branch information
mberto79 committed Sep 7, 2024
1 parent ba7fbb9 commit 6e1d547
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions docs/src/user_guide/3_numerical_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ set_schemes
```

For example, below we set the schemes for the `U` and `p` fields. Notice that in the first case the schemes will take their default values (entry for `p`). In the case of `U`, we are only changing the setting for the divergence scheme to `Upwind`.

```jldoctest; filter = r".*"s => s"", output = false
using XCALibre
schemes = (
p = set_schemes() # no input provided (will use defaults)
p = set_schemes(), # no input provided (will use defaults)
U = set_schemes(divergence = Upwind),
)
Expand Down Expand Up @@ -107,6 +107,23 @@ print_tree(PreconditionerType) # hide

Below an example is provided in context. Here, we are setting solvers for both the velocity field `U` and the pressure field `p` and packing them into a `NamedTuple` "solvers". The `Jacobi` preconditioner is use in both solvers. Notice that preconditioners are specified with an instance of their type i.e. `Jacobi()`. Internally, the preconditioner instance is used for dispatch. This tupple will then be pass on to create the final `Configuration` object.

```@meta
DocTestSetup = quote
using XCALibre
mesh_file = pkgdir(XCALibre, "examples/2d_incompressible_laminar_backwards_step/backward_facing_step_10mm.unv")
mesh = UNV2D_mesh(mesh_file, scale=0.001)
mesh_dev = mesh # use this line to run on CPU
nu = 1e-3
model = Physics(
time = Steady(),
fluid = Fluid{Incompressible}(nu = nu),
turbulence = RANS{Laminar}(),
energy = Energy{Isothermal}(),
domain = mesh_dev
)
end
```

```jldoctest; filter = r".*"s => s"", output = false
using XCALibre
Expand All @@ -133,4 +150,8 @@ solvers = (
# output
```

```@meta
DocTestSetup = nothing
```

0 comments on commit 6e1d547

Please sign in to comment.