Skip to content

Reply To: Retrieving Data


Hello again.

I guess I did not explain my question clearly. Can I access the temperature at certain location in the (getResults) function?

I want to obtain the temperature around a particle and store it in the same dkt2d data file that the particle velocity and location is stored in. Why the following code does not work

auto particleA = particleSystem.get( 0 );
#ifdef WriteGnuPlot
if (iT % converter.getLatticeTime(iTwrite) == 0) {
if (singleton::mpi().getRank() == 0) {

std::ofstream myfile; (gnuplotFilename.c_str(), std::ios::app);
T p1PosY = particleA.getField<GENERAL,POSITION>()[1];
T p1PosX = particleA.getField<GENERAL,POSITION>()[0];
T p1VelocityY= particleA.getField<MOBILITY,VELOCITY>()[1];
T p1VelocityX = particleA.getField<MOBILITY,VELOCITY>()[0];
T radiusP = 0.001;
T Temp_Value[1];
ADlattice.get(p1PosX + radiusP, p1PosY + radiusP).computeRho(Temp_Value);

Your reply is appreciated