// a simple function to get the number of blocks template <typename T> size_t n_blocks(gf<block_index, T> const &g) { return g.mesh().size(); }
template <typename M, typename T, typename S, typename E> gf<M, real_target_t<T>, S> real(gf<M, T, S, E> const &g) { return {g.mesh(), real(g.data()), g.singularity(), g.symmetry(), {}, {}}; }