Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
style = "sciml"
align_assignment = true
margin = 100
remove_extra_newlines = false
whitespace_in_kwargs = true
whitespace_typedefs = true
ignore = ["bak/*", "benchmarks/*", "data/*", "docs/*"]
2 changes: 1 addition & 1 deletion .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
42 changes: 42 additions & 0 deletions .github/workflows/codechecks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Code checks

on:
pull_request:
push:
branches: ["main"]

jobs:

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

format:
runs-on: ubuntu-latest
name: "JuliaFormatter.jl"
steps:
- uses: julia-actions/setup-julia@latest
with:
version: '1.12'

- uses: actions/checkout@v6
- name: Install JuliaFormatter and format
# This will use the latest version by default but you can set the version like so:
#
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter")); Pkg.Apps.add(PackageSpec(name="JuliaFormatter"))'
$HOME/.julia/bin/jlfmt --inplace -v .
- name: Format check
run: |
julia -e '
out = Cmd(`git diff`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
Ferrite = "c061ca5d-56c9-439f-9c0e-210fe06d3992"
FerriteGmsh = "4f95f4f8-b27c-4ae5-9a39-ea55e634e36b"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -29,6 +28,7 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
Tensors = "48a634ad-e948-5137-8d70-aa71f2a747f4"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
Expand Down Expand Up @@ -62,6 +62,7 @@ OrdinaryDiffEqOperatorSplitting = "0.2.3"
OrdinaryDiffEqTsit5 = "1"
Preferences = "1"
SciMLBase = "2"
SymbolicIndexingInterface = "0.3.46"
UnPack = "1"
julia = "1.10"

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A modular shared-memory high-performance framework for multiscale cardiac multip
> This package is under heavy development. Expect regular breaking changes
> for now. If you are interested in joining development, then either comment
> an issue you are interested or directly reach out to me via julialang.zulipchat.com, mail or
> julialang.slack.com. Alternatively open a [GitHub discussion](https://github.com/JuliaHealth/Thunderbolt.jl/discussions) if you have something
> julialang.slack.com. Alternatively open a [GitHub discussion](https://github.com/JuliaHealth/Thunderbolt.jl/discussions) if you have something
> specific in mind.

## Questions
Expand Down Expand Up @@ -46,7 +46,7 @@ You are now all set to start using Thunderbolt!
## Accessing the Documentation Offline

To build the docs you first need to install Julia, see <https://julialang.org/> for details.
Then you need to install the packages. To accomplish this you first start a julia shell in the
Then you need to install the packages. To accomplish this you first start a julia shell in the
docs fonder and open the Pkg REPL; i.e. press `]` at the `julia>` promp to
enter `pkg>` mode. Then you [activate and instantiate](https://pkgdocs.julialang.org/v1/environments/#Using-someone-else's-project) via
```
Expand Down
2 changes: 1 addition & 1 deletion bak/examples-gpu/spiral-wave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ spiral_wave_initializer!(u₀, odeform)
u₀gpu = CuVector(u₀)
problem = OS.OperatorSplittingProblem(odeform, u₀gpu, tspan)

#
#
function BJPprec(A,p)
P = BlockJacobiPreconditioner(A, 1000, CUDABackend())
KrylovPreconditioners.update!(P, A)
Expand Down
8 changes: 4 additions & 4 deletions bak/examples/isolated-lumped-circuit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pt0sat = 100.0
qt0sat = 0.0
## Systemic Arteriole #### Checked
Rsar = 0.5
## Systemic Capillary #### Checked
## Systemic Capillary #### Checked
Rscp = 0.52
## Systemic Vein #### Checked
Csvn = 20.5
Expand Down Expand Up @@ -97,7 +97,7 @@ Kf_sav = 0.0004
Ke_sav = 9000.0
M_sav = 0.0004
A_sav = 0.00047
# right heart #
# right heart #
Kst_ra = 2.5
Kst_rv = 20.0
Kf_pav = 0.0004
Expand All @@ -109,7 +109,7 @@ A_pav = 0.00047
Kp_av = 5500.0 # * 57.29578 # Shi Paper has values in radians!
Kf_av = 50.0
Kf_mv = 50.0
Kp_mv = 5500.0 # * 57.29578
Kp_mv = 5500.0 # * 57.29578
Kf_tv = 50.0
Kp_tv = 5500.0 # * 57.29578
Kf_pv = 50.0
Expand All @@ -131,7 +131,7 @@ Kv_pv = 3.5
θmin_pv = 5.0 * pi / 180
θmin_tv = 5.0 * pi / 180

## pressure force and frictional force is the same for all 4 valves
## pressure force and frictional force is the same for all 4 valves

# Initial conditions #### Checked against cellML model

Expand Down
4 changes: 2 additions & 2 deletions bak/examples/leads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ ms = OrthotropicMicrostructureModel(
)

κ = SpectralTensorCoefficient(
ms,
ms,
ConstantCoefficient(SVector(0.3, 0.12, 0.12) + SVector(0.3, 0.03, 0.03)))
κᵢ = SpectralTensorCoefficient(
ms,
ms,
ConstantCoefficient(SVector(0.3, 0.12, 0.12)))


Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchmarks-cuda-linear-form.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using BenchmarkTools, Thunderbolt, StaticArrays,Ferrite , CUDA

# The Following is needed to enforce grid to use Float32.
left = Vec((-1.f0, -1.f0,-1.f0))
right = Vec((1.f0, 1.f0, 1.f0))
left = Vec((-1.f0, -1.f0,-1.f0))
right = Vec((1.f0, 1.f0, 1.f0))

grid = generate_grid(Hexahedron , (500,100,100),left,right)

Expand Down
Loading
Loading