mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-10-03 06:41:30 +00:00
feat: Integrate FEMBasis into JuliaFEM module (partial)
- Add Tensors and Calculus to Project.toml dependencies - Add basis includes to src/JuliaFEM.jl (Phase 1 integration) - Fix FEMBasis. namespace references → use JuliaFEM namespace - Update create_basis.jl: AbstractBasis (not FEMBasis.AbstractBasis) Status: Basis files load, but conflict with FEMBase expectations Next: Need to consolidate FEMBase or work around AbstractElement type constraints This is expected during consolidation - we're bridging two systems.
This commit is contained in:
@@ -12,7 +12,7 @@ import Calculus
|
||||
export Vec
|
||||
|
||||
# Type alias for coordinate inputs (tuples or Vec)
|
||||
const Vecish{N, T} = Union{NTuple{N, T}, Vec{N, T}}
|
||||
const Vecish{N,T} = Union{NTuple{N,T},Vec{N,T}}
|
||||
|
||||
"""
|
||||
AbstractBasis{dim}
|
||||
|
||||
@@ -78,7 +78,7 @@ function create_basis(name, description, X::Vector{<:Vecish{D, T}}, basis, dbasi
|
||||
end
|
||||
|
||||
code = quote
|
||||
struct $name <: FEMBasis.AbstractBasis{$D}
|
||||
struct $name <: AbstractBasis{$D}
|
||||
end
|
||||
|
||||
Base.@pure function Base.size(::Type{$name})
|
||||
@@ -94,18 +94,18 @@ function create_basis(name, description, X::Vector{<:Vecish{D, T}}, basis, dbasi
|
||||
return $N
|
||||
end
|
||||
|
||||
function FEMBasis.get_reference_element_coordinates(::Type{$name})
|
||||
function get_reference_element_coordinates(::Type{$name})
|
||||
return $X
|
||||
end
|
||||
|
||||
@inline function FEMBasis.eval_basis!(::Type{$name}, N::Vector{<:Number}, xi::Vec)
|
||||
@inline function eval_basis!(::Type{$name}, N::Vector{<:Number}, xi::Vec)
|
||||
@assert length(N) == $N
|
||||
$unpack
|
||||
@inbounds $Q
|
||||
return N
|
||||
end
|
||||
|
||||
@inline function FEMBasis.eval_dbasis!(::Type{$name}, dN::Vector{<:Vec{$D}}, xi::Vec)
|
||||
@inline function eval_dbasis!(::Type{$name}, dN::Vector{<:Vec{$D}}, xi::Vec)
|
||||
@assert length(dN) == $N
|
||||
$unpack
|
||||
@inbounds $V
|
||||
|
||||
Reference in New Issue
Block a user