My Project
programmer's documentation
|
#include "cs_defs.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <mpi.h>
#include <ple_locator.h>
#include "bft_mem.h"
#include "bft_error.h"
#include "bft_printf.h"
#include "cs_base.h"
#include "cs_flag_check.h"
#include "cs_log.h"
#include "cs_map.h"
#include "cs_mesh.h"
#include "cs_mesh_location.h"
#include "cs_mesh_quantities.h"
#include "cs_parall.h"
#include "cs_parameters.h"
#include "cs_boundary_zone.h"
Functions | |
void | cs_boundary_zone_initialize (void) |
Initialize boundary zone structures. More... | |
void | cs_boundary_zone_finalize (void) |
Free all boundary zone structures. More... | |
int | cs_boundary_zone_n_zones (void) |
Return number of boundary zones defined. More... | |
int | cs_boundary_zone_n_zones_time_varying (void) |
Return number of boundary zones which may vary in time. More... | |
void | cs_boundary_zone_build_private (int id) |
Update association of a given private boundary zone with a mesh. More... | |
void | cs_boundary_zone_build_all (bool mesh_modified) |
Update association of boundary zones with a mesh. More... | |
int | cs_boundary_zone_define (const char *name, const char *criteria, int type_flag) |
Define a new boundary zone using a selection criteria string. More... | |
int | cs_boundary_zone_define_by_func (const char *name, cs_mesh_location_select_t *func, void *input, int type_flag) |
Define a new mesh location with an associated selection function. More... | |
const cs_zone_t * | cs_boundary_zone_by_id (int id) |
Return a pointer to a boundary zone based on its id. More... | |
const cs_zone_t * | cs_boundary_zone_by_name (const char *name) |
Return a pointer to a boundary zone based on its name if present. More... | |
const cs_zone_t * | cs_boundary_zone_by_name_try (const char *name) |
Return a pointer to a boundary zone based on its name if present. More... | |
void | cs_boundary_zone_set_type (int id, int type_flag) |
Set type flag for a given boundary zone. More... | |
void | cs_boundary_zone_set_time_varying (int id, bool time_varying) |
Set time varying behavior for a given boundary zone. More... | |
void | cs_boundary_zone_set_overlay (int id, bool allow_overlay) |
Set overlay behavior for a given boundary zone. More... | |
const int * | cs_boundary_zone_face_zone_id (void) |
Return pointer to zone id associated with each boundary face. More... | |
void | cs_boundary_zone_log_info (const cs_zone_t *z) |
Print info relative to a given boundary zone to log file. More... | |
void | cs_boundary_zone_log_setup (void) |
Log setup information relative to defined boundary zones. More... | |
int | cs_boundary_zone_n_type_zones (int type_flag) |
Return number of boundary zones associated with a given zone flag. More... | |
int * | cs_boundary_zone_face_class_id (void) |
Get pointer to optional boundary face class ids. More... | |
void | cs_boundary_zone_update_face_class_id (void) |
Update boundary face output class ids if present. More... | |
const int * | cs_boundary_zone_face_class_or_zone_id (void) |
Get read pointer to optional boundary face class or zone ids. More... | |
int | cs_boundary_zone_max_class_or_zone_id (void) |
Return the maximum defined face class or zone id. More... | |
void | cs_boundary_zone_print_info (void) |
Print boundary zones information to listing file. More... | |
Boundary zone handling.
void cs_boundary_zone_build_all | ( | bool | mesh_modified | ) |
Update association of boundary zones with a mesh.
For time-varying zones, the associated mesh location is updated.
[in] | mesh_modified | indicate if mesh has been modified |
void cs_boundary_zone_build_private | ( | int | id | ) |
Update association of a given private boundary zone with a mesh.
For time-varying zones, the associated mesh location is updated.
[in] | id | zone id |
const cs_zone_t* cs_boundary_zone_by_id | ( | int | id | ) |
Return a pointer to a boundary zone based on its id.
This function requires that a boundary zone of the given id is defined.
[in] | id | zone id |
const cs_zone_t* cs_boundary_zone_by_name | ( | const char * | name | ) |
Return a pointer to a boundary zone based on its name if present.
This function requires that a boundary zone of the given name is defined.
[in] | name | boundary zone name |
const cs_zone_t* cs_boundary_zone_by_name_try | ( | const char * | name | ) |
Return a pointer to a boundary zone based on its name if present.
If no boundary zone of the given name is defined, NULL is returned.
[in] | name | boundary zone name |
int cs_boundary_zone_define | ( | const char * | name, |
const char * | criteria, | ||
int | type_flag | ||
) |
Define a new boundary zone using a selection criteria string.
[in] | name | name of location to define |
[in] | criteria | selection criteria for associated elements |
[in] | type_flag | mask of zone category values |
int cs_boundary_zone_define_by_func | ( | const char * | name, |
cs_mesh_location_select_t * | func, | ||
void * | input, | ||
int | type_flag | ||
) |
Define a new mesh location with an associated selection function.
So as to define a subset of mesh entities of a given type, a pointer to a selection function may be given.
This requires more programming but allows finer control than selection criteria, as the function has access to the complete mesh structure.
[in] | name | name of location to define |
[in] | func | pointer to selection function for associated elements |
[in,out] | input | pointer to optional (untyped) value or structure. |
[in] | type_flag | mask of zone category values |
int* cs_boundary_zone_face_class_id | ( | void | ) |
Get pointer to optional boundary face class ids.
For each boundary face, a specific output (logging and postprocessing) class id may be assigned. This allows realizing logging, postprocessing, or otherwise extracting data based on this class.
Using this function at a given point indicates that user-defined class ids will be used. The face class ids are initially equal to the face zone ids, but may be modified by the user.
In the presence of a time-varying mesh or boundary zones, the face class ids will be reset to the zone ids, so it may be necessary to update the user definitions.
The class id values are arbitrarily chosen by the user, but must be positive integers; numbers do not need to be contiguous, but very high numbers may also lead to higher memory consumption.
const int* cs_boundary_zone_face_class_or_zone_id | ( | void | ) |
Get read pointer to optional boundary face class or zone ids.
If no face classes have been defined by cs_boundary_zone_face_class_id the boundary face zone id is returned instead.
const int* cs_boundary_zone_face_zone_id | ( | void | ) |
Return pointer to zone id associated with each boundary face.
In case of overlayed zones, the highest zone id associated with a given face is given. Private (automatically defined) zones are excluded from this definition.
void cs_boundary_zone_finalize | ( | void | ) |
Free all boundary zone structures.
void cs_boundary_zone_initialize | ( | void | ) |
Initialize boundary zone structures.
This defines a default boundary zone. This is the first function of the boundary zone handling functions which should be called, and it should only be called after cs_mesh_location_initialize.
void cs_boundary_zone_log_info | ( | const cs_zone_t * | z | ) |
Print info relative to a given boundary zone to log file.
[in] | z | pointer to boundary zone structure |
void cs_boundary_zone_log_setup | ( | void | ) |
Log setup information relative to defined boundary zones.
int cs_boundary_zone_max_class_or_zone_id | ( | void | ) |
Return the maximum defined face class or zone id.
This value is valid only if cs_boundary_zone_update_face_class_id
int cs_boundary_zone_n_type_zones | ( | int | type_flag | ) |
Return number of boundary zones associated with a given zone flag.
Private (automatic) zones are excluded from this count.
[in] | type_flag | flag to compare to zone type |
int cs_boundary_zone_n_zones | ( | void | ) |
Return number of boundary zones defined.
int cs_boundary_zone_n_zones_time_varying | ( | void | ) |
Return number of boundary zones which may vary in time.
void cs_boundary_zone_print_info | ( | void | ) |
Print boundary zones information to listing file.
void cs_boundary_zone_set_overlay | ( | int | id, |
bool | allow_overlay | ||
) |
Set overlay behavior for a given boundary zone.
[in] | id | boundary zone id |
[in] | allow_overlay | true if the zone may be overlayed by another |
void cs_boundary_zone_set_time_varying | ( | int | id, |
bool | time_varying | ||
) |
Set time varying behavior for a given boundary zone.
[in] | id | boundary zone id |
[in] | time_varying | true if the zone's definition varies in time |
void cs_boundary_zone_set_type | ( | int | id, |
int | type_flag | ||
) |
Set type flag for a given boundary zone.
[in] | id | boundary zone id |
[in] | type_flag | volume zone type flag |
void cs_boundary_zone_update_face_class_id | ( | void | ) |
Update boundary face output class ids if present.
Face class ids lower than 0 are replaced by the matching face zone id.