Esempio n. 1
0
 // 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(); }
Esempio n. 2
0
 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(), {}, {}};
 }
Esempio n. 3
0
gf<block_index,std14::result_of_t<F(G)>> map(F && f, gf<block_index,G> const & g) {
  return make_block_gf(map(f, g.data()));
}
Esempio n. 4
0
 /// Build the block function made of f(b) if b are the blocks of g
 template <typename F, typename G> gf<block_index, std14::result_of_t<F(G)>> map(F &&f, gf<block_index, G> const &g) {
  return make_block_gf(get_block_names(g), _map(f, g.data()));
 }