Go to the source code of this file.
Macros | |
| #define | CS_VOLUME_ZONE_INITIALIZATION (1 << 0) |
| #define | CS_VOLUME_ZONE_POROSITY (1 << 1) |
| #define | CS_VOLUME_ZONE_HEAD_LOSS (1 << 2) |
| #define | CS_VOLUME_ZONE_SOURCE_TERM (1 << 3) |
| #define | CS_VOLUME_ZONE_MASS_SOURCE_TERM (1 << 4) |
| #define | CS_VOLUME_ZONE_GWF_SOIL (1 << 5) |
| #define | CS_VOLUME_ZONE_SOLID (1 << 6) |
| #define | CS_VOLUME_ZONE_PHYSICAL_PROPERTIES (1 << 7) |
Functions | |
| void | cs_volume_zone_initialize (void) |
| Initialize volume zone structures. | |
| void | cs_volume_zone_finalize (void) |
| Free all volume zone structures. | |
| int | cs_volume_zone_n_zones (void) |
| Return number of volume zones defined. | |
| int | cs_volume_zone_n_zones_time_varying (void) |
| Return number of volume zones which may vary in time. | |
| void | cs_volume_zone_build_all (bool mesh_modified) |
| Update association of volume zones with a mesh. | |
| int | cs_volume_zone_define (const char *name, const char *criteria, int type_flag) |
| Define a new volume zone using a selection criteria string. | |
| int | cs_volume_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. | |
| const cs_zone_t * | cs_volume_zone_by_id (int id) |
| Return a pointer to a volume zone based on its id. | |
| const cs_zone_t * | cs_volume_zone_by_name (const char *name) |
| Return a pointer to a volume zone based on its name if present. | |
| const cs_zone_t * | cs_volume_zone_by_name_try (const char *name) |
| Return a pointer to a volume zone based on its name if present. | |
| int | cs_volume_zone_id_by_name (const char *z_name) |
| Retrieve the volume zone id from its zone name. If the zone name is equal to NULL or has an empty length, then the default zone id (=0) corresponding to all entities is returned. | |
| void | cs_volume_zone_set_type (int id, int type_flag) |
| Set type flag for a given volume zone. | |
| void | cs_volume_zone_set_time_varying (int id, bool time_varying) |
| Set time varying behavior for a given volume zone. | |
| void | cs_volume_zone_set_overlay (int id, bool allow_overlay) |
| Set overlay behavior for a given volume zone. | |
| const int * | cs_volume_zone_cell_zone_id (void) |
| Return pointer to zone id associated with each cell. | |
| void | cs_volume_zone_log_info (const cs_zone_t *z) |
| Print info relative to a given volume zone to log file. | |
| void | cs_volume_zone_log_setup (void) |
| Log setup information relative to defined volume zones. | |
| int | cs_volume_zone_n_type_zones (int type_flag) |
| Return number of volume zones associated with a given zone flag. | |
| cs_lnum_t | cs_volume_zone_n_type_cells (int type_flag) |
| Return number of volume zone cells associated with a given zone flag. | |
| void | cs_volume_zone_select_type_cells (int type_flag, cs_lnum_t cell_ids[]) |
| Select cells associated with volume zones of a given type. | |
| void | cs_volume_zone_tag_cell_type (int zone_type_flag, int tag_value, int tag[]) |
| Tag cells of a given zone type. | |
| void | cs_volume_zone_print_info (void) |
| Print volume zones information to listing file. | |
| void cs_volume_zone_build_all | ( | bool | mesh_modified | ) |
Update association of volume zones with a mesh.
For time-varying zones, the associated mesh location is updated.
| [in] | mesh_modified | indicate if mesh has been modified |
| const cs_zone_t * cs_volume_zone_by_id | ( | int | id | ) |
Return a pointer to a volume zone based on its id.
This function requires that a volume zone of the given id is defined.
| [in] | id | zone id |
| const cs_zone_t * cs_volume_zone_by_name | ( | const char * | name | ) |
Return a pointer to a volume zone based on its name if present.
This function requires that a volume zone of the given name is defined.
| [in] | name | volume zone name |
| const cs_zone_t * cs_volume_zone_by_name_try | ( | const char * | name | ) |
Return a pointer to a volume zone based on its name if present.
If no volume zone of the given name is defined, returned pointer is null.
| [in] | name | volume zone name |
If no volume zone of the given name is defined, nullptr is returned.
| [in] | name | volume zone name |
| const int * cs_volume_zone_cell_zone_id | ( | void | ) |
Return pointer to zone id associated with each cell.
In case of overlayed zones, the highest zone id associated with a given cell is given.
| int cs_volume_zone_define | ( | const char * | name, |
| const char * | criteria, | ||
| int | type_flag ) |
Define a new volume 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_volume_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 |
| void cs_volume_zone_finalize | ( | void | ) |
Free all volume zone structures.
| int cs_volume_zone_id_by_name | ( | const char * | z_name | ) |
Retrieve the volume zone id from its zone name. If the zone name is equal to NULL or has an empty length, then the default zone id (=0) corresponding to all entities is returned.
| [in] | z_name | name of the zone or NULL or "" |
Retrieve the volume zone id from its zone name. If the zone name is equal to NULL or has an empty length, then the default zone id (=0) corresponding to all entities is returned.
| [in] | z_name | name of the zone or nullptr or "" |
| void cs_volume_zone_initialize | ( | void | ) |
Initialize volume zone structures.
This defines a default volume zone. This is the first function of the volume zone handling functions which should be called, and it should only be called after cs_mesh_location_initialize.
| void cs_volume_zone_log_info | ( | const cs_zone_t * | z | ) |
Print info relative to a given volume zone to log file.
| [in] | z | pointer to volume zone structure |
| void cs_volume_zone_log_setup | ( | void | ) |
Log setup information relative to defined volume zones.
| cs_lnum_t cs_volume_zone_n_type_cells | ( | int | type_flag | ) |
Return number of volume zone cells associated with a given zone flag.
Note that in the case of overlapping zones, a cell may be accounted for multiple times.
| [in] | type_flag | flag to compare to zone type |
| int cs_volume_zone_n_type_zones | ( | int | type_flag | ) |
Return number of volume zones associated with a given zone flag.
| [in] | type_flag | flag to compare to zone type |
| int cs_volume_zone_n_zones | ( | void | ) |
Return number of volume zones defined.
| int cs_volume_zone_n_zones_time_varying | ( | void | ) |
Return number of volume zones which may vary in time.
| void cs_volume_zone_print_info | ( | void | ) |
Print volume zones information to listing file.
| void cs_volume_zone_select_type_cells | ( | int | type_flag, |
| cs_lnum_t | cell_ids[] ) |
Select cells associated with volume zones of a given type.
Note that in the case of overlapping zones, a cell may be accounted for multiple times.
| [in] | type_flag | flag to compare to zone type |
| [out] | cell_ids | ids of selected cells (size: given by cs_volume_zone_n_type_cells) |
| void cs_volume_zone_set_overlay | ( | int | id, |
| bool | allow_overlay ) |
Set overlay behavior for a given volume zone.
| [in] | id | volume zone id |
| [in] | allow_overlay | true if the zone may be overlayed by another |
| void cs_volume_zone_set_time_varying | ( | int | id, |
| bool | time_varying ) |
Set time varying behavior for a given volume zone.
| [in] | id | volume zone id |
| [in] | time_varying | true if the zone's definition varies in time |
| void cs_volume_zone_set_type | ( | int | id, |
| int | type_flag ) |
Set type flag for a given volume zone.
| [in] | id | volume zone id |
| [in] | type_flag | volume zone type flag |
| void cs_volume_zone_tag_cell_type | ( | int | zone_type_flag, |
| int | tag_value, | ||
| int | tag[] ) |
Tag cells of a given zone type.
The tag array should be initialized. The given tag_value is associted to cells of the given zone type using a logical "or", so multiple flag bits can be handled using the same array if necessary.
| [in] | zone_type_flag | zone types to tag |
| [in] | tag_value | tag value to add to cells of matching zones |
| [in,out] | tag | tag value for each cell |