Skip to content

Commit

Permalink
More documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Dec 11, 2024
1 parent 4e80560 commit 4af05f8
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/src/BlockSolvers.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ BlockTriangularSolver(blocks::AbstractMatrix{<:SolverBlock},solvers ::AbstractVe
BlockTriangularSolver(solvers::AbstractVector{<:LinearSolver})
```

## Staggered FE Operators
## Staggered FEOperators

```@docs
StaggeredFESolver
StaggeredFEOperator
AffineStaggeredFESolver
NonlinearStaggeredFESolver
solve!(xh, solver::StaggeredFESolver{NB}, op::StaggeredFEOperator{NB}, ::Nothing)
StaggeredAffineFEOperator
StaggeredNonlinearFEOperator
solve!(xh, solver::StaggeredFESolver{NB}, op::StaggeredFEOperator{NB}, ::Nothing) where {NB}
```
29 changes: 29 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ GridapSolvers provides algebraic and non-algebraic solvers for the Gridap ecosys

Solvers follow a modular design, where most blocks can be combined to produce PDE-taylored solvers for a wide range of problems.

## Table of contents

```@contents
Pages = [
"SolverInterfaces.md",
Expand All @@ -20,3 +22,30 @@ Pages = [
"PatchBasedSmoothers.md"
]
```

## Documentation and examples

A (hopefully) comprehensive documentation is available [here](https://gridap.github.io/GridapSolvers.jl/stable/).

A list of examples is available in the documentation. These include some very well known examples such as the Stokes, Incompressible Navier-Stokes and Darcy problems. The featured scripts are available in `test/Applications`.

An example on how to use the library within an HPC cluster is available in `joss_paper/scalability`. The included example and drivers are used to generate the scalability results in our [JOSS paper](https://doi.org/10.21105/joss.07162).

## Installation

GridapSolvers is a registered package in the official [Julia package registry](https://github.com/JuliaRegistries/General). Thus, the installation of GridapSolvers is straight forward using the [Julia's package manager](https://julialang.github.io/Pkg.jl/v1/). Open the Julia REPL, type `]` to enter package mode, and install as follows

```julia
pkg> add GridapSolvers
pkg> build
```

Building is required to link the external artifacts (e.g., PETSc, p4est) to the Julia environment. Restarting Julia is required after building in order to make the changes take effect.

### Using custom binaries

The previous installations steps will setup GridapSolvers to work using Julia's pre-compiled artifacts for MPI, PETSc and p4est. However, you can also link local copies of these libraries. This might be very desirable in clusters, where hardware-specific libraries might be faster/more stable than the ones provided by Julia. To do so, follow the next steps:

- [MPI.jl](https://juliaparallel.org/MPI.jl/stable/configuration/)
- [GridapPETSc.jl](https://github.com/gridap/GridapPETSc.jl)
- [GridapP4est.jl](https://github.com/gridap/GridapP4est.jl), and [P4est_wrapper.jl](https://github.com/gridap/p4est_wrapper.jl)
26 changes: 26 additions & 0 deletions src/BlockSolvers/StaggeredFEOperators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ struct StaggeredAffineFEOperator{NB,SB} <: StaggeredFEOperator{NB,SB}
end
end

"""
function StaggeredAffineFEOperator(
biforms::Vector{<:Function},
liforms::Vector{<:Function},
trials::Vector{<:FESpace},
tests::Vector{<:FESpace},
[assems::Vector{<:Assembler}]
)
Constructor for a `StaggeredAffineFEOperator` operator, taking in each
equation as a pair of bilinear/linear forms and the corresponding trial/test spaces.
The trial/test spaces can be single or multi-field spaces.
"""
function StaggeredAffineFEOperator(
biforms::Vector{<:Function},
liforms::Vector{<:Function},
Expand Down Expand Up @@ -233,6 +246,19 @@ struct StaggeredNonlinearFEOperator{NB,SB} <: StaggeredFEOperator{NB,SB}
end

# TODO: Can be compute jacobians from residuals?

"""
function StaggeredNonlinearFEOperator(
res::Vector{<:Function},
jac::Vector{<:Function},
trials::Vector{<:FESpace},
tests::Vector{<:FESpace}
)
Constructor for a `StaggeredNonlinearFEOperator` operator, taking in each
equation as a pair of residual/jacobian forms and the corresponding trial/test spaces.
The trial/test spaces can be single or multi-field spaces.
"""
function StaggeredNonlinearFEOperator(
res::Vector{<:Function},
jac::Vector{<:Function},
Expand Down

0 comments on commit 4af05f8

Please sign in to comment.