Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalised cylinder #86

Merged
merged 28 commits into from
Sep 6, 2020

Conversation

elias-soltani
Copy link
Contributor

I would like to add a new utility for generating a generalised cylinder (with ellipse/circle base, could be a truncated cone as well) scaffold, please.

Copy link
Member

@rchristie rchristie left a comment

Choose a reason for hiding this comment

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

Some fixes needed.
I haven't reviewed the whole body. I don't want to receive it in the same PR. Note whole body doesn't work for me as missing torso terms file?
I also need to spend more time reviewing cylindermesh, but would like some fixes done first.
Generation was slow - found source due to 2 calls to Fieldmodule beginChange, but one endChange. You don't need these in scaffold any more, but may want in utilities.

Comment on lines 35 to 37
'Refine number of elements along' : 1,
'Refine number of elements across' : 1,
'Refine number of elements up' : 1
Copy link
Member

Choose a reason for hiding this comment

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

You can't actually have a different refine number of elements across the major and minor directions due to the triple point elements. Hence remove one of these. In ventricles3 I use 'surface', but perhaps 'section' makes more sense here?
Values seem to cause crashes for me - has this been tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mesh refinement fixed and tested. I did not understand the 'surface and section' part.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mesh refinement is working now and tested. What do you mean by " In ventricles3 I use 'surface', but perhaps 'section' makes more sense here"?

Comment on lines 21 to 22
CYLIDNER_REGULAR = 1 # all the bases along the axis of the cylinder are the same.
CYLIDNER_TRUNCATED_CONE = 2 # different ellipses along the cylinder axis
Copy link
Member

Choose a reason for hiding this comment

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

Enum names and descriptions are not helpful. What are bases? Which ellipses are being referred to?
Typo: CYLIDNER

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used STRAIGHT and TAPERED instead if that makes more sense?

elementsCountAcross, elementsCountUp, elementsCountAlong,
cylinderMode = CylinderMode.CYLINDER_MODE_FULL,
cylinderType = CylinderType.CYLIDNER_REGULAR,
rate = 0.0, progressionMode=ConeBaseProgression.GEOMETIRC_PROGRESSION, useCrossDerivatives = False):
Copy link
Member

Choose a reason for hiding this comment

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

progressionMode is not documented as :param:. Why isn't there separate control on major, minor.
I'm wondering if instead of loading up arguments here that you provide a central path with major/minor radius fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean "provide a central path with major/minor radius fields"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I defined a class to store these parameters in it. I called it TAPERED and I store major and minor common ratio and progression type (r_n+1=r_n+ratio for arithmetic and r_n+1=r_n*ratio for geometric progression). In case of geometric sequence "ratio" makes sense but for arithmetic it should be common difference. I call it ratio and there is a comment to explain this. Do you have any better terms for TAPERED class or ratio?

Copy link
Member

@rchristie rchristie left a comment

Choose a reason for hiding this comment

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

Looking good. Some typos and other relatively simple changes requested... be systematic going through these as I think you missed some previously.
Your cylinder code should constrain mirror line d1 to be normal to mirror line so it is truly symmetric.

Copy link
Member

@rchristie rchristie left a comment

Choose a reason for hiding this comment

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

Great work, thanks!

@rchristie rchristie merged commit fc19acc into ABI-Software:master Sep 6, 2020
@elias-soltani elias-soltani deleted the generalisedcylinder branch September 6, 2020 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants