diff --git a/src/Fields/Fields.jl b/src/Fields/Fields.jl index ae665f3..f5a5f4a 100644 --- a/src/Fields/Fields.jl +++ b/src/Fields/Fields.jl @@ -9,7 +9,17 @@ ### created: Wed Oct 6 17:37:03 2021 ### +module Fields + +using CUDA +using ..Space + vector_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, lp.ndim, lp.rsz) -scalar_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, lp.rsz) +scalar_field(::Type{T}, lp::SpaceParm) where {T} = CuArray{T, 2}(undef, lp.bsz, lp.rsz) nscalar_field(::Type{T}, n, lp::SpaceParm) where {T} = CuArray{T, 3}(undef, lp.bsz, n, lp.rsz) + +export vector_field, scalar_field, nscalar_field + +end + diff --git a/src/YM/YM.jl b/src/YM/YM.jl index ebdf41d..f257b70 100644 --- a/src/YM/YM.jl +++ b/src/YM/YM.jl @@ -15,6 +15,7 @@ module YM using CUDA, Random, StructArrays using ..Space using ..Groups +using ..Fields import Base.show @@ -85,7 +86,7 @@ end include("YMfields.jl") -export field, field_pln, randomize!, zero!, norm2 +export randomize!, zero!, norm2 include("YMact.jl") export krnl_plaq!, force0_wilson!