My Project
programmer's documentation
Macros | Functions | Variables
cs_walldistance.c File Reference
#include "cs_defs.h"
#include <errno.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <float.h>
#include "bft_mem.h"
#include "bft_printf.h"
#include "cs_blas.h"
#include "cs_boundary.h"
#include "cs_equation.h"
#include "cs_field.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_mesh.h"
#include "cs_mesh_location.h"
#include "cs_param.h"
#include "cs_post.h"
#include "cs_reco.h"
#include "cs_walldistance.h"
Include dependency graph for cs_walldistance.c:

Macros

#define _dp3   cs_math_3_dot_product
 
#define CS_WALLDISTANCE_DBG   0
 

Functions

static void _compute_poisson_cdovcb (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_field_t *field, const cs_equation_t *eq, cs_real_t dist[])
 Compute the wall distance for a vertex+cell-based scheme Estimation based on a Poisson equation. More...
 
static void _compute_poisson_cdovb (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_field_t *field, cs_real_t dist[])
 Compute the wall distance for a vertex-based scheme Estimation based on a Poisson equation. More...
 
static void _compute_poisson_cdofb (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq, const cs_equation_t *eq, const cs_field_t *field, cs_real_t dist[])
 Compute the wall distance for a face-based scheme Estimation based on a Poisson equation. More...
 
bool cs_walldistance_is_activated (void)
 Test if the computation of the wall distance is activated. More...
 
void cs_walldistance_activate (void)
 Activate the future computation of the wall distance. More...
 
void cs_walldistance_setup (void)
 Setup the equation related to the wall distance. More...
 
void cs_walldistance_finalize_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
 Finalize the setup stage for the equation related to the wall distance. Only useful for Hamilton-Jacobi equation. More...
 
void cs_walldistance_compute (const cs_mesh_t *mesh, const cs_time_step_t *time_step, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
 Compute the wall distance. More...
 

Variables

static cs_equation_tcs_wd_poisson_eq = NULL
 

Macro Definition Documentation

◆ _dp3

#define _dp3   cs_math_3_dot_product

◆ CS_WALLDISTANCE_DBG

#define CS_WALLDISTANCE_DBG   0

Function Documentation

◆ _compute_poisson_cdofb()

static void _compute_poisson_cdofb ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq,
const cs_equation_t eq,
const cs_field_t field,
cs_real_t  dist[] 
)
static

Compute the wall distance for a face-based scheme Estimation based on a Poisson equation.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]eqpointer to the associated cs_equation_t structure
[in]fieldpointer to a cs_field_t structure
[in,out]distarray storing the wall distance to compute

◆ _compute_poisson_cdovb()

static void _compute_poisson_cdovb ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq,
const cs_field_t field,
cs_real_t  dist[] 
)
static

Compute the wall distance for a vertex-based scheme Estimation based on a Poisson equation.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]fieldpointer to a cs_field_t structure
[in,out]distarray storing the wall distance to compute

◆ _compute_poisson_cdovcb()

static void _compute_poisson_cdovcb ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq,
const cs_field_t field,
const cs_equation_t eq,
cs_real_t  dist[] 
)
static

Compute the wall distance for a vertex+cell-based scheme Estimation based on a Poisson equation.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure
[in]fieldpointer to a cs_field_t structure
[in]eqpointer to the related cs_equation_t structure
[in,out]distarray storing the wall distance to compute

◆ cs_walldistance_activate()

void cs_walldistance_activate ( void  )

Activate the future computation of the wall distance.

◆ cs_walldistance_compute()

void cs_walldistance_compute ( const cs_mesh_t mesh,
const cs_time_step_t time_step,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq 
)

Compute the wall distance.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]time_steppointer to a cs_time_step_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure

◆ cs_walldistance_finalize_setup()

void cs_walldistance_finalize_setup ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq 
)

Finalize the setup stage for the equation related to the wall distance. Only useful for Hamilton-Jacobi equation.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure

◆ cs_walldistance_is_activated()

bool cs_walldistance_is_activated ( void  )

Test if the computation of the wall distance is activated.

Returns
true if the wall distance computation is requested, false otherwise

◆ cs_walldistance_setup()

void cs_walldistance_setup ( void  )

Setup the equation related to the wall distance.

Variable Documentation

◆ cs_wd_poisson_eq

cs_equation_t* cs_wd_poisson_eq = NULL
static