Skip to content
Snippets Groups Projects
Commit 8b49a37d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Particles (and cells) now carry a time for the end and for the begining of...

Particles (and cells) now carry a time for the end and for the begining of their current timesteps and not a dt anymore.
parent c123d484
Branches
Tags
2 merge requests!136Master,!79First version of the multiple time-stepping
...@@ -38,7 +38,7 @@ extern int cell_next_tag; ...@@ -38,7 +38,7 @@ extern int cell_next_tag;
struct pcell { struct pcell {
/* Stats on this cell's particles. */ /* Stats on this cell's particles. */
double h_max, dt_min, dt_max; double h_max, t_end_min, t_end_max;
/* Number of particles in this cell. */ /* Number of particles in this cell. */
int count; int count;
...@@ -62,8 +62,8 @@ struct cell { ...@@ -62,8 +62,8 @@ struct cell {
/* Max radii in this cell. */ /* Max radii in this cell. */
double h_max; double h_max;
/* Minimum and maximum dt in this cell. */ /* Minimum and maximum end of time step in this cell. */
double dt_min, dt_max; double t_end_min, t_end_max;
/* Minimum dimension, i.e. smallest edge of this cell. */ /* Minimum dimension, i.e. smallest edge of this cell. */
float dmin; float dmin;
......
/******************************************************************************* /*******************************************************************************
* This file is part of SWIFT. * This file is part of SWIFT.
* Coypright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk) * Coypright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk)
* Matthieu Schaller (matthieu.schaller@durhm.ac.uk)
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published * it under the terms of the GNU Lesser General Public License as published
...@@ -60,8 +61,11 @@ struct gpart { ...@@ -60,8 +61,11 @@ struct gpart {
/* Particle mass. */ /* Particle mass. */
float mass; float mass;
/* Particle time step. */ /* Particle time of beginning of time-step. */
float dt; float t_begin;
/* Particle time of end of time-step. */
float t_end;
/* Anonymous union for id/part. */ /* Anonymous union for id/part. */
union { union {
...@@ -81,7 +85,7 @@ struct part { ...@@ -81,7 +85,7 @@ struct part {
/* Particle position. */ /* Particle position. */
double x[3]; double x[3];
/* Particle velocity. */ /* Particle predicted velocity. */
float v[3]; float v[3];
/* Particle acceleration. */ /* Particle acceleration. */
...@@ -90,8 +94,11 @@ struct part { ...@@ -90,8 +94,11 @@ struct part {
/* Particle cutoff radius. */ /* Particle cutoff radius. */
float h; float h;
/* Particle time-step. */ /* Particle time of beginning of time-step. */
float dt; float t_begin;
/* Particle time of end of time-step. */
float t_end;
/* Particle internal energy. */ /* Particle internal energy. */
float u; float u;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment