Files
FESADev/src/fesa/elements/hex8_linear_tangent_cache.h
T

22 lines
750 B
C++

#ifndef FESA_SRC_FESA_ELEMENTS_HEX8_LINEAR_TANGENT_CACHE_H_
#define FESA_SRC_FESA_ELEMENTS_HEX8_LINEAR_TANGENT_CACHE_H_
#include <mutex>
#include "fesa/math/matrix.h"
namespace fesa::hex8_internal {
/// @brief Shares one immutable paired Hessian among identical element copies.
/// @note Only call_once preparation writes. Linear readers synchronize through
/// the flag; nonlinear trials do not access this optional state. At most two
/// 24-by-24 matrices (9216 value bytes) are retained after successful preparation.
struct LinearTangentCache {
std::once_flag preparation;
bool ready{false};
Matrix high{0U, 0U};
Matrix low{0U, 0U};
};
} // namespace fesa::hex8_internal
#endif // FESA_SRC_FESA_ELEMENTS_HEX8_LINEAR_TANGENT_CACHE_H_