Commit cb36d6f7 authored by Nathan Coppin's avatar Nathan Coppin
Browse files

fix init in set particles

parent e87ec33c
Pipeline #8678 failed with stages
in 1 minute and 57 seconds
......@@ -1766,6 +1766,11 @@ void fluid_problem_set_particles(FluidProblem *problem, int n, double *mass, dou
problem->particle_contact = (double*)malloc(sizeof(double)*n*D);
}
for (int i = 0; i < n; ++i) {
for (int k = 0; k < D; ++k) {
problem->particle_position[i*D+k] = position[i*D+k];
problem->particle_velocity[i*D+k] = velocity[i*D+k];
problem->particle_contact[i*D+k] = contact[i*D+k];
}
problem->particle_element_id[i]=-1;
}
mesh_tree_particle_to_mesh(problem->mesh_tree, n, position, problem->particle_element_id, problem->particle_uvw);
......
......@@ -91,7 +91,6 @@ def predictor_corrector_iterate(fluid, particles, dt, min_nsub=1, contact_tol=1e
disk0 = np.copy(particles.disks())
if particles.dim() == 3 :
tri0 = np.copy(particles.triangles())
# Predictor
#
# Compute the fluid solution and keep a copy of this solution and the forces applied by the fluid on the grains
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment