|
3D-ICE 3.0.0
|
#include <stdio.h>#include "types.h"#include "string_t.h"#include "dimensions.h"#include "material.h"#include "ic_element_list.h"Go to the source code of this file.
Data Structures | |
| struct | MaterialElement_t |
Typedefs | |
| typedef struct MaterialElement_t | MaterialElement_t |
Functions | |
| void | material_element_init (MaterialElement_t *melement) |
| void | material_element_copy (MaterialElement_t *dst, MaterialElement_t *src) |
| void | material_element_destroy (MaterialElement_t *melement) |
| MaterialElement_t * | material_element_calloc (void) |
| MaterialElement_t * | material_element_clone (MaterialElement_t *melement) |
| void | material_element_free (MaterialElement_t *melement) |
| bool | material_element_same_material (MaterialElement_t *melement, MaterialElement_t *other) |
| void | material_element_print (MaterialElement_t *melement, FILE *stream, String_t prefix) |
| Material_t * | get_material_at_location (MaterialElement_t *melement, CellIndex_t row_index, CellIndex_t column_index, Dimensions_t *dimensions) |
| typedef struct MaterialElement_t MaterialElement_t |
Definition of the type MaterialElement_t
Definition at line 86 of file material_element.h.
| Material_t * get_material_at_location | ( | MaterialElement_t * | melement, |
| CellIndex_t | row_index, | ||
| CellIndex_t | column_index, | ||
| Dimensions_t * | dimensions | ||
| ) |
Returns the material of a thermal cell in a given location
| melement | the address of the material element |
| row_index | the index of the row of the thermal cell |
| column_index | the index of the column of the thermal cell |
| dimensions | pointer to the structure storing the dimensions of the stack |
NULL if the material of the thermal cell in position (row_index, column_index ) is not foundDefinition at line 161 of file material_element.c.
| MaterialElement_t * material_element_calloc | ( | void | ) |
Allocates memory for a structure of type MatrerialElement_t
The content of the new structure is set to default values calling material_element_init
NULL if the memory allocation fails Definition at line 85 of file material_element.c.
| MaterialElement_t * material_element_clone | ( | MaterialElement_t * | melement | ) |
Allocates memory for a new copy of the structure mpel
| melement | the address of the structure to clone |
NULL if the memory allocation fails NULL if the parameter mpel is NULL Definition at line 100 of file material_element.c.
| void material_element_copy | ( | MaterialElement_t * | dst, |
| MaterialElement_t * | src | ||
| ) |
Copies the structure src into dst , as an assignement
The function destroys the content of dst and then makes the copy
| dst | the address of the left term sructure (destination) |
| src | the address of the right term structure (source) |
Definition at line 57 of file material_element.c.
| void material_element_destroy | ( | MaterialElement_t * | melement | ) |
Destroys the content of the fields of the structure mpel
The function releases any dynamic memory used by the structure and resets its state calling material_element_init .
| melement | the address of the structure to destroy |
Definition at line 74 of file material_element.c.
| void material_element_free | ( | MaterialElement_t * | melement | ) |
Frees the memory space pointed by melement
The function destroys the structure melement and then frees its memory. The pointer melement must have been returned by a previous call to material_element_calloc or material_element_clone .
If melement is NULL, no operation is performed.
| melement | the pointer to free |
Definition at line 117 of file material_element.c.
| void material_element_init | ( | MaterialElement_t * | melement | ) |
Inits the fields of the melement structure with default values
| melement | the address of the structure to initalize |
Definition at line 46 of file material_element.c.
| void material_element_print | ( | MaterialElement_t * | melement, |
| FILE * | stream, | ||
| String_t | prefix | ||
| ) |
Prints the material element structure as it looks in the material layout file
| melement | the address of the structure to print |
| stream | the output stream (must be already open) |
| prefix | a string to be printed as prefix at the beginning of each line |
Definition at line 141 of file material_element.c.
| bool material_element_same_material | ( | MaterialElement_t * | melement, |
| MaterialElement_t * | other | ||
| ) |
Tests if two material elements have the same Material
| melement | the first material element |
| other | the second material element |
TRUE if melement and other have the same Material FALSE otherwise Definition at line 130 of file material_element.c.