#include <PreComp_solver.h>
Public Member Functions | |
PreComp_solver () | |
~PreComp_solver () | |
destructor: deallocates pointers. More... | |
int | init (PreComp_params *pc_params, SimulationParams *params, Blob **blob_array) |
Read input precomputed tables. More... | |
int | solve (scalar *blob_corr=NULL) |
calculate the forces using a straightforward double loop. More... | |
int | solve_using_neighbours () |
calculate the forces using linkedlists. More... | |
int | solve_using_neighbours_non_critical (scalar *blob_corr=NULL) |
using linkedlists, calculate twice the forces to avoid any critical regions. More... | |
void | reset_fieldenergy () |
scalar | get_U (scalar x, int typei, int typej) |
Use finterpolate to return the value for U at x between types i and j. More... | |
scalar | get_F (scalar x, int typei, int typej) |
Use finterpolate to return the value for F at x between types i and j. More... | |
scalar | get_field_energy (int index0, int index1) |
int | compute_bead_positions () |
calculate b_pos, the absolute positions of the beads. More... | |
int | build_pc_nearest_neighbour_lookup () |
put the beads on the grid. More... | |
int | prebuild_pc_nearest_neighbour_lookup_and_swap () |
put the beads on the grid. More... | |
int | prebuild_pc_nearest_neighbour_lookup () |
put the beads on the grid. More... | |
int | safely_swap_pc_layers () |
swap the two LinkedLists. More... | |
void | write_beads_to_file (FILE *fout, int timestep) |
write beads to file, for the current timestep More... | |
Private Types | |
typedef tetra_element_linear * | TELPtr |
Private Member Functions | |
int | msg (string whatever) |
int | msg (int whatever) |
int | read_tabulated_values (PreComp_params &pc_params, string kind, scalar *Z, scalar scale_Z) |
int | calc_force_from_pot () |
scalar | finterpolate (scalar *Z, scalar x, int typei, int typej) |
Get the value Z value (either U or F) at x between types typei and typej. More... | |
Private Attributes | |
int | msgc |
LinkedListCube< int > | pcLookUp |
the linkedlist itself More... | |
scalar | pcVoxelSize |
the size of the voxels. More... | |
int | pcVoxelsInBox [3] |
num of voxels per side. More... | |
scalar | Dx |
scalar | x_range [2] |
scalar | x_range2 [2] |
int | n_values |
int | nint |
int | ntypes |
scalar * | U |
scalar * | F |
TELPtr * | b_elems |
TELPtr * | b_unq_elems |
int * | b_types |
int * | map_e_to_b |
int | n_beads |
int | num_diff_elems |
scalar * | b_rel_pos |
scalar * | b_pos |
scalar * | b_forces |
int * | b_daddyblob |
bool * | isPairActive |
vector< string > | stypes |
string types for the beads; sorry it is a c++ vector More... | |
int * | b_elems_ndx |
array with the corresponding element index. More... | |
int * | b_blob_ndx |
array with the corresponding blob index. More... | |
scalar * | fieldenergy |
int | num_blobs |
int | num_threads |
Static Private Attributes | |
static const int | adjacent_cells [27][3] |
|
private |
interacting elements
|
private |
array with the corresponding blob index.
Referenced by init(), and write_beads_to_file().
|
private |
list of the daddy blob
Referenced by init(), solve(), and solve_using_neighbours_non_critical().
|
private |
Referenced by compute_bead_positions(), init(), solve(), solve_using_neighbours(), solve_using_neighbours_non_critical(), and ~PreComp_solver().
|
private |
array with the corresponding element index.
Referenced by init(), and write_beads_to_file().
|
private |
forces to be applied
Referenced by init(), and solve_using_neighbours_non_critical().
|
private |
absolute position of the beads
Referenced by build_pc_nearest_neighbour_lookup(), compute_bead_positions(), init(), prebuild_pc_nearest_neighbour_lookup(), prebuild_pc_nearest_neighbour_lookup_and_swap(), solve(), solve_using_neighbours(), solve_using_neighbours_non_critical(), and write_beads_to_file().
|
private |
relative position of the beads to the element they belong, xyzxyzxyz...
Referenced by compute_bead_positions(), init(), solve(), solve_using_neighbours(), and solve_using_neighbours_non_critical().
|
private |
bead types
Referenced by init(), PreComp_solver(), solve(), solve_using_neighbours(), solve_using_neighbours_non_critical(), write_beads_to_file(), and ~PreComp_solver().
|
private |
Referenced by init(), and solve_using_neighbours_non_critical().
|
private |
delta x in tabulated potentials and forces"
Referenced by calc_force_from_pot(), finterpolate(), init(), and read_tabulated_values().
|
private |
pointer to array containing all the values for all the pair forces.
Referenced by calc_force_from_pot(), get_F(), init(), PreComp_solver(), and ~PreComp_solver().
|
private |
Variables to store the energy field data between each pair of blobs
Referenced by get_field_energy(), init(), PreComp_solver(), reset_fieldenergy(), solve(), solve_using_neighbours(), solve_using_neighbours_non_critical(), and ~PreComp_solver().
|
private |
bool "matrix" (array) storing for every pair if it is active or not
Referenced by init(), PreComp_solver(), read_tabulated_values(), solve(), solve_using_neighbours(), solve_using_neighbours_non_critical(), and ~PreComp_solver().
|
private |
map b_unq_elems to beads
Referenced by init(), and solve_using_neighbours_non_critical().
|
private |
msgc and msg are helpful while developing
Referenced by msg(), and PreComp_solver().
|
private |
number of beads
Referenced by build_pc_nearest_neighbour_lookup(), compute_bead_positions(), init(), prebuild_pc_nearest_neighbour_lookup(), prebuild_pc_nearest_neighbour_lookup_and_swap(), PreComp_solver(), solve(), solve_using_neighbours(), solve_using_neighbours_non_critical(), write_beads_to_file(), and ~PreComp_solver().
|
private |
number of pre-computed values per table
Referenced by calc_force_from_pot(), finterpolate(), init(), and read_tabulated_values().
|
private |
total number of type interactions
Referenced by calc_force_from_pot(), init(), and PreComp_solver().
|
private |
number of types of "beads
Referenced by finterpolate(), init(), read_tabulated_values(), solve(), solve_using_neighbours(), and solve_using_neighbours_non_critical().
|
private |
|
private |
number of different elements
Referenced by init(), and solve_using_neighbours_non_critical().
|
private |
Referenced by get_field_energy(), init(), and reset_fieldenergy().
|
private |
the linkedlist itself
Referenced by build_pc_nearest_neighbour_lookup(), init(), prebuild_pc_nearest_neighbour_lookup(), prebuild_pc_nearest_neighbour_lookup_and_swap(), safely_swap_pc_layers(), solve_using_neighbours(), and solve_using_neighbours_non_critical().
|
private |
num of voxels per side.
Referenced by init().
|
private |
the size of the voxels.
Referenced by build_pc_nearest_neighbour_lookup(), init(), prebuild_pc_nearest_neighbour_lookup(), and prebuild_pc_nearest_neighbour_lookup_and_swap().
|
private |
string types for the beads; sorry it is a c++ vector
variables stypes, b_elems_ndx, and b_blob_ndx will only be used if writing traj
Referenced by init(), and write_beads_to_file().
|
private |
pointer to array containing all the values for all the pair potentials.
Referenced by calc_force_from_pot(), get_U(), init(), PreComp_solver(), and ~PreComp_solver().
|
private |
x_range
Referenced by init(), and read_tabulated_values().
|
private |
squared x_range
Referenced by init(), solve(), solve_using_neighbours(), and solve_using_neighbours_non_critical().