Skip to content

Commit

Permalink
Merge pull request #62 from Da-Be-Ru/feature/extendablefemextension
Browse files Browse the repository at this point in the history
Re-type argument in local-to-global transformations
  • Loading branch information
j-fu authored Oct 9, 2024
2 parents ac121fc + eee8d7d commit 44e9ab3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/l2gtransformations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,46 +183,46 @@ function update_trafo!(T::L2GTransformer{<:Real,<:Integer,<:Parallelepiped3D,Car
return nothing
end

function eval_trafo!(x::Vector, T::L2GTransformer{<:Real,<:Integer,<:Vertex0D,Cartesian1D}, xref)
function eval_trafo!(x::AbstractArray, T::L2GTransformer{<:Real,<:Integer,<:Vertex0D,Cartesian1D}, xref)
x[1] = T.b[1]
return nothing
end

function eval_trafo!(x::Vector, T::L2GTransformer{<:Real,<:Integer,<:Union{Triangle2D, Parallelogram2D},Cartesian2D}, xref)
function eval_trafo!(x::AbstractArray, T::L2GTransformer{<:Real,<:Integer,<:Union{Triangle2D, Parallelogram2D},Cartesian2D}, xref)
x[1] = T.A[1,1]*xref[1] + T.A[1,2]*xref[2] + T.b[1]
x[2] = T.A[2,1]*xref[1] + T.A[2,2]*xref[2] + T.b[2]
return nothing
end


function eval_trafo!(x::Vector, T::L2GTransformer{<:Real,<:Integer,<:Union{Triangle2D, Parallelogram2D},Cartesian3D}, xref)
function eval_trafo!(x::AbstractArray, T::L2GTransformer{<:Real,<:Integer,<:Union{Triangle2D, Parallelogram2D},Cartesian3D}, xref)
x[1] = T.A[1,1]*xref[1] + T.A[1,2]*xref[2] + T.b[1]
x[2] = T.A[2,1]*xref[1] + T.A[2,2]*xref[2] + T.b[2]
x[3] = T.A[3,1]*xref[1] + T.A[3,2]*xref[2] + T.b[3]
return nothing
end


function eval_trafo!(x::Vector, T::L2GTransformer{<:Real,<:Integer,<:Union{Tetrahedron3D, Parallelepiped3D},Cartesian3D}, xref)
function eval_trafo!(x::AbstractArray, T::L2GTransformer{<:Real,<:Integer,<:Union{Tetrahedron3D, Parallelepiped3D},Cartesian3D}, xref)
x[1] = T.A[1,1]*xref[1] + T.A[1,2]*xref[2] + T.A[1,3]*xref[3] + T.b[1]
x[2] = T.A[2,1]*xref[1] + T.A[2,2]*xref[2] + T.A[2,3]*xref[3] + T.b[2]
x[3] = T.A[3,1]*xref[1] + T.A[3,2]*xref[2] + T.A[3,3]*xref[3] + T.b[3]
return nothing
end


function eval_trafo!(x::Vector, T::L2GTransformer{<:Real,<:Integer,<:Edge1D,Cartesian1D}, xref)
function eval_trafo!(x::AbstractArray, T::L2GTransformer{<:Real,<:Integer,<:Edge1D,Cartesian1D}, xref)
x[1] = T.A[1,1]*xref[1] + T.b[1]
return nothing
end

function eval_trafo!(x::Vector, T::L2GTransformer{<:Real,<:Integer,<:Edge1D,Cartesian2D}, xref)
function eval_trafo!(x::AbstractArray, T::L2GTransformer{<:Real,<:Integer,<:Edge1D,Cartesian2D}, xref)
x[1] = T.A[1,1]*xref[1] + T.b[1]
x[2] = T.A[2,1]*xref[1] + T.b[2]
return nothing
end

function eval_trafo!(x::Vector, T::L2GTransformer{<:Real,<:Integer,<:Edge1D,Cartesian3D}, xref)
function eval_trafo!(x::AbstractArray, T::L2GTransformer{<:Real,<:Integer,<:Edge1D,Cartesian3D}, xref)
x[1] = T.A[1,1]*xref[1] + T.b[1]
x[2] = T.A[2,1]*xref[1] + T.b[2]
x[3] = T.A[3,1]*xref[1] + T.b[3]
Expand Down

0 comments on commit 44e9ab3

Please sign in to comment.