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

Dem volume insertion box parameters #1074

Merged
merged 23 commits into from
Mar 26, 2024
Merged

Dem volume insertion box parameters #1074

merged 23 commits into from
Mar 26, 2024

Conversation

OGaboriault
Copy link
Collaborator

Description of the problem

  • The insertion box for the volume insertion was being defined by a large number of parameters (9 to be exact)

Description of the solution

  • The box is defined by one parameter and the order of direction by an other.

Documentation

  • The documentation has been updated accordingly.

Comments

  • The list insertion parameters are now parsed with "convert_string_to_vector", which is cleaner to look at.
  • I have made (with the help of Amishga) a bash script to parse every prm file and change the old parameters into the new ones. We could do something with it... maybe?

@OGaboriault OGaboriault added Enhancement New feature or request Ready for review labels Mar 19, 2024
@OGaboriault OGaboriault self-assigned this Mar 19, 2024
Copy link
Collaborator

@voferreira voferreira left a comment

Choose a reason for hiding this comment

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

I like the new shape of the parameters. It is indeed much cleaner! The only thing I would do would be to have it coherent with dim.
Apart from that, I believe your script has failed to capture some of the points. I have pointed them out and I think I have corrected most of them. Even so, better to double check.
Lastly, check the indentations on the documentation files. I know my comments are redundant, but I did it this way so you could have checkpoints while correcting it.

set insertion box minimum y = -0.07
set insertion box maximum x = 0.05
set insertion box maximum y = 0.0
set insertion box points coordinates = -0.02, -0.07, 0 : 0.05, 0.0, 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

When it is 2d, should it be like this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think you fogot the corrective...

I will put a if constexpr (dim == 3)

set insertion box minimum y = 0
set insertion box maximum x = 0.05
set insertion box maximum y = 0.07
set insertion box points coordinates = -0.05, 0, : 0.05, 0.07,
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing z?

set initial refinement = 3
end

subsection mesh
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be indented

set insertion box maximum x = 0.018
set insertion box maximum y = 0.05
set insertion box maximum z = 0.018
set insertion box points coordinates = -0.018, -0.05, 0 : 0.018, 0.05, 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set insertion box points coordinates = -0.018, -0.05, 0 : 0.018, 0.05, 0
set insertion box points coordinates = -0.018, -0.05, -0.018 : 0.018, 0.05, 0.018

set insertion box maximum x = 0.075
set insertion box maximum y = 0.3
set insertion box maximum z = 0.015
set insertion box points coordinates = -0.075, 0.0, 0 : 0.075, 0.3, 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set insertion box points coordinates = -0.075, 0.0, 0 : 0.075, 0.3, 0
set insertion box points coordinates = -0.075, 0.0, 0. : 0.075, 0.3, 0.015

set insertion box maximum x = 0.53
set insertion box maximum y = 0.035
set insertion box maximum z = 0.035
set insertion box points coordinates = -0.15, -0.035, 0 : 0.53, 0.035, 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set insertion box points coordinates = -0.15, -0.035, 0 : 0.53, 0.035, 0
set insertion box points coordinates = -0.15, -0.035, -0.035 : 0.53, 0.035, 0.035

set insertion box maximum x = 0.029
set insertion box maximum y = 0.029
set insertion box maximum z = 0.09
set insertion box points coordinates = -0.029, -0.029, 0 : 0.029, 0.029, 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set insertion box points coordinates = -0.029, -0.029, 0 : 0.029, 0.029, 0
set insertion box points coordinates = -0.029, -0.029, 0.01 : 0.029, 0.029, 0.09

set insertion box maximum x = 0.029
set insertion box maximum y = 0.029
set insertion box maximum z = 0.09
set insertion box points coordinates = -0.029, -0.029, 0 : 0.029, 0.029, 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
set insertion box points coordinates = -0.029, -0.029, 0 : 0.029, 0.029, 0
set insertion box points coordinates = -0.029, -0.029, 0.01 : 0.029, 0.029, 0.09

Copy link
Collaborator Author

@OGaboriault OGaboriault left a comment

Choose a reason for hiding this comment

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

