本文整理汇总了C++中FCS::print_parameters方法的典型用法代码示例。如果您正苦于以下问题:C++ FCS::print_parameters方法的具体用法?C++ FCS::print_parameters怎么用?C++ FCS::print_parameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FCS
的用法示例。
在下文中一共展示了FCS::print_parameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fcs_print_parameters
/**
* 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;
}