Arbitrary block attributes data structure.
More...
#include <src/multi_indices/MaterialBlocks.hpp>
Arbitrary block attributes data structure.
- Examples
- mesh_insert_interface_atom.cpp.
Definition at line 81 of file MaterialBlocks.hpp.
◆ BlockSetAttributes()
MoFEM::BlockSetAttributes::BlockSetAttributes |
( |
| ) |
|
|
inline |
◆ __attribute__()
struct MoFEM::BlockSetAttributes::__attribute__ |
( |
(packed) |
| ) |
|
|
inline |
◆ fill_data()
get data from structure
- Parameters
-
attributes | vector of doubles |
- Returns
- error code
Reimplemented from MoFEM::GenericAttributeData.
Definition at line 108 of file MaterialBlocks.hpp.
110 if (8 * attributes.size() >
sizeof(
data)) {
112 "data inconsistency, please review the number of material "
113 "properties defined");
116 memcpy(&
data, &attributes[0], 8 * attributes.size());
◆ getDataPtr()
const void* MoFEM::BlockSetAttributes::getDataPtr |
( |
| ) |
const |
|
inlinevirtual |
◆ getSizeOfData()
std::size_t MoFEM::BlockSetAttributes::getSizeOfData |
( |
| ) |
const |
|
inlinevirtual |
◆ set_data()
MoFEMErrorCode MoFEM::BlockSetAttributes::set_data |
( |
void * |
tag_ptr, |
|
|
unsigned int |
size |
|
) |
| const |
|
inlinevirtual |
set data on structure
- Parameters
-
tag_ptr | pointer to tag on meshset |
size | size of data in bytes |
- Returns
- error code
Reimplemented from MoFEM::GenericAttributeData.
Definition at line 119 of file MaterialBlocks.hpp.
121 if (size >
sizeof(
data)) {
123 "data inconsistency, please review the number of material "
124 "properties defined");
126 memcpy(tag_ptr, &
data, size);
◆ operator<<
Print data.
Definition at line 8 of file MaterialBlocks.cpp.
9 os << std::endl <<
"Blcok attributes" << std::endl;
10 os <<
"-------------------" << std::endl;
11 os <<
"User attribute 1 = " << e.data.User1 << std::endl;
12 os <<
"User attribute 2 = " << e.data.User2 << std::endl;
13 os <<
"User attribute 3 = " << e.data.User3 << std::endl;
14 os <<
"User attribute 4 = " << e.data.User4 << std::endl;
15 os <<
"User attribute 5 = " << e.data.User5 << std::endl;
16 os <<
"User attribute 6 = " << e.data.User6 << std::endl;
17 os <<
"User attribute 7 = " << e.data.User7 << std::endl;
18 os <<
"User attribute 8 = " << e.data.User7 << std::endl;
19 os <<
"User attribute 9 = " << e.data.User7 << std::endl;
20 os <<
"User attribute 10 = " << e.data.User10 << std::endl << std::endl;
◆ data
_data_ MoFEM::BlockSetAttributes::data |
The documentation for this struct was generated from the following file: