AQUAgpusph 5.0.4
Loading...
Searching...
No Matches
sound_speed.hcl
Go to the documentation of this file.
1/*
2 * This file is part of AQUAgpusph, a free CFD program based on SPH.
3 * Copyright (C) 2012 Jose Luis Cercos Pita <jl.cercos@upm.es>
4 *
5 * AQUAgpusph is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * AQUAgpusph is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with AQUAgpusph. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef _SOUND_SPEED_PERFECT_GAS_H_INCLUDED_
20#define _SOUND_SPEED_PERFECT_GAS_H_INCLUDED_
21
22float sound_speed_perfect_gas(float gamma, float p, float rho)
23{
24 return sqrt(gamma * p / rho);
25}
26
27#endif // _SOUND_SPEED_PERFECT_GAS_H_INCLUDED_
__kernel void gamma(const __global int *imove, const __global vec *r, const __global float *rho, const __global float *m, const __global vec *mpi_r, const __global float *mpi_rho, const __global float *mpi_m, __global float *shepard, usize N, LINKLIST_REMOTE_PARAMS)
Shepard factor computation.
Definition MPI.cl:328
float sound_speed_perfect_gas(float gamma, float p, float rho)
Definition sound_speed.hcl:22