Hello Team, greetings. I'm trying to find that point in the CFDEMCoupling source code where the LIGGGHTS data is transferred to OpenFOAM solver. End goal is to output particle positions to terminal and later on, subtract a constant value from all the x - coordinates of particles for a simulation.
I think, data_liggghts_to_of( ) in library_cfd_coupling.cpp inside LIGGGHTS-PUBLIC/src is the function, which is called by getData( ) in twoWayMPI.C, is the point where LIGGGHTS data is transferred to OpenFOAM. Function is as given below.
void data_liggghts_to_of(const char *name,const char *type,void *ptr,void *&data,const char* datatype)
std::cout << "\nONS::data_li_to_of: " << name << "\n";
//LAMMPS *lmp = (LAMMPS *) ptr;
FixCfdCoupling* fcfd = (FixCfdCoupling*)locate_coupling_fix(ptr);
The variables "name" , "type" are (radius, scalar-atom), (x, vector-atom), (v, vector-atom) which are self-explanatory but I'm unable to output particle positions. How to do that?
What is the datatype of "data" argument in this function? I tried with "<< *&data <<" OR "<< &data <<", but all I see is addresses.