Skip to content

Commit

Permalink
fixed some things in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chmerdon committed Aug 29, 2024
1 parent e854284 commit 945f0d4
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 19 deletions.
10 changes: 5 additions & 5 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ function make_all(; with_examples::Bool = true)
modules=[ExtendableFEMBase],
sitename="ExtendableFEMBase.jl",
authors="Christian Merdon",
repo = "github.com/chmerdon/ExtendableFEMBase.jl",
clean = false,
format = Documenter.HTML(size_threshold = 250000),
repo = "https://github.com/chmerdon/ExtendableFEMBase.jl",
clean = true,
format = Documenter.HTML(size_threshold = 250000, mathengine = MathJax3()),
checkdocs = :all,
warnonly = true,
warnonly = false,
doctest = true,
pages = [
"Home" => "index.md",
Expand Down Expand Up @@ -76,7 +76,7 @@ function make_all(; with_examples::Bool = true)

end

make_all(; with_examples = true)
make_all(; with_examples = false)

deploydocs(
repo = "github.com/chmerdon/ExtendableFEMBase.jl",
Expand Down
14 changes: 8 additions & 6 deletions docs/src/functionoperators.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ used to dispatch different evaluations of finite element basis functions.
can be build from the ones available (e.g. the deviator).


```@autodocs
Modules = [ExtendableFEMBase]
Pages = ["functionoperators.jl"]
Order = [:type, :function]
```


## ReconstructionOperators

There are special operators that allow to evaluate a primitive operator of some discrete
Expand All @@ -59,9 +66,4 @@ as well as for the P2-bubble (H1P2B) finite element type in two dimensions.

## Operator Pairs (experimental)

Two function operators can be put into an OperatorPair so that one can provide effectively two operators in each argument of an assembly pattern. However, the user should make sure that both operators can be evaluated together reasonably (meaning both should be well-defined on the element geometries and the finite element space where the argument will be evaluated, and the action of the operator has to operate with coressponding input and result fields). This feature is still experimental and might have issues in some cases. OperatorTriple for a combination of three operators is also available.

```@docs
OperatorPair
OperatorTriple
```
Two function operators can be put into an OperatorPair so that one can provide effectively two operators in each argument of an assembly pattern. However, the user should make sure that both operators can be evaluated together reasonably (meaning both should be well-defined on the element geometries and the finite element space where the argument will be evaluated, and the action of the operator has to operate with coressponding input and result fields). This feature is still experimental and might have issues in some cases. OperatorTriple for a combination of three operators is also available.
13 changes: 12 additions & 1 deletion docs/src/interpolations.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Usually, Plotters need nodal values, so there is a gengeric function that evalua
nodevalues!
nodevalues
nodevalues_view
nodevalues_subset!
```

## Lazy Interpolation
Expand All @@ -48,4 +49,14 @@ works in all cases (but is not very efficient as it involves a PointeEvaluator a

```@docs
lazy_interpolate!
```
```


## Displace Mesh

Nodal values (e.g. of a FEVector that discretizes a displacement) can be used to displace the mesh.

```@docs
displace_mesh!
displace_mesh
```
9 changes: 9 additions & 0 deletions docs/src/quadrature.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ Quadrature rules consist of points (coordinates of evaluation points with respec
Modules = [ExtendableFEMBase]
Pages = ["quadrature.jl"]
Order = [:type, :function]
```


#### Accumulating Vector (not relevant for users, but for completeness)

Internally a global integration uses an accumulating vector and calls the cell-wise integration.

```@docs
AccumulatingVector
```
10 changes: 5 additions & 5 deletions src/accumvector.jl
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
###########################
### ACCUMULATING VECTOR ###
###########################
#
# used to store coefficients for FESpaces and can have several blocks of different FESpaces
# acts like an AbstractArray{T,1}

"""
$(TYPEDEF)
block of an FEVector that carries coefficients for an associated FESpace and can be assigned as an AbstractArray (getindex, setindex, size, length)
vector that is acting as an AbstractArray{T, 2} and
automatically accumulates all values from the second dimension
AV[k,j] += s for any j results in AV.entries[k] += s
"""
struct AccumulatingVector{T} <: AbstractArray{T, 2}
entries::Array{T, 1}
size2::Int
end

# AV[k,j] += s for any j results in entries[k] += s
#

# overload stuff for AbstractArray{T,2} behaviour
Base.getindex(AV::AccumulatingVector, i::Int, j) = AV.entries[i]
Expand Down
5 changes: 5 additions & 0 deletions src/finiteelements.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
#######################################################################################################
#######################################################################################################

"""
$(TYPEDEF)
root type for finite element types
"""
abstract type AbstractFiniteElement end


Expand Down
11 changes: 9 additions & 2 deletions src/interpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ function nodevalues_subset!(
Evaluates the finite element function with the coefficient vector source (interpreted as a coefficient vector for the FESpace FE)
and the specified FunctionOperator at the specified list of nodes of the grid and writes the values in that order into target.
Node values for nodes that are not part of the specified regions (default = all regions) are set to zero.
Discontinuous (continuous = false) quantities are evaluated in all neighbouring cells of each node and then averaged. Continuous
(continuous = true) quantities are only evaluated once at each node.
Discontinuous (continuous = false) quantities are evaluated in all neighbouring cells (in the specified regions)
of each node and then averaged. Continuous (continuous = true) quantities are only evaluated once at each node.
"""
function nodevalues_subset!(target::AbstractArray{T, 2},
source::AbstractArray{T, 1},
Expand Down Expand Up @@ -1057,6 +1057,13 @@ function displace_mesh!(xgrid::ExtendableGrid, source::FEVectorBlock; magnify =
end


"""
````
function displace_mesh(xgrid::ExtendableGrid, source::FEVectorBlock; magnify = 1)
````
Returns a new grid by adding the displacement field in source (expects a vector-valued finite element)
to the coordinates of the provided xgrid times a magnify value.
"""
function displace_mesh(xgrid::ExtendableGrid, source::FEVectorBlock; kwargs...)
xgrid_displaced = deepcopy(xgrid)
displace_mesh!(xgrid_displaced, source; kwargs...)
Expand Down

2 comments on commit 945f0d4

@chmerdon
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/114153

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.1 -m "<description of version>" 945f0d404713980fc84e372c6a0de95cb4605714
git push origin v0.6.1

Please sign in to comment.