TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
make_gf.hpp
Go to the documentation of this file.
1// Copyright (c) 2017 Commissariat à l'énergie atomique et aux énergies alternatives (CEA)
2// Copyright (c) 2017 Centre national de la recherche scientifique (CNRS)
3// Copyright (c) 2019-2020 Simons Foundation
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You may obtain a copy of the License at
16// https://www.gnu.org/licenses/gpl-3.0.txt
17//
18// Authors: Michel Ferrero, Olivier Parcollet, Nils Wentzell
19
24
25#pragma once
26
27#include "./gf/gf.hpp"
28
29#include <type_traits>
30#include <utility>
31
32namespace triqs::gfs {
33
38
50 template <typename Mesh, typename T> gf<Mesh, typename T::target_t> make_gf(Mesh m, T const &t) { return {std::move(m), t.shape()}; }
51
61 template <typename G> typename std::decay_t<G>::regular_type make_gf(G &&g) { return typename std::decay_t<G>::regular_type{std::forward<G>(g)}; }
62
64
65} // namespace triqs::gfs
The owning Green's function container.
Definition gf.hpp:194
Provides the Green's function class.
gf< Mesh, typename T::target_t > make_gf(Mesh m, T const &t)
Construct a Green's function from a mesh and a target.
Definition make_gf.hpp:50