diff --git a/GaugeFix/gaugefix_measure.c b/GaugeFix/gaugefix_measure.c index 2f84d05ca..6e14050a3 100644 --- a/GaugeFix/gaugefix_measure.c +++ b/GaugeFix/gaugefix_measure.c @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) { double p1 = calc_plaq(u_gauge); lprintf("TEST", 0, "u_gauge plaq %1.6f\n", p1); - suNg_field_copy(fixed_gauge, u_gauge); + copy_suNg_field(fixed_gauge, u_gauge); double p2 = calc_plaq(fixed_gauge); lprintf("TEST", 0, "fixed_gauge plaq %1.6f\n", p2); @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) { p2 = calc_plaq(fixed_gauge); lprintf("TEST", 0, "fixed_gauge plaq %1.6f\n", p2); - suNg_field_copy(u_gauge, fixed_gauge); //u_gauge = fixed_gauge + copy_suNg_field(u_gauge, fixed_gauge); //u_gauge = fixed_gauge represent_gauge_field(); //u_gauge_f = represented fixed_gauge if (list == NULL) { break; } diff --git a/Include/Inverters/scalarfield_operations.h b/Include/Inverters/scalarfield_operations.h index 13e4bd80c..a66ec1f41 100644 --- a/Include/Inverters/scalarfield_operations.h +++ b/Include/Inverters/scalarfield_operations.h @@ -12,7 +12,6 @@ extern "C" { #endif -void scalar_field_copy(scalar_field *s1, scalar_field *s2); void flip_scalar_field(scalar_field *s); void set_scalar_field(scalar_field *s, double c); void gaussian_scalar_field(scalar_field *s); diff --git a/Include/Update/copy_gfield.h b/Include/Update/copy_gfield.h deleted file mode 100644 index 6471d8b68..000000000 --- a/Include/Update/copy_gfield.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef COPY_GFIELD_H -#define COPY_GFIELD_H - -#include "spinor_field.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void suNg_field_copy(suNg_field *g1, suNg_field *g2); -void suNf_field_copy(suNf_field *g1, suNf_field *g2); -void suNg_scalar_field_copy(suNg_scalar_field *g1, suNg_scalar_field *g2); - -#ifdef __cplusplus -} -#endif -#endif //COPY_GFIELD_H diff --git a/Include/update.h b/Include/update.h index ffce1075f..14ff1b582 100644 --- a/Include/update.h +++ b/Include/update.h @@ -9,7 +9,6 @@ #include "Update/avr_plaquette.h" #include "Update/cabmar.h" #include "Update/clover_tools.h" -#include "Update/copy_gfield.h" #include "Update/dirac.h" #include "Update/field_update.h" #include "Update/find_spec_limits.h" diff --git a/LibHR/Inverters/scalarfield_operations.c b/LibHR/Inverters/scalarfield_operations.c index 6ab0efc49..ffbb7ebd8 100644 --- a/LibHR/Inverters/scalarfield_operations.c +++ b/LibHR/Inverters/scalarfield_operations.c @@ -7,16 +7,6 @@ #include "libhr_core.h" #include "random.h" -void scalar_field_copy(scalar_field *s1, scalar_field *s2) { - error(s1 == NULL, 1, "scalar_field_copy [scalarfield_operations.c]", "Attempt to access unallocated memory space"); - error(s2 == NULL, 1, "scalar_field_copy [scalarfield_operations.c]", "Attempt to access unallocated memory space"); - - _MASTER_FOR(&glattice, ix) { - double c = *_FIELD_AT(s2, ix); - *_FIELD_AT(s1, ix) = c; - } -} - //s=-s void flip_scalar_field(scalar_field *s) { error(s == NULL, 1, "flip_scalar_field [scalarfield_operations.c]", "Attempt to access unallocated memory space"); diff --git a/LibHR/Observables/loop_tools.c b/LibHR/Observables/loop_tools.c index 7a095cbcb..dff5bf684 100644 --- a/LibHR/Observables/loop_tools.c +++ b/LibHR/Observables/loop_tools.c @@ -14,7 +14,6 @@ #include "io.h" #include "utils.h" #include "memory.h" -#include "Update/copy_gfield.h" #include "Update/representation.h" #include "Update/avr_plaquette.h" #include "inverters.h" @@ -300,7 +299,7 @@ void measure_loops(double *m, int nhits, int conf_num, double precision, int sou } if (source_type == 1) { u_gauge_old = alloc_suNg_field(&glattice); - suNg_field_copy(u_gauge_old, u_gauge); + copy_suNg_field(u_gauge_old, u_gauge); zero_spinor_field(prop); //Fix the Gauge double act = gaugefix(0, //= 0, 1, 2, 3 for Coulomb guage else Landau @@ -394,7 +393,7 @@ void measure_loops(double *m, int nhits, int conf_num, double precision, int sou } /* volume source + spin + color + eo dilution */ } if (u_gauge_old != NULL) { - suNg_field_copy(u_gauge, u_gauge_old); + copy_suNg_field(u_gauge, u_gauge_old); represent_gauge_field(); free_suNg_field(u_gauge_old); } diff --git a/LibHR/Observables/meson_measurements.c b/LibHR/Observables/meson_measurements.c index 49260914f..d0982a393 100644 --- a/LibHR/Observables/meson_measurements.c +++ b/LibHR/Observables/meson_measurements.c @@ -212,7 +212,7 @@ void measure_spectrum_pt_fixedbc(int tau, int dt, int nm, double *m, int n_mom, zero_spinor_field(prop + i); } char label[100]; - suNf_field_copy(u_gauge_old, u_gauge_f); + copy_suNf_field(u_gauge_old, u_gauge_f); init_propagator_eo(nm, m, precision); fix_T_bc(tau - dt); // Apply fixed boundaryconditions by zeroing links at time slice tau to direction 0. lprintf("MAIN", 0, "Point Source at (%d,0,0,0) \n", tau); @@ -227,7 +227,7 @@ void measure_spectrum_pt_fixedbc(int tau, int dt, int nm, double *m, int n_mom, } sprintf(label, "DIRICHLET_POINT dt=%d", dt); print_mesons(meson_correlators, 1., conf_num, nm, m, GLB_T, n_mom, label); - suNf_field_copy(u_gauge_f, u_gauge_old); + copy_suNf_field(u_gauge_f, u_gauge_old); free_spinor_field(source); free_spinor_field(prop); free_suNf_field(u_gauge_old); @@ -253,7 +253,7 @@ void measure_diquark_semwall_background(int nm, double *m, int nhits, int conf_n int tau, k; suNg_field *u_gauge_old = alloc_suNg_field(&glattice); - suNg_field_copy(u_gauge_old, u_gauge); + copy_suNg_field(u_gauge_old, u_gauge); error(nm != 1, 1, "measure_diquark_semwall_background", "nm cannot be different from 1 !\n"); @@ -266,7 +266,7 @@ void measure_diquark_semwall_background(int nm, double *m, int nhits, int conf_n represent_gauge_field(); calc_propagator_eo(prop_u, source, 4); // 4 for spin dilution // apply background and calculate second prop - suNg_field_copy(u_gauge, u_gauge_old); + copy_suNg_field(u_gauge, u_gauge_old); apply_background_field_zdir(u_gauge, -Q, n); represent_gauge_field(); @@ -274,7 +274,7 @@ void measure_diquark_semwall_background(int nm, double *m, int nhits, int conf_n measure_diquarks(meson_correlators, prop_u, prop_d, source, nm, tau); - suNg_field_copy(u_gauge, u_gauge_old); + copy_suNg_field(u_gauge, u_gauge_old); represent_gauge_field(); } print_mesons(meson_correlators, nhits * GLB_VOL3 / 2., conf_num, nm, m, GLB_T, 1, "DEFAULT_DIQUARK_SEMWALL_BACKGROUND"); @@ -396,14 +396,14 @@ void measure_spectrum_semwall_fixedbc(int dt, int nm, double *m, int nhits, int } char label[100]; - suNf_field_copy(u_gauge_old, u_gauge_f); + copy_suNf_field(u_gauge_old, u_gauge_f); init_propagator_eo(nm, m, precision); for (k = 0; k < nhits; ++k) { tau = create_diluted_source_equal_eo(source); fix_T_bc(tau - dt); calc_propagator_eo(prop, source, 4); // 4 for spin dilution measure_mesons(meson_correlators, prop, source, nm, tau); - suNf_field_copy(u_gauge_f, u_gauge_old); + copy_suNf_field(u_gauge_f, u_gauge_old); } sprintf(label, "DIRICHLET_SEMWALL dt=%d", dt); print_mesons(meson_correlators, nhits * GLB_VOL3 / 2., conf_num, nm, m, GLB_T, 1, label); @@ -426,7 +426,7 @@ void measure_spectrum_gfwall(int nm, double *m, int conf_num, double precision, } int tau, k; tau = 0; - suNg_field_copy(u_gauge_old, u_gauge); + copy_suNg_field(u_gauge_old, u_gauge); // Fix the Gauge double act = gaugefix(0, //= 0, 1, 2, 3 for Coulomb guage else Landau 1.8, // overrelax @@ -448,7 +448,7 @@ void measure_spectrum_gfwall(int nm, double *m, int conf_num, double precision, } print_mesons(meson_correlators, GLB_VOL3, conf_num, nm, m, GLB_T, 1, "DEFAULT_GFWALL"); - suNg_field_copy(u_gauge, u_gauge_old); + copy_suNg_field(u_gauge, u_gauge_old); represent_gauge_field(); free_propagator_eo(); @@ -468,7 +468,7 @@ void measure_spectrum_gfwall_fixedbc(int dt, int nm, double *m, int conf_num, do } int tau, k; tau = 0; - suNg_field_copy(u_gauge_old, u_gauge); + copy_suNg_field(u_gauge_old, u_gauge); // Fix the Gauge double act = gaugefix(0, //= 0, 1, 2, 3 for Coulomb guage else Landau @@ -493,7 +493,7 @@ void measure_spectrum_gfwall_fixedbc(int dt, int nm, double *m, int conf_num, do } print_mesons(meson_correlators, GLB_VOL3, conf_num, nm, m, GLB_T, 1, "DIRICHLET_GFWALL"); - suNg_field_copy(u_gauge, u_gauge_old); + copy_suNg_field(u_gauge, u_gauge_old); represent_gauge_field(); free_propagator_eo(); @@ -549,7 +549,7 @@ void measure_spectrum_discon_gfwall(int nm, double *m, int conf_num, double prec int tau, k; tau = 0; - suNg_field_copy(u_gauge_old, u_gauge); + copy_suNg_field(u_gauge_old, u_gauge); // Fix the Gauge double act = gaugefix(0, //= 0, 1, 2, 3 for Coulomb guage else Landau 1.8, // overrelax @@ -574,7 +574,7 @@ void measure_spectrum_discon_gfwall(int nm, double *m, int conf_num, double prec } print_mesons(discon_correlators, GLB_T, conf_num, nm, m, GLB_T, 1, "DISCON_GFWALL"); - suNg_field_copy(u_gauge, u_gauge_old); + copy_suNg_field(u_gauge, u_gauge_old); represent_gauge_field(); free_propagator_eo(); @@ -659,7 +659,7 @@ void measure_formfactor_fixed(int ti, int tf, int dt, int nm, double *m, int n_m int k; char label[100]; suNf_field *u_gauge_old = alloc_suNf_field(&glattice); - suNf_field_copy(u_gauge_old, u_gauge_f); // Save the gaugefield + copy_suNf_field(u_gauge_old, u_gauge_f); // Save the gaugefield double p = avr_plaquette(); lprintf("MESON_MEASUREMENTS", 0, "
= %g\n", p);
@@ -694,7 +694,7 @@ void measure_formfactor_fixed(int ti, int tf, int dt, int nm, double *m, int n_m
sprintf(label, "DIRICHLET_FF_POINT dt=%d", dt);
print_formfactor(conf_num, nm, m, n_mom, label, tf - ti);
- suNf_field_copy(u_gauge_f, u_gauge_old); // Restore the gaugefield
+ copy_suNf_field(u_gauge_f, u_gauge_old); // Restore the gaugefield
free_spinor_field(source);
free_spinor_field(source_seq);
diff --git a/LibHR/Update/copy_gfield.c b/LibHR/Update/copy_gfield.c
deleted file mode 100644
index b2e4b7462..000000000
--- a/LibHR/Update/copy_gfield.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/***************************************************************************\
-* Copyright (c) 2008, Claudio Pica *
-* All rights reserved. *
-\***************************************************************************/
-
-#include "update.h"
-#include "libhr_core.h"
-#include %1.6f\n", avr_plaquette());
@@ -283,7 +283,7 @@ int main(int argc, char *argv[]) {
represent_gauge_field();
gettimeofday(&start, 0);
- suNf_field_copy(u_gauge_old_f, u_gauge_f);
+ copy_suNf_field(u_gauge_old_f, u_gauge_f);
init_propagator_eo(nm, m, mes_var.precision);
@@ -302,7 +302,7 @@ int main(int argc, char *argv[]) {
for (l = 1; l <= mes_var.n_mom; ++l) {
double p_in[4], p_out[4];
for (tw = -mes_var.n_twist; tw < mes_var.n_twist + 1; tw++) {
- suNf_field_copy(u_gauge_f, u_gauge_old_f);
+ copy_suNf_field(u_gauge_f, u_gauge_old_f);
double twist = (double)tw * 0.5; //(double)tw/(double)(mes_var.n_twist+1);
lprintf("TEST", 0, " before twist %1.6f\n", avr_plaquette());
twist_XYZ_bc(twist * mes_var.px_in, twist * mes_var.py_in, twist * mes_var.pz_in);
@@ -319,7 +319,7 @@ int main(int argc, char *argv[]) {
}
if (mes_var.ne) {
- suNf_field_copy(u_gauge_f, u_gauge_old_f);
+ copy_suNf_field(u_gauge_f, u_gauge_old_f);
twist_XYZ_bc(twist * mes_var.px_out, twist * mes_var.py_out, twist * mes_var.pz_out);
p_out[0] = mom_out[0] * l;
diff --git a/TestProgram/RIMOM/check_RIMOM.c b/TestProgram/RIMOM/check_RIMOM.c
index 3567872e9..334a9d4a6 100644
--- a/TestProgram/RIMOM/check_RIMOM.c
+++ b/TestProgram/RIMOM/check_RIMOM.c
@@ -156,7 +156,7 @@ int main(int argc, char *argv[]) {
lprintf("MAIN", 0, "Generating a unit configuration\n");
unit_gauge(u_gauge);
- suNg_field_copy(u_gauge_old, u_gauge);
+ copy_suNg_field(u_gauge_old, u_gauge);
represent_gauge_field();
@@ -184,7 +184,7 @@ int main(int argc, char *argv[]) {
represent_gauge_field();
gettimeofday(&start, 0);
- suNf_field_copy(u_gauge_old_f, u_gauge_f);
+ copy_suNf_field(u_gauge_old_f, u_gauge_f);
init_propagator_eo(nm, m, mes_var.precision);
@@ -203,7 +203,7 @@ int main(int argc, char *argv[]) {
for (l = 1; l <= mes_var.n_mom; ++l) {
double p_in[4], p_out[4];
for (tw = -mes_var.n_twist; tw < mes_var.n_twist + 1; tw++) {
- suNf_field_copy(u_gauge_f, u_gauge_old_f);
+ copy_suNf_field(u_gauge_f, u_gauge_old_f);
double twist = (double)tw * 0.5; //(double)tw/(double)(mes_var.n_twist+1);
lprintf("TEST", 0, " before twist %1.6f\n", avr_plaquette());
twist_XYZ_bc(twist * mes_var.px_in, twist * mes_var.py_in, twist * mes_var.pz_in);
@@ -220,7 +220,7 @@ int main(int argc, char *argv[]) {
}
if (mes_var.ne) {
- suNf_field_copy(u_gauge_f, u_gauge_old_f);
+ copy_suNf_field(u_gauge_f, u_gauge_old_f);
twist_XYZ_bc(twist * mes_var.px_out, twist * mes_var.py_out, twist * mes_var.pz_out);
p_out[0] = mom_out[0] * l;
diff --git a/TestProgram/Utils/check_utils_1.c b/TestProgram/Utils/check_utils_1.c
index aafe1fd49..3f47f943d 100644
--- a/TestProgram/Utils/check_utils_1.c
+++ b/TestProgram/Utils/check_utils_1.c
@@ -42,7 +42,7 @@ int main(int argc, char *argv[]) {
lprintf("MAIN", 0, "Copying wrkfield %d on wrkfield %d\n", 0, nwrk - 2);
- suNg_field_copy(wrk[nwrk - 2], wrk[0]);
+ copy_suNg_field(wrk[nwrk - 2], wrk[0]);
set_wrk_space(idx_wrk[nwrk - 2]);
test = avr_plaquette_wrk();