Apply some comment

@voferreira
Copy link
Collaborator

Hey Gabo, wouldn't it be a good idea to do the same for the insertion velocity and omega as well?

@blaisb
Copy link
Contributor

blaisb commented Mar 21, 2024

Hey Gabo, wouldn't it be a good idea to do the same for the insertion velocity and omega as well?

Yeah, but in a next PR I think
Step by step

Copy link
Contributor

@blaisb blaisb left a comment

Choose a reason for hiding this comment

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

1-2 few comments. Very good work btw. Much cleaner now

set insertion first direction = 0
set insertion second direction = 2
set insertion third direction = 1
set insertion order of direction = 0, 2, 1
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree... i think insertion direction sequence is a good phrasing

Comment on lines 58 to 60
dem_parameters.insertion_info.axis_0 = 0;
dem_parameters.insertion_info.axis_1 = 1;
dem_parameters.insertion_info.axis_2 = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could the axis not be like a std::vector instead of three parameters ?

@OGaboriault OGaboriault requested a review from blaisb March 23, 2024 16:32
@blaisb
Copy link
Contributor

blaisb commented Mar 25, 2024

Can you rebase @OGaboriault ? Then from my POV it would be good

@OGaboriault OGaboriault force-pushed the dem_volume_insertion_box branch from ab06cad to 7dd8e16 Compare March 25, 2024 00:36
@OGaboriault
Copy link
Collaborator Author

Rebase done

@blaisb blaisb requested a review from voferreira March 25, 2024 12:20
@blaisb
Copy link
Contributor

blaisb commented Mar 25, 2024

once @voferreira accepts this will be ready for merge

Copy link
Collaborator

@voferreira voferreira left a comment

Choose a reason for hiding this comment

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

All clear! Good job!

@blaisb blaisb merged commit 219ca30 into master Mar 26, 2024
8 checks passed
@blaisb blaisb deleted the dem_volume_insertion_box branch March 26, 2024 15:34
blaisb pushed a commit that referenced this pull request Mar 29, 2024
Description of the problem
This is a follow up from Victor's comment from PR [Dem volume insertion box parameters #1074
The initial velocity and initial angular velocity are now define with one parameter each.

Really quick PR.

No example or application test (except for one) was using those parameters.
M-Badri pushed a commit to M-Badri/lethe that referenced this pull request Sep 29, 2024
Description of the problem
The insertion box for the volume insertion was being defined by a large number of parameters (9 to be exact)

Description of the solution
The box is defined by one parameter and the order of direction by an other.

Documentation
The documentation has been updated accordingly.

Comments
The list insertion parameters are now parsed with "convert_string_to_vector", which is cleaner to look at.
I have made (with the help of Amishga) a bash script to parse every prm file and change the old parameters into the new ones. We could do something with it... maybe?

Former-commit-id: 219ca30
M-Badri pushed a commit to M-Badri/lethe that referenced this pull request Sep 29, 2024
Description of the problem
This is a follow up from Victor's comment from PR [Dem volume insertion box parameters chaos-polymtl#1074
The initial velocity and initial angular velocity are now define with one parameter each.

Really quick PR.

No example or application test (except for one) was using those parameters.



Former-commit-id: 698b063
blaisb pushed a commit that referenced this pull request Sep 30, 2024
Description of the problem
The insertion box for the volume insertion was being defined by a large number of parameters (9 to be exact)

Description of the solution
The box is defined by one parameter and the order of direction by an other.

Documentation
The documentation has been updated accordingly.

Comments
The list insertion parameters are now parsed with "convert_string_to_vector", which is cleaner to look at.
I have made (with the help of Amishga) a bash script to parse every prm file and change the old parameters into the new ones. We could do something with it... maybe?

Former-commit-id: 219ca30
blaisb pushed a commit that referenced this pull request Sep 30, 2024
Description of the problem
This is a follow up from Victor's comment from PR [Dem volume insertion box parameters #1074
The initial velocity and initial angular velocity are now define with one parameter each.

Really quick PR.

No example or application test (except for one) was using those parameters.



Former-commit-id: 698b063
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants