perf(hex8): cache immutable paired linear Hessian
This commit is contained in:
@@ -180,6 +180,13 @@ Result<Hex8Element> Hex8Element::Create(EntityIndex index,
|
||||
return Result<Hex8Element>::Failure(
|
||||
candidate.Failure("Hex8 reference stiffness has an unrepresentable "
|
||||
"positive diagonal."));
|
||||
const Vector zero{24U};
|
||||
const auto paired = candidate.EvaluateHighLow(zero, zero, false);
|
||||
if (paired.HasValue()) {
|
||||
candidate.paired_linear_tangent_high_ = paired.Value().high.tangent;
|
||||
candidate.paired_linear_tangent_low_ = paired.Value().tangent_low;
|
||||
candidate.paired_linear_tangent_ready_ = true;
|
||||
}
|
||||
return Result<Hex8Element>::Success(std::move(candidate));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user