mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-20 01:59:59 +00:00
fix(elements): Update Poi1 to non-parametric AbstractBasis
Changes to src/elements/elements_lagrange.jl:
- Changed Poi1 from AbstractBasis{0} to AbstractBasis (non-parametric)
- Added nnodes(::Type{Poi1}) = 1 method
- Added nnodes(::Poi1) = 1 instance method
- Added comment explaining Poi1 as 0D point element
- Resolves type parameter mismatch with new AbstractBasis definition
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/FEMBase.jl/blob/master/LICENSE
|
||||
|
||||
struct Poi1 <: AbstractBasis{0} end
|
||||
# Poi1: 0D point element (single node, no parametric coordinates)
|
||||
struct Poi1 <: AbstractBasis end
|
||||
|
||||
# nnodes for Poi1
|
||||
nnodes(::Type{Poi1}) = 1
|
||||
nnodes(::Poi1) = 1
|
||||
|
||||
function get_basis(::E, ::Any, ::Any) where E<:AbstractElement{M,Poi1} where M
|
||||
return [1]
|
||||
|
||||
Reference in New Issue
Block a user