perf(allocations): reduced overall allocations by 95%, increaseed jacobian applicatin by 2x
This commit uses global pre allocated work space to dramatically reduce memory usage and allocation time
This commit is contained in:
@@ -14,6 +14,7 @@ export import :utils.misc;
|
||||
export import :utils.user;
|
||||
export import :quadrature.mfem;
|
||||
export import :field.mfem;
|
||||
export import :fem.reference_tables;
|
||||
|
||||
export namespace mean_field::fem {
|
||||
using GravityField = field::Field<field::Gravity>;
|
||||
@@ -145,6 +146,13 @@ export namespace mean_field::fem {
|
||||
[[nodiscard]] bool has_mapping() const {
|
||||
return domainMapperStateless != nullptr && displacement != nullptr && compactificationCoordinate != nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]] const ReferenceTableCache &GetReferenceTables() const {
|
||||
return *m_reference_tables;
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<ReferenceTableCache> m_reference_tables{std::make_unique<ReferenceTableCache>()};
|
||||
};
|
||||
|
||||
FEM setup_fem(
|
||||
|
||||
Reference in New Issue
Block a user