-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from KristofferC/kc/tetras
add function space and gauss rule for tetraheder
- Loading branch information
Showing
6 changed files
with
144 additions
and
60 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
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,30 @@ | ||
# Patrick Keast, MODERATE-DEGREE TETRAHEDRAL QUADRATURE FORMULAS | ||
function _get_gauss_tetdata(n::Int) | ||
if n == 1 | ||
a = 1. / 4. | ||
w = 1. / 6. | ||
xw = [a a a w] | ||
elseif n == 2 | ||
a = ( 5. + 3. * √(5.) ) / 20. | ||
b = ( 5. - √(5.) ) / 20. | ||
w = 1. / 24. | ||
xw = [a b b w | ||
b a b w | ||
b b a w | ||
b b b w] | ||
elseif n == 3 | ||
a1 = 1. / 4. | ||
a2 = 1. / 2. | ||
b2 = 1. / 6. | ||
w1 = -2. / 15. | ||
w2 = 3. / 40. | ||
xw = [a1 a1 a1 w1 | ||
a2 b2 b2 w2 | ||
b2 a2 b2 w2 | ||
b2 b2 a2 w2 | ||
b2 b2 b2 w2] | ||
else | ||
throw(ArgumentError("Unsupported tetraheder gauss integration")) | ||
end | ||
return xw | ||
end |
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
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