programmer's documentation
Functions
cs_field_operator.c File Reference
#include "cs_defs.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "bft_printf.h"
#include "cs_field.h"
#include "cs_gradient.h"
#include "cs_gradient_perio.h"
#include "cs_halo.h"
#include "cs_mesh.h"
#include "cs_log.h"
#include "cs_map.h"
#include "cs_parameters.h"
#include "cs_parall.h"
#include "cs_mesh_location.h"
#include "cs_mesh_quantities.h"
#include "cs_field_operator.h"
Include dependency graph for cs_field_operator.c:

Functions

static void _field_interpolate_by_mean (cs_field_t *f, cs_lnum_t n_points, const cs_lnum_t point_location[], cs_real_t *val)
 
static void _field_interpolate_by_gradient (cs_field_t *f, cs_lnum_t n_points, const cs_lnum_t point_location[], const cs_real_3_t point_coords[], cs_real_t *val)
 
void cs_field_gradient_scalar (const cs_field_t *f, bool use_previous_t, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, bool recompute_cocg, cs_real_3_t *restrict grad)
 Compute cell gradient of scalar field or component of vector or tensor field. More...
 
void cs_field_gradient_potential (const cs_field_t *f, bool use_previous_t, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, bool recompute_cocg, int hyd_p_flag, cs_real_3_t f_ext[], cs_real_3_t *restrict grad)
 Compute cell gradient of scalar field or component of vector or tensor field. More...
 
void cs_field_gradient_vector (const cs_field_t *f, bool use_previous_t, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, cs_real_33_t *restrict grad)
 Compute cell gradient of scalar field or component of vector or tensor field. More...
 
void cs_field_gradient_tensor (const cs_field_t *f, bool use_previous_t, cs_gradient_type_t gradient_type, cs_halo_type_t halo_type, int inc, cs_real_63_t *restrict grad)
 Compute cell gradient of tensor field. More...
 
void cs_field_interpolate (cs_field_t *f, cs_field_interpolate_t interpolation_type, cs_lnum_t n_points, const cs_lnum_t point_location[], const cs_real_3_t point_coords[], cs_real_t *val)
 Interpolate field values at a given set of points. More...
 

Detailed Description

Field based algebraic operators.

Function Documentation

static void _field_interpolate_by_gradient ( cs_field_t f,
cs_lnum_t  n_points,
const cs_lnum_t  point_location[],
const cs_real_3_t  point_coords[],
cs_real_t val 
)
static
static void _field_interpolate_by_mean ( cs_field_t f,
cs_lnum_t  n_points,
const cs_lnum_t  point_location[],
cs_real_t val 
)
static
void cs_field_gradient_potential ( const cs_field_t f,
bool  use_previous_t,
cs_gradient_type_t  gradient_type,
cs_halo_type_t  halo_type,
int  inc,
bool  recompute_cocg,
int  hyd_p_flag,
cs_real_3_t  f_ext[],
cs_real_3_t *restrict  grad 
)

Compute cell gradient of scalar field or component of vector or tensor field.

Parameters
[in]fpointer to field
[in]use_previous_tshould we use values from the previous time step ?
[in]gradient_typegradient type
[in]halo_typehalo type
[in]incif 0, solve on increment; 1 otherwise
[in]recompute_cocgshould COCG FV quantities be recomputed ?
[in]hyd_p_flagflag for hydrostatic pressure
[in]f_extexterior force generating the hydrostatic pressure
[out]gradgradient
void cs_field_gradient_scalar ( const cs_field_t f,
bool  use_previous_t,
cs_gradient_type_t  gradient_type,
cs_halo_type_t  halo_type,
int  inc,
bool  recompute_cocg,
cs_real_3_t *restrict  grad 
)

Compute cell gradient of scalar field or component of vector or tensor field.

Parameters
[in]fpointer to field
[in]use_previous_tshould we use values from the previous time step ?
[in]gradient_typegradient type
[in]halo_typehalo type
[in]incif 0, solve on increment; 1 otherwise
[in]recompute_cocgshould COCG FV quantities be recomputed ?
[out]gradgradient
void cs_field_gradient_tensor ( const cs_field_t f,
bool  use_previous_t,
cs_gradient_type_t  gradient_type,
cs_halo_type_t  halo_type,
int  inc,
cs_real_63_t *restrict  grad 
)

Compute cell gradient of tensor field.

Parameters
[in]fpointer to field
[in]use_previous_tshould we use values from the previous time step ?
[in]gradient_typegradient type
[in]halo_typehalo type
[in]incif 0, solve on increment; 1 otherwise
[out]gradgradient
void cs_field_gradient_vector ( const cs_field_t f,
bool  use_previous_t,
cs_gradient_type_t  gradient_type,
cs_halo_type_t  halo_type,
int  inc,
cs_real_33_t *restrict  grad 
)

Compute cell gradient of scalar field or component of vector or tensor field.

Parameters
[in]fpointer to field
[in]use_previous_tshould we use values from the previous time step ?
[in]gradient_typegradient type
[in]halo_typehalo type
[in]incif 0, solve on increment; 1 otherwise
[out]gradgradient
void cs_field_interpolate ( cs_field_t f,
cs_field_interpolate_t  interpolation_type,
cs_lnum_t  n_points,
const cs_lnum_t  point_location[],
const cs_real_3_t  point_coords[],
cs_real_t val 
)

Interpolate field values at a given set of points.

Parameters
[in]fpointer to field
[in]interpolation_typeinterpolation type
[in]n_pointsnumber of points at which interpolation is required
[in]point_locationlocation of points in mesh elements (based on the field location)
[in]point_coordspoint coordinates
[out]valinterpolated values