|
MGIS
|
structure in charge of handling the data associated with a material in an optimized way. Here, the "material" is defined by a behaviour and a number of integration points. More...
#include </home/runner/work/MFrontGenericInterfaceSupport/MFrontGenericInterfaceSupport/include/MGIS/Behaviour/MaterialDataManager.hxx>
Public Member Functions | |
| MaterialDataManager (const Behaviour &, const size_type) | |
| main constructor | |
| MaterialDataManager (const Behaviour &, const size_type, const MaterialDataManagerInitializer &) | |
| main constructor | |
| void | setThreadSafe (const bool) |
set if the MaterialDataManager must take care of thread-safety. This flag is mostly used in members functions allocating memory. | |
| void | allocateArrayOfTangentOperatorBlocks () |
| allocate the memory associated with the tangent operator blocks if required. | |
| void | useExternalArrayOfTangentOperatorBlocks (std::span< real >) |
| use an externally allocated memory to store the tangent operator blocks. | |
| void | releaseArrayOfTangentOperatorBlocks () |
| release the memory associated with the tangent operator blocks. | |
| void | allocateArrayOfSpeedOfSounds () |
| allocate the memory associated with the speed of sound if required. | |
| void | useExternalArrayOfSpeedOfSounds (std::span< real >) |
| use an externally allocated memory to store the tangent operator blocks. | |
| void | releaseArrayOfSpeedOfSounds () |
| release the memory associated with the tangent operator blocks. | |
| BehaviourIntegrationWorkSpace & | getBehaviourIntegrationWorkSpace () |
| return a workspace associated with the given behaviour. | |
| void | releaseBehaviourIntegrationWorkspaces () |
| clear behaviour integration workspaces. | |
| ~MaterialDataManager () | |
| destructor | |
Public Attributes | |
| MaterialStateManager | s0 |
| state at the beginning of the time step | |
| MaterialStateManager | s1 |
| state at the end of the time step | |
| std::span< real > | K |
| view of the stiffness matrices, if required. | |
| real | rdt = 1 |
| proposed time step increment increase factor | |
| std::span< real > | speed_of_sound |
| view on the speed of sound. | |
| const size_type | n |
| number of integration points | |
| const size_type | K_stride |
| the size of the stiffness matrix for one integration point (the size of K is K_stride times the number of integration points) | |
| const Behaviour & | b |
| underlying behaviour | |
structure in charge of handling the data associated with a material in an optimized way. Here, the "material" is defined by a behaviour and a number of integration points.
The following design choices were made:
main constructor
| [in] | behaviour | behaviour |
| [in] | s | number of integration points |
| mgis::behaviour::MaterialDataManager::MaterialDataManager | ( | const Behaviour & | , |
| const size_type | , | ||
| const MaterialDataManagerInitializer & | |||
| ) |
main constructor
| [in] | behaviour | behaviour |
| [in] | s | number of integration points |
| [in] | i | initializer |
| void mgis::behaviour::MaterialDataManager::allocateArrayOfSpeedOfSounds | ( | ) |
allocate the memory associated with the speed of sound if required.
This method is useless if the memory associated with the speed of sound had previously been allocated or assigned to external memory (see the MaterialDataManagerInitializer structure).
thread_safe is true. In this case, the memory allocation is guarded by a mutex. See the setThreadSafe method for details | void mgis::behaviour::MaterialDataManager::allocateArrayOfTangentOperatorBlocks | ( | ) |
allocate the memory associated with the tangent operator blocks if required.
This method is useless if the memory associated with the tangent operator blocks had previously been allocated or assigned to external memory (see the MaterialDataManagerInitializer structure).
thread_safe is true. In this case, the memory allocation is guarded by a mutex. See the setThreadSafe method for details | BehaviourIntegrationWorkSpace & mgis::behaviour::MaterialDataManager::getBehaviourIntegrationWorkSpace | ( | ) |
return a workspace associated with the given behaviour.
thread_safe member is true. | void mgis::behaviour::MaterialDataManager::releaseArrayOfSpeedOfSounds | ( | ) |
release the memory associated with the tangent operator blocks.
If the memory associated with the tangent operator blocks was handled internally, this memory is freed. If an external memory buffer was used, reference to this buffer is removed.
| void mgis::behaviour::MaterialDataManager::releaseArrayOfTangentOperatorBlocks | ( | ) |
release the memory associated with the tangent operator blocks.
If the memory associated with the tangent operator blocks was handled internally, this memory is freed. If an external memory buffer was used, reference to this buffer is removed.
| void mgis::behaviour::MaterialDataManager::releaseBehaviourIntegrationWorkspaces | ( | ) |
clear behaviour integration workspaces.
| void mgis::behaviour::MaterialDataManager::setThreadSafe | ( | const bool | ) |
set if the MaterialDataManager must take care of thread-safety. This flag is mostly used in members functions allocating memory.
| [in] | bv | boolean |
| void mgis::behaviour::MaterialDataManager::useExternalArrayOfSpeedOfSounds | ( | std::span< real > | ) |
use an externally allocated memory to store the tangent operator blocks.
| [in] | m | memory view |
releaseArrayOfSpeedOfSounds before allocating the memory. | void mgis::behaviour::MaterialDataManager::useExternalArrayOfTangentOperatorBlocks | ( | std::span< real > | ) |
use an externally allocated memory to store the tangent operator blocks.
| [in] | m | memory view |
releaseArrayOfTangentOperatorBlocks before allocating the memory. | real mgis::behaviour::MaterialDataManager::rdt = 1 |
proposed time step increment increase factor
The calling solver shall set a suitable value on input depending on its policy before each call to integrate.
For instance, if the solver want to limit the increase to 20% at most, it shall set it to 1.2. But setting it to 1, the solver won't allow the behaviour to request an increase of the time step.