Skip to content
Snippets Groups Projects

improve generated code for import

Merged Jonas Isensee requested to merge importimprovements into dev

This improves the generated code for loading vector export and scalar export.

Expected but missing fields (previously didn't exist or were @exportoffd) no longer error immediately. It is up to the constructor of the e.g. Particle type (or importconstruct) to implement a sensible default.

In addition to that this change improves load time with 20k particles by x5-20 locally for me.

This should make some of the fix_import functions obsolete.

This breaks the matching done in add_scalar_fallback. This could now be done in importconstruct or alternatively adapt the matching. add_vector_fallback will also no longer match. An importconstruct would be easiest e.g. InPartS.ExportUtils.importconstruct(t::Type{<:MotileCell}; ∫Fax=NaN, kwargs...) = t(; ∫Fax, kwargs...)

Compat with all cell models and fix_import will need to be ensured.

Edited by Jonas Isensee

Merge request reports

Merged by Jonas IsenseeJonas Isensee 11 months ago (Jan 26, 2024 3:15pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading