Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
65 changes: 65 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI
on:
push:
branches: [main]
tags: ['*']
pull_request:
schedule:
- cron: '17 3 * * 1' # weekly, to catch changes of the dependencies
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
tutorials:
name: ${{ matrix.group }} - Julia ${{ matrix.version }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version: ['1']
group: [basics, coupled, contact, fluids, solvers, dynamics]
include:
# the minimum supported Julia version, on the most common group
- version: '1.12'
group: basics
env:
HYPERFEM_TUTORIALS_GROUP: ${{ matrix.group }}
HYPERFEM_TUTORIALS_PETSC: '0'
JULIA_NUM_THREADS: '4'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
coverage: false
check_bounds: auto
petsc:
# The PETSc parts of the solver tutorials; not blocking until the PETSc binaries have proved stable on CI.
name: solvers with PETSc - Julia 1
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
env:
HYPERFEM_TUTORIALS_GROUP: solvers
HYPERFEM_TUTORIALS_PETSC: '1'
JULIA_NUM_THREADS: '1' # with 4 threads the process crashed (signal 11) at the start of the PETSc part on Linux
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: E13 with its output visible (diagnosis of PETSc on Linux)
run: HYPERFEM_TUTORIALS_FAST=1 julia --project=. src/E13_Solvers.jl
continue-on-error: true
- uses: julia-actions/julia-runtest@v1
with:
coverage: false
check_bounds: auto
28 changes: 28 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Documentation
on:
push:
branches: [main]
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write # deploydocs pushes to gh-pages with GITHUB_TOKEN
statuses: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- name: Install dependencies
run: julia --project=docs -e 'using Pkg; Pkg.instantiate()'
- name: Build and deploy
run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 17 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
# Files generated by invoking Julia with --code-coverage
*.jl.cov
*.jl.*.cov

# Files generated by invoking Julia with --track-allocation
*.jl.mem
# Environments (not versioned: [compat] in Project.toml fixes the versions)
Manifest.toml

# System-specific files and directories generated by the BinaryProvider and BinDeps packages
# They contain absolute paths specific to the host computer, and so should not be committed
deps/deps.jl
deps/build.log
deps/downloads/
deps/usr/
deps/src/
# Results of the tutorials
data/sims/

# Build artifacts for creating documentation generated by the Documenter package
# Documentation build and generated pages/notebooks
docs/build/
docs/site/
docs/src/tutorials/
docs/src/notebooks/
notebooks/

# File generated by Pkg, the package manager, based on a corresponding Project.toml
# It records a fixed state of all packages used by the project. As such, it should not be
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml
# Julia coverage and allocation files
*.jl.cov
*.jl.*.cov
*.jl.mem

# Output written outside data/sims by mistake
*.vtu
*.pvd

# System and editors
.DS_Store
Manifest.toml
results/
debug/
data/sims/
**/.DS_Store
.vscode/

src/_E7_Topology_hyperelastic_underconstruction.jl
37 changes: 37 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
cff-version: 1.2.0
message: "If you use HyperFEM or these tutorials, please cite the article below and Gridap."
title: "HyperFEMTutorials.jl: tutorials of HyperFEM.jl"
authors:
- name: MultiSimOLab
repository-code: "https://github.com/MultiSimOLab/HyperFEMTutorials.jl"
license: MIT
preferred-citation:
type: article
title: "Topology and material optimization in ultra-soft magnetoactive structures: making advantage of residual anisotropies"
authors:
- family-names: Perez-Garcia
given-names: C.
- family-names: Ortigosa
given-names: R.
- family-names: Martínez-Frutos
given-names: J.
- family-names: Garcia-Gonzalez
given-names: D.
journal: "Advanced Materials"
year: 2025
start: "e18489"
doi: "10.1002/adma.202518489"
references:
- type: article
title: "Gridap: An extensible Finite Element toolbox in Julia"
authors:
- family-names: Badia
given-names: Santiago
- family-names: Verdugo
given-names: Francesc
journal: "Journal of Open Source Software"
year: 2020
volume: 5
issue: 52
start: 2520
doi: "10.21105/joss.02520"
41 changes: 30 additions & 11 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
name = "HyperFEMTutorials"
uuid = "2efabaa9-62a4-417d-a931-2cdc93c32800"
version = "0.1.0"
authors = ["MultiSimOLab"]

[deps]
DrWatson = "634d3b9d-ee7a-5ddf-bec9-22491ea816e1"
Gmsh = "705231aa-382f-11e9-3f0c-b7cb4346fdeb"
AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c"
Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
GridapGmsh = "3025c34a-b394-11e9-2a55-3fee550c04c8"
GridapSolvers = "6d3209ee-5e3c-4db7-a716-942eb12ed534"
GridapPETSc = "bcdc36c2-0c3e-11ea-095a-c9dadae499f1"
HyperFEM = "ddbf423a-3df4-409e-9685-3dc416cae46c"
HyperShape = "1a07404e-cd44-4b01-9b9c-59424ef2e75e"
LazyArrays = "5078a376-72f3-5289-bfd5-ec5146d43c02"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"

[sources]
HyperFEM = {rev = "main", url = "https://github.com/MultiSimOLab/HyperFEM"}
HyperShape = {rev = "main", url = "https://github.com/MultiSimOLab/HyperShape"}
HyperFEMKernels = "c52e38e0-a033-47df-8a03-a6c4ac881830"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PETSc_jll = "8fa3689e-f0b9-5420-9873-adf6ccf46f2d"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[compat]
AlgebraicMultigrid = "2"
Gridap = "=0.20.8"
GridapGmsh = "0.7"
GridapPETSc = "0.5"
HyperFEM = "0.3"
HyperFEMKernels = "0.2.6"
PETSc_jll = "=3.22.1"
LinearAlgebra = "1"
Printf = "1"
Test = "1"
julia = "1.12"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
Loading
Loading