![]() |
ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
|
#include <string.h>#include "tcl/statistics_observable_tcl.h"#include "statistics_observable.h"#include "particle_data.h"#include "parser.h"#include "lb.h"#include "pressure.h"
Go to the source code of this file.
Defines | |
| #define | REGISTER_OBSERVABLE(name, parser, id) |
Functions | |
| int | tclcommand_observable_print_formatted (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs, double *values) |
| int | tclcommand_observable_print (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| static int | convert_types_to_ids (IntList *type_list, IntList *id_list) |
| int | parse_id_list (Tcl_Interp *interp, int argc, char **argv, int *change, IntList **ids) |
| int | tclcommand_parse_profile (Tcl_Interp *interp, int argc, char **argv, int *change, int *dim_A, profile_data **pdata_) |
| int | tclcommand_parse_radial_profile (Tcl_Interp *interp, int argc, char **argv, int *change, int *dim_A, radial_profile_data **pdata) |
| int | sf_print_usage (Tcl_Interp *interp) |
| int | tclcommand_observable_print_profile_formatted (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs, double *values, int groupsize, int shifted) |
| int | tclcommand_observable_print_radial_profile_formatted (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs, double *values, int groupsize, int shifted) |
| int | tclcommand_observable_tclcommand (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_particle_velocities (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_particle_angular_momentum (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_com_velocity (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_com_position (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_com_force (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_particle_positions (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_particle_forces (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_stress_tensor (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_stress_tensor_acf_obs (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_density_profile (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_lb_velocity_profile (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_radial_density_profile (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_radial_flux_density_profile (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_flux_density_profile (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_lb_radial_velocity_profile (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_particle_currents (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_currents (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_dipole_moment (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable_interacts_with (Tcl_Interp *interp, int argc, char **argv, int *change, observable *obs) |
| int | tclcommand_observable (ClientData data, Tcl_Interp *interp, int argc, char **argv) |
| int | file_data_source_readline (void *xargs, double *A, int dim_A) |
| int | observable_tclcommand (void *_container, double *A, unsigned int n_A) |
| #define REGISTER_OBSERVABLE | ( | name, | |
| parser, | |||
| id | |||
| ) |
if (ARG_IS_S(2,#name)) { \ observables[id]=malloc(sizeof(observable)); \ if (parser(interp, argc-2, argv+2, &temp, observables[n_observables]) ==TCL_OK) { \ n_observables++; \ argc-=1+temp; \ argv+=1+temp; \ sprintf(buffer,"%d",id); \ Tcl_AppendResult(interp,buffer,(char *)NULL);\ return TCL_OK; \ } else { \ free(observables[n_observables]);\ Tcl_AppendResult(interp, "\nError parsing observable ", #name, "\n", (char *)NULL); \ return TCL_ERROR; \ } \ }
Definition at line 779 of file statistics_observable_tcl.c.
Referenced by tclcommand_observable().
Definition at line 872 of file statistics_observable_tcl.c.
References IntList::e, i, IntList::n, n_total_particles, partCfg, realloc_intlist(), and sortPartCfg().
Referenced by parse_id_list().
| int file_data_source_readline | ( | void * | xargs, |
| double * | A, | ||
| int | dim_A | ||
| ) |
Definition at line 926 of file statistics_observable_tcl.c.
| int observable_tclcommand | ( | void * | _container, |
| double * | A, | ||
| unsigned int | n_A | ||
| ) |
Definition at line 1317 of file statistics_observable_tcl.c.
References Observable_Tclcommand_Arg_Container::command, and Observable_Tclcommand_Arg_Container::interp.
Referenced by tclcommand_observable_tclcommand().
| int parse_id_list | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| IntList ** | ids | ||
| ) |
Definition at line 34 of file statistics_observable_tcl.c.
References alloc_intlist(), ARG0_IS_S, convert_types_to_ids(), IntList::e, i, init_intlist(), malloc, IntList::n, n_total_particles, and parse_int_list().
Referenced by tclcommand_observable_com_force(), tclcommand_observable_com_position(), tclcommand_observable_com_velocity(), tclcommand_observable_currents(), tclcommand_observable_dipole_moment(), tclcommand_observable_interacts_with(), tclcommand_observable_particle_angular_momentum(), tclcommand_observable_particle_currents(), tclcommand_observable_particle_forces(), tclcommand_observable_particle_positions(), tclcommand_observable_particle_velocities(), tclcommand_parse_profile(), and tclcommand_parse_radial_profile().
| int sf_print_usage | ( | Tcl_Interp * | interp | ) |
Definition at line 1312 of file statistics_observable_tcl.c.
| int tclcommand_observable | ( | ClientData | data, |
| Tcl_Interp * | interp, | ||
| int | argc, | ||
| char ** | argv | ||
| ) |
Definition at line 798 of file statistics_observable_tcl.c.
References ARG1_IS_I, ARG1_IS_S, ARG_IS_S, n_observables, observables, realloc, REGISTER_OBSERVABLE, tclcommand_observable_com_force(), tclcommand_observable_com_position(), tclcommand_observable_com_velocity(), tclcommand_observable_currents(), tclcommand_observable_density_profile(), tclcommand_observable_dipole_moment(), tclcommand_observable_flux_density_profile(), tclcommand_observable_interacts_with(), tclcommand_observable_lb_radial_velocity_profile(), tclcommand_observable_lb_velocity_profile(), tclcommand_observable_particle_angular_momentum(), tclcommand_observable_particle_currents(), tclcommand_observable_particle_forces(), tclcommand_observable_particle_positions(), tclcommand_observable_particle_velocities(), tclcommand_observable_print(), tclcommand_observable_radial_density_profile(), tclcommand_observable_radial_flux_density_profile(), tclcommand_observable_stress_tensor(), tclcommand_observable_stress_tensor_acf_obs(), and tclcommand_observable_tclcommand().
Referenced by register_tcl_commands().
| int tclcommand_observable_com_force | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 341 of file statistics_observable_tcl.c.
References ARG0_IS_S, ARG1_IS_I, observable::args, observable::fun, i, observable::n, IntList::n, observable_blocked_com_force(), observable_com_force(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_com_position | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 309 of file statistics_observable_tcl.c.
References ARG0_IS_S, ARG1_IS_I, observable::args, observable::fun, i, observable::n, IntList::n, observable_blocked_com_position(), observable_com_position(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_com_velocity | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 278 of file statistics_observable_tcl.c.
References ARG0_IS_S, ARG1_IS_I, observable::args, observable::fun, i, observable::n, IntList::n, observable_blocked_com_velocity(), observable_com_velocity(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_currents | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 531 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, observable_currents(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_density_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 416 of file statistics_observable_tcl.c.
References observable::args, observable::fun, profile_data::id_list, observable::n, observable_density_profile(), tclcommand_parse_profile(), profile_data::xbins, profile_data::ybins, and profile_data::zbins.
Referenced by tclcommand_observable().
| int tclcommand_observable_dipole_moment | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 548 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, observable_dipole_moment(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_flux_density_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 481 of file statistics_observable_tcl.c.
References observable::args, observable::fun, profile_data::id_list, observable::n, observable_flux_density_profile(), tclcommand_parse_profile(), profile_data::xbins, profile_data::ybins, and profile_data::zbins.
Referenced by tclcommand_observable().
| int tclcommand_observable_interacts_with | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 698 of file statistics_observable_tcl.c.
References ARG_IS_D, observable::args, iw_params::cutoff, free, observable::fun, iw_params::ids1, iw_params::ids2, malloc, observable::n, IntList::n, observable_interacts_with(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_lb_radial_velocity_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 497 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, observable_lb_radial_velocity_profile(), radial_profile_data::phibins, radial_profile_data::rbins, tclcommand_parse_radial_profile(), and radial_profile_data::zbins.
Referenced by tclcommand_observable().
| int tclcommand_observable_lb_velocity_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 432 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, observable_lb_velocity_profile(), tclcommand_parse_profile(), profile_data::xbins, profile_data::ybins, and profile_data::zbins.
Referenced by tclcommand_observable().
| int tclcommand_observable_particle_angular_momentum | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 266 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, IntList::n, observable_particle_angular_momentum(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_particle_currents | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 513 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, IntList::n, observable_particle_currents(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_particle_forces | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 384 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, IntList::n, observable_particle_forces(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_particle_positions | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 372 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, IntList::n, observable_particle_positions(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_particle_velocities | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 254 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, IntList::n, observable_particle_velocities(), and parse_id_list().
Referenced by tclcommand_observable().
| int tclcommand_observable_print | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 1264 of file statistics_observable_tcl.c.
References ARG0_IS_S, observable::args, free, observable::fun, i, malloc, observable::n, tclcommand_observable_print_formatted(), and values().
Referenced by tclcommand_observable().
| int tclcommand_observable_print_formatted | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs, | ||
| double * | values | ||
| ) |
Definition at line 1286 of file statistics_observable_tcl.c.
References observable::fun, observable_density_profile(), observable_flux_density_profile(), observable_lb_radial_velocity_profile(), observable_lb_velocity_profile(), observable_radial_density_profile(), observable_radial_flux_density_profile(), tclcommand_observable_print_profile_formatted(), and tclcommand_observable_print_radial_profile_formatted().
Referenced by correlation_print_average1(), and tclcommand_observable_print().
| int tclcommand_observable_print_profile_formatted | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs, | ||
| double * | values, | ||
| int | groupsize, | ||
| int | shifted | ||
| ) |
Definition at line 101 of file statistics_observable_tcl.c.
References observable::args, i, profile_data::maxx, profile_data::maxy, profile_data::maxz, profile_data::minx, profile_data::miny, profile_data::minz, profile_data::xbins, profile_data::ybins, and profile_data::zbins.
Referenced by tclcommand_observable_print_formatted().
| int tclcommand_observable_print_radial_profile_formatted | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs, | ||
| double * | values, | ||
| int | groupsize, | ||
| int | shifted | ||
| ) |
Definition at line 166 of file statistics_observable_tcl.c.
References observable::args, i, radial_profile_data::maxphi, radial_profile_data::maxr, radial_profile_data::maxz, radial_profile_data::minphi, radial_profile_data::minr, radial_profile_data::minz, radial_profile_data::phibins, radial_profile_data::rbins, and radial_profile_data::zbins.
Referenced by tclcommand_observable_print_formatted().
| int tclcommand_observable_radial_density_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 449 of file statistics_observable_tcl.c.
References observable::args, observable::fun, radial_profile_data::id_list, observable::n, observable_radial_density_profile(), radial_profile_data::phibins, radial_profile_data::rbins, tclcommand_parse_radial_profile(), and radial_profile_data::zbins.
Referenced by tclcommand_observable().
| int tclcommand_observable_radial_flux_density_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 465 of file statistics_observable_tcl.c.
References observable::args, observable::fun, radial_profile_data::id_list, observable::n, observable_radial_flux_density_profile(), radial_profile_data::phibins, radial_profile_data::rbins, tclcommand_parse_radial_profile(), and radial_profile_data::zbins.
Referenced by tclcommand_observable().
| int tclcommand_observable_stress_tensor | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 398 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, and observable_stress_tensor().
Referenced by tclcommand_observable().
| int tclcommand_observable_stress_tensor_acf_obs | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 407 of file statistics_observable_tcl.c.
References observable::args, observable::fun, observable::n, and observable_stress_tensor_acf_obs().
Referenced by tclcommand_observable().
| int tclcommand_observable_tclcommand | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| observable * | obs | ||
| ) |
Definition at line 230 of file statistics_observable_tcl.c.
References ARG1_IS_I, observable::args, Observable_Tclcommand_Arg_Container::command, observable::fun, Observable_Tclcommand_Arg_Container::interp, malloc, observable::n, Observable_Tclcommand_Arg_Container::n_A, and observable_tclcommand().
Referenced by tclcommand_observable().
| int tclcommand_parse_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| int * | dim_A, | ||
| profile_data ** | pdata_ | ||
| ) |
Definition at line 978 of file statistics_observable_tcl.c.
References ARG0_IS_S, ARG1_IS_D, ARG1_IS_I, box_l, profile_data::id_list, malloc, profile_data::maxx, profile_data::maxy, profile_data::maxz, profile_data::minx, profile_data::miny, profile_data::minz, parse_id_list(), profile_data::xbins, profile_data::ybins, and profile_data::zbins.
Referenced by tclcommand_observable_density_profile(), tclcommand_observable_flux_density_profile(), and tclcommand_observable_lb_velocity_profile().
| int tclcommand_parse_radial_profile | ( | Tcl_Interp * | interp, |
| int | argc, | ||
| char ** | argv, | ||
| int * | change, | ||
| int * | dim_A, | ||
| radial_profile_data ** | pdata | ||
| ) |
Definition at line 1102 of file statistics_observable_tcl.c.
References ARG0_IS_S, ARG1_IS_D, ARG1_IS_I, ARG_IS_D, radial_profile_data::axis, box_l, radial_profile_data::center, radial_profile_data::id_list, malloc, radial_profile_data::maxphi, radial_profile_data::maxr, radial_profile_data::maxz, radial_profile_data::minphi, radial_profile_data::minr, radial_profile_data::minz, parse_id_list(), radial_profile_data::phibins, PI, radial_profile_data::rbins, and radial_profile_data::zbins.
Referenced by tclcommand_observable_lb_radial_velocity_profile(), tclcommand_observable_radial_density_profile(), and tclcommand_observable_radial_flux_density_profile().
1.7.5.1