/** * print the parameters of an FCS solver to stdout */ FCSResult fcs_print_parameters(FCS handle) { const char *fnc_name = "fcs_print_parameters"; FCSResult result; CHECK_HANDLE_RETURN_RESULT(handle, fnc_name); printf("chosen method: %s\n", fcs_get_method_name(handle)); printf("near field computations done by solver: %c\n", (fcs_get_near_field_flag(handle)?'T':'F')); printf("box vectors: [%10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f], [%10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f], [%10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f]\n", fcs_get_box_a(handle)[0], fcs_get_box_a(handle)[1], fcs_get_box_a(handle)[2], fcs_get_box_b(handle)[0], fcs_get_box_b(handle)[1], fcs_get_box_b(handle)[2], fcs_get_box_c(handle)[0], fcs_get_box_c(handle)[1], fcs_get_box_c(handle)[2]); printf("box origin: [%10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f %10.4" FCS_LMOD_FLOAT "f]\n", fcs_get_box_origin(handle)[0], fcs_get_box_origin(handle)[1], fcs_get_box_origin(handle)[2]); printf("periodicity: %c %c %c\n", ((fcs_get_periodicity(handle)[0] == 1)?'T':'F'), ((fcs_get_periodicity(handle)[1] == 1)?'T':'F'),((fcs_get_periodicity(handle)[2] == 1)?'T':'F')); printf("total particles: %" FCS_LMOD_INT "d\n", fcs_get_total_particles(handle)); printf("solver specific data:\n"); if (handle->print_parameters) { result = handle->print_parameters(handle); if (result != FCS_RESULT_SUCCESS) fcs_result_print_result(result); } result = fcs_common_print_parameters(handle); if (result != FCS_RESULT_SUCCESS) fcs_result_print_result(result); return FCS_RESULT_SUCCESS; }
/* method to check if pepc parameters are entered into checked FCS */ FCSResult fcs_pepc_check(FCS handle) { const fcs_float *a,*b,*c; fcs_float eps, theta; FCSResult res; if ((res = fcs_pepc_get_epsilon(handle, &eps))) return res; if (eps == -1.0) return fcs_result_create(FCS_ERROR_MISSING_ELEMENT, __func__, "pepc: epsilon not set"); if ((res = fcs_pepc_get_theta(handle, &theta))) return res; if (theta == -1.0) return fcs_result_create(FCS_ERROR_MISSING_ELEMENT, __func__, "pepc: theta not set"); a = fcs_get_box_a(handle); b = fcs_get_box_b(handle); c = fcs_get_box_c(handle); if (!fcs_uses_principal_axes(a,b,c)) printf("%s\n", "WARNING: support of pepc for non-cubic simulation boxes currently is experimental."); if (!fcs_get_near_field_flag(handle)) return fcs_result_create(FCS_ERROR_INCOMPATIBLE_METHOD, __func__, "pepc performs near field computations by itself!"); return FCS_RESULT_SUCCESS; }