7.3
general documentation
cs_domain.c File Reference

Manage a computational domain. More...

#include "cs_defs.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <locale.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_boundary_zone.h"
#include "cs_coupling.h"
#include "cs_log.h"
#include "cs_math.h"
#include "cs_mesh_location.h"
#include "cs_property.h"
#include "cs_prototypes.h"
#include "cs_quadrature.h"
#include "cs_restart.h"
#include "cs_time_step.h"
#include "cs_domain.h"
+ Include dependency graph for cs_domain.c:

Functions

cs_domain_tcs_domain_create (void)
 Create and initialize by default a cs_domain_t structure. More...
 
void cs_domain_free (cs_domain_t **p_domain)
 Free a cs_domain_t structure. More...
 
void cs_domain_set_cdo_mode (cs_domain_t *domain, int mode)
 Set the global variable storing the mode of activation to apply to CDO/HHO schemes. More...
 
int cs_domain_get_cdo_mode (const cs_domain_t *domain)
 Get the mode of activation for the CDO/HHO schemes. More...
 
void cs_domain_set_stage (cs_domain_t *domain, cs_domain_stage_t stage)
 Set the computation stage in the domain structure. More...
 
cs_domain_stage_t cs_domain_get_stage (const cs_domain_t *domain)
 Retrieve the computation stage from the domain structure. More...
 
bool cs_domain_needs_iteration (cs_domain_t *domain)
 Check if one needs to continue iterations in time. More...
 
bool cs_domain_needs_log (const cs_domain_t *domain, bool oneplus)
 Check if an output is requested according to the domain setting. More...
 
void cs_domain_increment_time (cs_domain_t *domain)
 Update the simulated time after one temporal iteration. More...
 
void cs_domain_cdo_log (const cs_domain_t *domain)
 Print a welcome message indicating which mode of CDO is activated. More...
 

Variables

cs_domain_tcs_glob_domain = NULL
 
static const char _err_empty_domain []
 
static double cs_domain_kahan_time_compensation = 0.0
 

Detailed Description

Manage a computational domain.

  • Settings, fields, connectivities and geometrical quantities
  • Properties and advection fields attached to this domain
  • Equations to solve on this domain

Function Documentation

◆ cs_domain_cdo_log()

void cs_domain_cdo_log ( const cs_domain_t domain)

Print a welcome message indicating which mode of CDO is activated.

Parameters
[in]domainpointer to a cs_domain_t structure

◆ cs_domain_create()

cs_domain_t* cs_domain_create ( void  )

Create and initialize by default a cs_domain_t structure.

Returns
a pointer to a cs_domain_t structure

◆ cs_domain_free()

void cs_domain_free ( cs_domain_t **  p_domain)

Free a cs_domain_t structure.

Parameters
[in,out]p_domainpointer of pointer to a cs_domain_t structure

◆ cs_domain_get_cdo_mode()

int cs_domain_get_cdo_mode ( const cs_domain_t domain)

Get the mode of activation for the CDO/HHO schemes.

Parameters
[in]domainpointer to a cs_domain_t structure
Returns
the mode of activation for the CDO/HHO module

◆ cs_domain_get_stage()

cs_domain_stage_t cs_domain_get_stage ( const cs_domain_t domain)

Retrieve the computation stage from the domain structure.

Parameters
[in]domainpointer to a cs_domain_t structure
Returns
the current stage in the computation run

◆ cs_domain_increment_time()

void cs_domain_increment_time ( cs_domain_t domain)

Update the simulated time after one temporal iteration.

Update time step after one temporal iteration.

Parameters
[in,out]domainpointer to a cs_domain_t structure

◆ cs_domain_needs_iteration()

bool cs_domain_needs_iteration ( cs_domain_t domain)

Check if one needs to continue iterations in time.

Parameters
[in,out]domainpointer to a cs_domain_t structure
Returns
true or false

◆ cs_domain_needs_log()

bool cs_domain_needs_log ( const cs_domain_t domain,
bool  oneplus 
)

Check if an output is requested according to the domain setting.

Parameters
[in]domainpointer to a cs_domain_t structure
[in]oneplusadd or not plus one to the current time step
Returns
true or false

◆ cs_domain_set_cdo_mode()

void cs_domain_set_cdo_mode ( cs_domain_t domain,
int  mode 
)

Set the global variable storing the mode of activation to apply to CDO/HHO schemes.

Parameters
[in,out]domainpointer to a cs_domain_t structure
[in]modetype of activation for the CDO/HHO module

◆ cs_domain_set_stage()

void cs_domain_set_stage ( cs_domain_t domain,
cs_domain_stage_t  stage 
)

Set the computation stage in the domain structure.

Parameters
[in,out]domainpointer to a cs_domain_t structure
[in]stagestage in the computation run

Variable Documentation

◆ _err_empty_domain

const char _err_empty_domain[]
static
Initial value:
=
" Stop setting an empty cs_domain_t structure.\n"
" Please check your settings.\n"

◆ cs_domain_kahan_time_compensation

double cs_domain_kahan_time_compensation = 0.0
static

◆ cs_glob_domain

cs_domain_t* cs_glob_domain = NULL