8.3
general documentation
cs_domain.h File Reference
#include <stdbool.h>
#include "cs_boundary.h"
#include "cs_cdo_connect.h"
#include "cs_cdo_quantities.h"
#include "cs_mesh.h"
#include "cs_mesh_quantities.h"
#include "cs_param_cdo.h"
#include "cs_time_step.h"
#include "cs_timer.h"
#include "cs_xdef.h"
+ Include dependency graph for cs_domain.h:

Go to the source code of this file.

Data Structures

struct  cs_domain_cdo_context_t
 High-level metadata for handling CDO/HHO schemes. More...
 
struct  cs_domain_t
 Structure storing the main features of the computational domain and pointers to the main geometrical structures. More...
 

Enumerations

enum  cs_domain_stage_t {
  CS_DOMAIN_STAGE_BEFORE_STEADY_COMPUTATION , CS_DOMAIN_STAGE_BEFORE_TIME_LOOP , CS_DOMAIN_STAGE_TIME_STEP_BEGIN , CS_DOMAIN_STAGE_TIME_STEP_SUB_ITERATION ,
  CS_DOMAIN_STAGE_TIME_STEP_END , CS_DOMAIN_STAGE_AFTER_TIME_LOOP , CS_DOMAIN_N_STAGES
}
 Indicator describing at which stage is the computation. More...
 

Functions

static void cs_domain_increment_time_step (cs_domain_t *domain)
 Update the time step after one temporal iteration. More...
 
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, cs_param_cdo_mode_t mode)
 Set the global variable storing the mode of activation to apply to CDO/HHO schemes. Deprecated way to set the CDO mode. More...
 
int cs_domain_get_cdo_mode (const cs_domain_t *domain)
 Get the mode of activation for the CDO/HHO schemes. Deprecated way to retrieve the CDO mode. More...
 
void cs_domain_set_output_param (cs_domain_t *domain, int restart_nt, int log_nt, int verbosity)
 Set parameters related to the way output/logging is done. 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)
 Check if an output is requested according to the domain setting. More...
 
void cs_domain_increment_time (cs_domain_t *domain)
 Update time step after one temporal iteration. More...
 

Variables

cs_domain_tcs_glob_domain
 

Enumeration Type Documentation

◆ cs_domain_stage_t

Indicator describing at which stage is the computation.

This indicator is useful to know at which stage the computation is when a user-defined function is called (for instance cs_user_physical_properties). Up to now, this information is only used in the CDO module.

Enumerator
CS_DOMAIN_STAGE_BEFORE_STEADY_COMPUTATION 

The computation run is at a stage before computing the steady-state equations

CS_DOMAIN_STAGE_BEFORE_TIME_LOOP 

The computation run is at a stage before starting the time loop and after solving all steady-state equations

CS_DOMAIN_STAGE_TIME_STEP_BEGIN 

The computation run is inside the time loop and at the beginning of a time step

CS_DOMAIN_STAGE_TIME_STEP_SUB_ITERATION 

The computation run is inside the time loop and inside a sub-iteration process

CS_DOMAIN_STAGE_TIME_STEP_END 

The computation run is inside the time loop and at the end of an iteration but before the computation of user-defined equation (not triggered by a user)

CS_DOMAIN_STAGE_AFTER_TIME_LOOP 

The computation run is at a stage after the time loop (finalize stage). This stage is useful to free memory allocated during the computation.

CS_DOMAIN_N_STAGES 

Function Documentation

◆ 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. Deprecated way to retrieve the CDO mode.

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 time step after one temporal iteration.

Parameters
[in,out]domainpointer to a cs_domain_t structure

Update time step after one temporal iteration.

Parameters
[in,out]domainpointer to a cs_domain_t structure

◆ cs_domain_increment_time_step()

static void cs_domain_increment_time_step ( cs_domain_t domain)
inlinestatic

Update the 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)

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

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

◆ cs_domain_set_cdo_mode()

void cs_domain_set_cdo_mode ( cs_domain_t domain,
cs_param_cdo_mode_t  mode 
)

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

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

◆ cs_domain_set_output_param()

void cs_domain_set_output_param ( cs_domain_t domain,
int  restart_nt,
int  log_nt,
int  verbosity 
)

Set parameters related to the way output/logging is done.

Parameters
[in,out]domainpointer to a cs_domain_t structure
[in]restart_ntfrequency for the restart process
[in]log_ntoutput frequency into the log (> 0: constant with the given frequency, < 0: automatic with log_nt first iterations detailed)
[in]verbositylevel of information displayed
[in,out]domainpointer to a cs_domain_t structure
[in]restart_ntfrequency for the restart process
[in]log_ntoutput frequency into the log (> 0: constant with the given frequency, < 0: automatic with log_nt first iterations detailed, 0: do nothing)
[in]verbositylevel of information displayed

◆ 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

◆ cs_glob_domain

cs_domain_t* cs_glob_domain
extern