perf(jacobian-action): major updates to jacobian action application by removing redudant quadrature work. ~5x increase in speed
This commit is contained in:
@@ -12,9 +12,10 @@ module mean_field;
|
||||
import :operators.kernels.pressure_force;
|
||||
|
||||
namespace {
|
||||
namespace eos = mean_field::eos;
|
||||
namespace dimensions = mean_field::dimensions;
|
||||
namespace eos = mean_field::eos;
|
||||
|
||||
using DomainSchema = mean_field::utils::domain::CoreEnvelopeVacuumDomainSchema;
|
||||
using DomainSchema = mean_field::utils::domain::CoreEnvelopeVacuumDomainSchema;
|
||||
|
||||
[[nodiscard]] bool is_vacuum_attribute(const int attribute) {
|
||||
return DomainSchema::template attribute_belongs_to<mean_field::utils::domain::Vacuum>(attribute);
|
||||
@@ -416,14 +417,15 @@ namespace {
|
||||
|
||||
if (pressureForceAction == PressureForceAction::residual ||
|
||||
pressureForceAction == PressureForceAction::displacement) {
|
||||
pressureFactor =
|
||||
eos::evaluate<eos::quantity::Pressure>(barotrope, eos::SpecificEnthalpyValue{enthalpyValue})
|
||||
.value();
|
||||
pressureFactor = eos::evaluate<dimensions::quantity::Pressure>(
|
||||
barotrope, dimensions::SpecificEnthalpyValue{enthalpyValue}
|
||||
)
|
||||
.value();
|
||||
} else {
|
||||
const double enthalpyVariationValue = elementEnthalpyVariation * enthalpyShape;
|
||||
|
||||
pressureFactor = eos::partialDerivative<eos::quantity::Pressure, eos::quantity::SpecificEnthalpy>(
|
||||
barotrope, eos::SpecificEnthalpyValue{enthalpyValue}
|
||||
barotrope, dimensions::SpecificEnthalpyValue{enthalpyValue}
|
||||
)
|
||||
.value() *
|
||||
enthalpyVariationValue;
|
||||
|
||||
Reference in New Issue
Block a user