My Project
programmer's documentation
|
Gradient reconstruction. More...
#include "cs_defs.h"
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include "bft_error.h"
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_blas.h"
#include "cs_halo.h"
#include "cs_halo_perio.h"
#include "cs_internal_coupling.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_mesh.h"
#include "cs_field.h"
#include "cs_field_pointer.h"
#include "cs_ext_neighborhood.h"
#include "cs_mesh_adjacencies.h"
#include "cs_mesh_quantities.h"
#include "cs_prototypes.h"
#include "cs_timer.h"
#include "cs_timer_stats.h"
#include "cs_bad_cells_regularisation.h"
#include "cs_gradient.h"
Functions | |
void | CS_PROCF (grdpor, GRDPOR) const |
void | CS_PROCF (cgdcel, CGDCEL) const |
void | CS_PROCF (cgdvec, CGDVEC) const |
void | CS_PROCF (cgdts, CGDTS) const |
void | cs_gradient_initialize (void) |
Initialize gradient computation API. More... | |
void | cs_gradient_finalize (void) |
Finalize gradient computation API. More... | |
void | cs_gradient_scalar (const char *var_name, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, bool recompute_cocg, int n_r_sweeps, int tr_dim, int hyd_p_flag, int w_stride, int verbosity, int clip_mode, double epsilon, double extrap, double clip_coeff, cs_real_3_t f_ext[], const cs_real_t bc_coeff_a[], const cs_real_t bc_coeff_b[], cs_real_t *restrict var, cs_real_t *restrict c_weight, cs_internal_coupling_t *cpl, cs_real_3_t *restrict grad) |
Compute cell gradient of scalar field or component of vector or tensor field. More... | |
void | cs_gradient_vector (const char *var_name, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, int n_r_sweeps, int verbosity, int clip_mode, double epsilon, double clip_coeff, const cs_real_3_t bc_coeff_a[], const cs_real_33_t bc_coeff_b[], cs_real_3_t *restrict var, cs_real_t *restrict c_weight, cs_internal_coupling_t *cpl, cs_real_33_t *restrict grad) |
Compute cell gradient of vector field. More... | |
void | cs_gradient_tensor (const char *var_name, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, int n_r_sweeps, int verbosity, int clip_mode, double epsilon, double clip_coeff, const cs_real_6_t bc_coeff_a[], const cs_real_66_t bc_coeff_b[], cs_real_6_t *restrict var, cs_real_63_t *restrict grad) |
Compute cell gradient of tensor. More... | |
void | cs_gradient_scalar_synced_input (const char *var_name, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, bool recompute_cocg, int n_r_sweeps, int tr_dim, int hyd_p_flag, int w_stride, int verbosity, int clip_mode, double epsilon, double extrap, double clip_coeff, cs_real_t f_ext[][3], const cs_real_t bc_coeff_a[], const cs_real_t bc_coeff_b[], const cs_real_t var[restrict], const cs_real_t c_weight[restrict], const cs_internal_coupling_t *cpl, cs_real_t grad[restrict][3]) |
Compute cell gradient of scalar field or component of vector or tensor field. More... | |
void | cs_gradient_vector_synced_input (const char *var_name, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, int n_r_sweeps, int verbosity, int clip_mode, double epsilon, double clip_coeff, const cs_real_t bc_coeff_a[][3], const cs_real_t bc_coeff_b[][3][3], const cs_real_t var[restrict][3], const cs_real_t c_weight[restrict], const cs_internal_coupling_t *cpl, cs_real_33_t *restrict grad) |
Compute cell gradient of vector field. More... | |
void | cs_gradient_tensor_synced_input (const char *var_name, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, int n_r_sweeps, int verbosity, int clip_mode, double epsilon, double clip_coeff, const cs_real_t bc_coeff_a[][6], const cs_real_t bc_coeff_b[][6][6], const cs_real_t var[restrict][6], cs_real_63_t *restrict grad) |
Compute cell gradient of tensor. More... | |
void | cs_gradient_type_by_imrgra (int imrgra, cs_gradient_type_t *gradient_type, cs_halo_type_t *halo_type) |
Gradient reconstruction.
Please refer to the gradient reconstruction section of the theory guide for more informations.
void cs_gradient_finalize | ( | void | ) |
Finalize gradient computation API.
void cs_gradient_initialize | ( | void | ) |
Initialize gradient computation API.
void cs_gradient_scalar | ( | const char * | var_name, |
cs_gradient_type_t | gradient_type, | ||
cs_halo_type_t | halo_type, | ||
int | inc, | ||
bool | recompute_cocg, | ||
int | n_r_sweeps, | ||
int | tr_dim, | ||
int | hyd_p_flag, | ||
int | w_stride, | ||
int | verbosity, | ||
int | clip_mode, | ||
double | epsilon, | ||
double | extrap, | ||
double | clip_coeff, | ||
cs_real_3_t | f_ext[], | ||
const cs_real_t | bc_coeff_a[], | ||
const cs_real_t | bc_coeff_b[], | ||
cs_real_t *restrict | var, | ||
cs_real_t *restrict | c_weight, | ||
cs_internal_coupling_t * | cpl, | ||
cs_real_3_t *restrict | grad | ||
) |
Compute cell gradient of scalar field or component of vector or tensor field.
[in] | var_name | variable name |
[in] | gradient_type | gradient type |
[in] | halo_type | halo type |
[in] | inc | if 0, solve on increment; 1 otherwise |
[in] | recompute_cocg | should COCG FV quantities be recomputed ? |
[in] | n_r_sweeps | if > 1, number of reconstruction sweeps |
[in] | tr_dim | 2 for tensor with periodicity of rotation, 0 otherwise |
[in] | hyd_p_flag | flag for hydrostatic pressure |
[in] | w_stride | stride for weighting coefficient |
[in] | verbosity | verbosity level |
[in] | clip_mode | clipping mode |
[in] | epsilon | precision for iterative gradient calculation |
[in] | extrap | boundary gradient extrapolation coefficient |
[in] | clip_coeff | clipping coefficient |
[in] | f_ext | exterior force generating the hydrostatic pressure |
[in] | bc_coeff_a | boundary condition term a |
[in] | bc_coeff_b | boundary condition term b |
[in,out] | var | gradient's base variable |
[in,out] | c_weight | weighted gradient coefficient variable, or NULL |
[in,out] | cpl | structure associated with internal coupling, or NULL |
[out] | grad | gradient |
void cs_gradient_scalar_synced_input | ( | const char * | var_name, |
cs_gradient_type_t | gradient_type, | ||
cs_halo_type_t | halo_type, | ||
int | inc, | ||
bool | recompute_cocg, | ||
int | n_r_sweeps, | ||
int | tr_dim, | ||
int | hyd_p_flag, | ||
int | w_stride, | ||
int | verbosity, | ||
int | clip_mode, | ||
double | epsilon, | ||
double | extrap, | ||
double | clip_coeff, | ||
cs_real_t | f_ext[][3], | ||
const cs_real_t | bc_coeff_a[], | ||
const cs_real_t | bc_coeff_b[], | ||
const cs_real_t | var[restrict], | ||
const cs_real_t | c_weight[restrict], | ||
const cs_internal_coupling_t * | cpl, | ||
cs_real_t | grad[restrict][3] | ||
) |
Compute cell gradient of scalar field or component of vector or tensor field.
This variant of the cs_gradient_scalar function assumes ghost cell values for input arrays (var and optionally c_weight) have already been synchronized.
[in] | var_name | variable name |
[in] | gradient_type | gradient type |
[in] | halo_type | halo type |
[in] | inc | if 0, solve on increment; 1 otherwise |
[in] | recompute_cocg | should COCG FV quantities be recomputed ? |
[in] | n_r_sweeps | if > 1, number of reconstruction sweeps |
[in] | tr_dim | 2 for tensor with periodicity of rotation, 0 otherwise |
[in] | hyd_p_flag | flag for hydrostatic pressure |
[in] | w_stride | stride for weighting coefficient |
[in] | verbosity | verbosity level |
[in] | clip_mode | clipping mode |
[in] | epsilon | precision for iterative gradient calculation |
[in] | extrap | boundary gradient extrapolation coefficient |
[in] | clip_coeff | clipping coefficient |
[in] | f_ext | exterior force generating the hydrostatic pressure |
[in] | bc_coeff_a | boundary condition term a |
[in] | bc_coeff_b | boundary condition term b |
[in] | var | gradient's base variable |
[in] | c_weight | weighted gradient coefficient variable, or NULL |
[in,out] | cpl | structure associated with internal coupling, or NULL |
[out] | grad | gradient |
void cs_gradient_tensor | ( | const char * | var_name, |
cs_gradient_type_t | gradient_type, | ||
cs_halo_type_t | halo_type, | ||
int | inc, | ||
int | n_r_sweeps, | ||
int | verbosity, | ||
int | clip_mode, | ||
double | epsilon, | ||
double | clip_coeff, | ||
const cs_real_6_t | bc_coeff_a[], | ||
const cs_real_66_t | bc_coeff_b[], | ||
cs_real_6_t *restrict | var, | ||
cs_real_63_t *restrict | grad | ||
) |
Compute cell gradient of tensor.
[in] | var_name | variable name |
[in] | gradient_type | gradient type |
[in] | halo_type | halo type |
[in] | inc | if 0, solve on increment; 1 otherwise |
[in] | n_r_sweeps | if > 1, number of reconstruction sweeps |
[in] | verbosity | verbosity level |
[in] | clip_mode | clipping mode |
[in] | epsilon | precision for iterative gradient calculation |
[in] | clip_coeff | clipping coefficient |
[in] | bc_coeff_a | boundary condition term a |
[in] | bc_coeff_b | boundary condition term b |
[in,out] | var | gradient's base variable |
[out] | grad | gradient ( is grad[][i][j]) |
void cs_gradient_tensor_synced_input | ( | const char * | var_name, |
cs_gradient_type_t | gradient_type, | ||
cs_halo_type_t | halo_type, | ||
int | inc, | ||
int | n_r_sweeps, | ||
int | verbosity, | ||
int | clip_mode, | ||
double | epsilon, | ||
double | clip_coeff, | ||
const cs_real_t | bc_coeff_a[][6], | ||
const cs_real_t | bc_coeff_b[][6][6], | ||
const cs_real_t | var[restrict][6], | ||
cs_real_63_t *restrict | grad | ||
) |
Compute cell gradient of tensor.
[in] | var_name | variable name |
[in] | gradient_type | gradient type |
[in] | halo_type | halo type |
[in] | inc | if 0, solve on increment; 1 otherwise |
[in] | n_r_sweeps | if > 1, number of reconstruction sweeps |
[in] | verbosity | verbosity level |
[in] | clip_mode | clipping mode |
[in] | epsilon | precision for iterative gradient calculation |
[in] | clip_coeff | clipping coefficient |
[in] | bc_coeff_a | boundary condition term a |
[in] | bc_coeff_b | boundary condition term b |
[in,out] | var | gradient's base variable |
[out] | grad | gradient ( is grad[][ij][k]) |
void cs_gradient_type_by_imrgra | ( | int | imrgra, |
cs_gradient_type_t * | gradient_type, | ||
cs_halo_type_t * | halo_type | ||
) |
void cs_gradient_vector | ( | const char * | var_name, |
cs_gradient_type_t | gradient_type, | ||
cs_halo_type_t | halo_type, | ||
int | inc, | ||
int | n_r_sweeps, | ||
int | verbosity, | ||
int | clip_mode, | ||
double | epsilon, | ||
double | clip_coeff, | ||
const cs_real_3_t | bc_coeff_a[], | ||
const cs_real_33_t | bc_coeff_b[], | ||
cs_real_3_t *restrict | var, | ||
cs_real_t *restrict | c_weight, | ||
cs_internal_coupling_t * | cpl, | ||
cs_real_33_t *restrict | grad | ||
) |
Compute cell gradient of vector field.
[in] | var_name | variable name |
[in] | gradient_type | gradient type |
[in] | halo_type | halo type |
[in] | inc | if 0, solve on increment; 1 otherwise |
[in] | n_r_sweeps | if > 1, number of reconstruction sweeps |
[in] | verbosity | verbosity level |
[in] | clip_mode | clipping mode |
[in] | epsilon | precision for iterative gradient calculation |
[in] | clip_coeff | clipping coefficient |
[in] | bc_coeff_a | boundary condition term a |
[in] | bc_coeff_b | boundary condition term b |
[in,out] | var | gradient's base variable |
[in,out] | c_weight | weighted gradient coefficient variable, or NULL |
[in,out] | cpl | structure associated with internal coupling, or NULL |
[out] | grad | gradient ( is grad[][i][j]) |
void cs_gradient_vector_synced_input | ( | const char * | var_name, |
cs_gradient_type_t | gradient_type, | ||
cs_halo_type_t | halo_type, | ||
int | inc, | ||
int | n_r_sweeps, | ||
int | verbosity, | ||
int | clip_mode, | ||
double | epsilon, | ||
double | clip_coeff, | ||
const cs_real_t | bc_coeff_a[][3], | ||
const cs_real_t | bc_coeff_b[][3][3], | ||
const cs_real_t | var[restrict][3], | ||
const cs_real_t | c_weight[restrict], | ||
const cs_internal_coupling_t * | cpl, | ||
cs_real_33_t *restrict | grad | ||
) |
Compute cell gradient of vector field.
This variant of the cs_gradient_vector function assumes ghost cell values for input arrays (var and optionally c_weight) have already been synchronized.
[in] | var_name | variable name |
[in] | gradient_type | gradient type |
[in] | halo_type | halo type |
[in] | inc | if 0, solve on increment; 1 otherwise |
[in] | n_r_sweeps | if > 1, number of reconstruction sweeps |
[in] | verbosity | verbosity level |
[in] | clip_mode | clipping mode |
[in] | epsilon | precision for iterative gradient calculation |
[in] | clip_coeff | clipping coefficient |
[in] | bc_coeff_a | boundary condition term a |
[in] | bc_coeff_b | boundary condition term b |
[in,out] | var | gradient's base variable |
[in,out] | c_weight | weighted gradient coefficient variable, or NULL |
[in,out] | cpl | structure associated with internal coupling, or NULL |
[out] | grad | gradient ( is grad[][i][j]) |
void CS_PROCF | ( | cgdcel | , |
CGDCEL | |||
) | const |
void CS_PROCF | ( | cgdts | , |
CGDTS | |||
) | const |
void CS_PROCF | ( | cgdvec | , |
CGDVEC | |||
) | const |
void CS_PROCF | ( | grdpor | , |
GRDPOR | |||
) | const |