-
Notifications
You must be signed in to change notification settings - Fork 7
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
5 changed files
with
144 additions
and
87 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file is a part of JuliaFEM. | ||
# License is MIT: see https://github.com/JuliaFEM/FEMQuad.jl/blob/master/LICENSE | ||
|
||
using Documenter | ||
|
||
deploydocs( | ||
repo = "github.com/JuliaFEM/FEMQuad.jl.git", | ||
julia = "0.6", | ||
target = "build", | ||
deps = nothing, | ||
make = nothing) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is a part of JuliaFEM. | ||
# License is MIT: see https://github.com/JuliaFEM/FEMQuad.jl/blob/master/LICENSE | ||
|
||
using Documenter, FEMQuad | ||
|
||
makedocs(modules=[FEMQuad], | ||
format = :html, | ||
sitename = "FEMQuad.jl", | ||
pages = [ | ||
"Introduction" => "index.md", | ||
"API" => "api.md" | ||
]) |
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# API documentation | ||
|
||
```@meta | ||
DocTestSetup = quote | ||
using FEMQuad | ||
end | ||
``` | ||
|
||
## Index | ||
|
||
```@index | ||
``` | ||
|
||
## Functions | ||
|
||
### Gauss-Legendre rules in segments | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG2}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG3}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG5}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in triangles | ||
|
||
These rules are from literature. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI3}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI3B}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI4B}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI6}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI7}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI12}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in quadrangles | ||
|
||
These rules are get from 1d quadratures by using tensor production. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD9}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD16}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD25}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in tetrahedrons | ||
|
||
These rules are from literature. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET5}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET15}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in hexahedrons | ||
|
||
These rules are get from 1d quadratures by using tensor production. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX8}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX27}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX81}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX243}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in prismatic domain | ||
|
||
These rules for wedge are mainly tensor products of triangular domain and 1d domain | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLWED6}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLWED6B}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLWED21}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in pyramidal domains | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLPYR5}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLPYR5B}}) | ||
``` | ||
|
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,94 +1,29 @@ | ||
# FEMQuad.jl documentation | ||
|
||
```@contents | ||
Pages = ["index.md", "api.md"] | ||
``` | ||
|
||
```@meta | ||
DocTestSetup = quote | ||
using FEMQuad | ||
end | ||
``` | ||
|
||
## Functions | ||
|
||
### Gauss-Legendre rules in segments | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG2}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG3}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLSEG5}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in triangles | ||
|
||
These rules are from literature. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI3}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI3B}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI4B}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI6}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI7}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTRI12}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in quadrangles | ||
|
||
These rules are get from 1d quadratures by using tensor production. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD9}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD16}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLQUAD25}}) | ||
``` | ||
FEMQuad.jl contains various of integration schemes for cartesian and tetrahedron | ||
domains. The most common integration rules are tabulated and focus is on speed. | ||
|
||
### Gauss-Legendre rules in tetrahedrons | ||
Usage is straightforward. For example, to integrate function | ||
`f(x) = 1 + x[1] + x[2] + x[1]*x[2]` in standard rectangular domain `[-1,1]^2`, | ||
4 point Gauss-Legendre integration rule is needed: | ||
|
||
These rules are from literature. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET4}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET5}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLTET15}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in hexahedrons | ||
|
||
These rules are get from 1d quadratures by using tensor production. | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX1}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX8}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX27}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX81}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLHEX243}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in prismatic domain | ||
|
||
These rules for wedge are mainly tensor products of triangular domain and 1d domain | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLWED6}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLWED6B}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLWED21}}) | ||
``` | ||
|
||
### Gauss-Legendre rules in pyramidal domains | ||
|
||
```@docs | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLPYR5}}) | ||
FEMQuad.get_quadrature_points(::Type{Val{:GLPYR5B}}) | ||
```julia | ||
using FEMQuad | ||
f(x) = 1 + x[1] + x[2] + x[1]*x[2] | ||
I = 0.0 | ||
for (w, gp) in get_quadrature_points(Val{:GLQUAD4}) | ||
I += w*f(gp) | ||
end | ||
``` | ||
|
||
## Index | ||
Result can be verified to be 4. `w` is integration weight, `gp` is integration point | ||
location and `GLQUAD4` is integration rule used. In the same principle we have | ||
integration rules for tetrahedrons, hexahedrons and so on. For example, `GLTET15` | ||
is 15-point tetrahedron rule. | ||
|
||
```@index | ||
``` | ||
## References | ||
- Wikipedia contributors. "Gaussian quadrature." Wikipedia, The Free Encyclopedia. Wikipedia, The Free Encyclopedia, 24 Jul. 2017. Web. 29 Jul. 2017. |