] add STLCutters
git clone https://github.com/gridap/STLCutters.jl.git
Gridap & GridapEmbedded API
GridapDistributed & GridapP4est compatibility
mpiexec -np 8 julia example.jl
] add GridapP4est
2:1 p4est
flags = adapt_cut_cells(parts,cutgeo)
model, = Gridap.Adaptivity.adapt(model,flags)
cutgeo = cut(model,geo)
Gridap-like coding style
Semantic Versioning: Julia registry, registered dependencies
GitHub Utilities: Issues, PRs, CI
Documentation: docstrings, documentation pages
src/: 5k code lines
├── STLCutters.jl: Main module with imports and exports
├── SubTriangulations.jl: Core of the package with main algorithms
├── STLs.jl: Load, clean and manage STL geometries
├── Polyhedra.jl: General polytope operations
├── SimplexFaces.jl: Geometrical operations on simplicies
├── Embedded.jl: Extending GridapEmbedded API
└── Distributed.jl: Extending distributed functions and algorithms
function subtriangulate(stl,bgmodel)
c_to_f = compute_cell_to_facets(bgmodel,stl)
submesh = _empty_submesh()
for cell in findall(!isempty,c_to_f)
Γ = stl[c_to_f[cell]]
P = compute_polyhedra(cell,bgmodel,Γ)
save_cell_submesh!(submesh,cell,P...)
end
propagate_inout!(submesh)
delete_small_cells(submesh)
grids = compute_grids(submesh)
labels = SubtriangulationLabels(submesh)
return grids,labels
end
function compute_polyhedra(cell,bgmodel,Γ)
K = Polyhedron(bgmodel,cell)
Γk = clip(Γ,planes(K))
Kin,Kout = refine(K,planes(Γk),reflex_planes(Γk))
return Kin,Kout,Γk
end
function save_cell_submesh!(submesh,cell,Kin,Kout,Γk)
_submesh,_face_submesh = submesh
append!(_submesh,cell,simplexify(Kin),simplexify(Kout))
append!(_face_submesh,cell,simplexify(Γk))
end
Some functions have been simplified for demonstration purposes
Extract mesh of general polytopes STLCutters.jl#37
Reduce memory allocations STLCutters.jl#38
Deal with disconnected subdomains STLCutters.jl
Distribute space-time methods STLCutters.jl
AMR with unfitted AgFEM GridapEmbedded.jl
Fix moment fitting in parallel GridapEmbedded.jl#94
Solve void subdomains GridapDistributed.jl
Test distributed solvers on unfitted FSI
Special acknowledgments:
Thanks for giving a star on GitHub
Visit the GitHub page: https://github.com/gridap/STLCutters.jl
Check the documentation: https://gridap.github.io/STLCutters.jl
Locally navigate the repository & run examples:
git clone https://github.com/gridap/STLCutters.jl.git
code STLCutters.jl
julia> include("examples/LinearElasticity.jl")
julia> filename = "test/data/550964.stl"
julia> LinearElasticity.main(filename,n=50,force=(tand(5),0,-1),output="example4")
TODO: focus on FSI and large-scale