Skip to content

Commit 9149b79

Browse files
committed
Add show overrides
1 parent 51f6eec commit 9149b79

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/terms/nonlocal.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,15 @@ function Base.Matrix(P::NonlocalProjectors{T}) where {T}
197197
out
198198
end
199199

200+
function Base.show(io::IO, P::NonlocalProjectors)
201+
print(io, "DFTK.NonlocalProjectors{")
202+
show(io, P.atoms)
203+
print(io, "}")
204+
end
205+
function Base.show(io::IO, ::MIME"text/plain", P::NonlocalProjectors)
206+
print(io, summary(P))
207+
end
208+
200209
# Add a level of indirection here to avoid ambiguity with the mul! method provided by Julia.
201210
LinearAlgebra.mul!(C::AbstractVector, A::Adjoint{<:Any, <:NonlocalProjectors},
202211
ψk::AbstractVector) = _mul!(C, A, ψk)

0 commit comments

Comments
 (0)