Skip to content

feat: add custom result objects to integrate_strain_profile#326

Merged
mortenengen merged 3 commits intodevfrom
feat/results-integrate
Mar 16, 2026
Merged

feat: add custom result objects to integrate_strain_profile#326
mortenengen merged 3 commits intodevfrom
feat/results-integrate

Conversation

@talledodiego
Copy link
Collaborator

This is a proposal for adding a custom result object also for method integrate_strain_profile. In this case two different results are available: IntegrateStrainStiffnessResult when integrating modulus, and IntegrateStrainForceResult when integrating stresses.
They both have methods like asarray for having the array representation.

Optionally we could evaluate if needed to implement

def __iter__(self):
    yield self.n
    yield self.m_y
    yield self.m_z

def __len__(self):
    return 3

def __getitem__(self, i):
    return (self.n, self.m_y, self.m_z)[i]

But I have the feeling it might be less transparent.

@mortenengen mortenengen added the enhancement New feature or request label Mar 16, 2026
@mortenengen mortenengen moved this to Under review 👀 in PR tracker Mar 16, 2026
@mortenengen mortenengen changed the title add custom result objects to integrate_strain_profile feat: add custom result objects to integrate_strain_profile Mar 16, 2026
Copy link
Member

@mortenengen mortenengen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this useful contribution!

@mortenengen mortenengen merged commit d9d4fb7 into dev Mar 16, 2026
4 checks passed
@github-project-automation github-project-automation bot moved this from Under review 👀 to Done 🚀 in PR tracker Mar 16, 2026
@mortenengen mortenengen deleted the feat/results-integrate branch March 16, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done 🚀

Development

Successfully merging this pull request may close these issues.

2 participants