Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor DiagramID #44

Closed
kunyuan opened this issue Aug 17, 2022 · 1 comment
Closed

refactor DiagramID #44

kunyuan opened this issue Aug 17, 2022 · 1 comment
Assignees
Labels
refactor refactor the code

Comments

@kunyuan
Copy link
Member

kunyuan commented Aug 17, 2022

The current implementation of DiagramID duplicates with DIagPara.type.

DiagramID should have larger scope than DiagPara.type. To be more specific,

DiagPara.type --> Ver4, Ver3, Green, Interaction, Sigma, ...
DiagramID --> N-body Vertex/Green/connected-Green in momentum-time representation, spacetime-representation, ...

So it is probably better to call it Representation. An example is the following,

#generic Veretx function in KX representation
struct VerKX
    para::DiagPara #DiagPara don't need weightType
    spin::Vector{Int} #[Up, Up], [Up, Down], ...
    channel::Channel # particle-hole, particle-hole exchange, particle-particle, irreducible, and their counterterms
    extK::Vector{Vector{Float64}}
    extT::Vector{Int}
    order::Vector{Int}   #[2, 0, 1] means loop-order 2, and one derivative of the second type.
end

it should come with some help functions (for example, a function to check if the vertex is instant or not).

The Diagram struct should be defined as,

struct Diagram{W, ID<:DiagramId}
      hash::Int
      name::Symbol
      id::ID
      operator::Operator
      factor::W
      subdiagram::Vector{Diagram{W, ID}}

      weight::W

Need some help functions (for example, isbare(diag) = (length(diag.subdiagram)==0))

@kunyuan kunyuan added the refactor refactor the code label Aug 17, 2022
@kunyuan kunyuan self-assigned this Aug 17, 2022
@kunyuan
Copy link
Member Author

kunyuan commented Oct 31, 2024

Not relevant anymore

@kunyuan kunyuan closed this as completed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor refactor the code
Projects
None yet
Development

No branches or pull requests

1 participant