Commit 5da19067 authored by Alice MAISON's avatar Alice MAISON

Upload src

parent c3cb8bc7
/*----------------------------------------------------------------------------*/
/*
This file is generated by Code_Saturne, a general-purpose CFD tool.
*/
/*----------------------------------------------------------------------------*/
#include "cs_defs.h"
/*----------------------------------------------------------------------------
* Standard C library headers
*----------------------------------------------------------------------------*/
#include <assert.h>
#include <math.h>
#if defined(HAVE_MPI)
#include <mpi.h>
#endif
/*----------------------------------------------------------------------------
* Local headers
*----------------------------------------------------------------------------*/
#include "cs_headers.h"
/*----------------------------------------------------------------------------*/
BEGIN_C_DECLS
/*----------------------------------------------------------------------------*/
cs_real_t *
cs_meg_source_terms(const cs_zone_t *zone,
const char *name,
const char *source_type)
{
cs_real_t *new_vals = NULL;
/*----------------------------------------------------*/
/* User defined source term for traceur over zone rue */
if (strcmp(zone->name, "rue") == 0 &&
strcmp(name, "traceur") == 0 &&
strcmp(source_type, "scalar_source_term") == 0 ) {
const int vals_size = zone->n_elts * 2;
BFT_MALLOC(new_vals, vals_size, cs_real_t);
const cs_real_t volume = zone->measure;
for (cs_lnum_t e_id = 0; e_id < zone->n_elts; e_id++) {
cs_lnum_t c_id = zone->elt_ids[e_id];
new_vals[2 * e_id + 0] = 1 / volume ;
new_vals[2 * e_id + 1] = 0 ;
}
}
/*----------------------------------------------------*/
return new_vals;
}
/*----------------------------------------------------------------------------*/
END_C_DECLS
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment