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

Increase flexibility in creating meshes and loading meshes #266

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

stvdwtt
Copy link
Collaborator

@stvdwtt stvdwtt commented Mar 15, 2024

This is the first of two PRs to let us do the curved wall build for the Okuma. This one is focused on relaxing the assumption that the entire domain is in the +x, +y, +z octant. A common AM reference frame has the top of the substrate centered at (0, 0, 0).

Changes:

  • Removes the check that the material height must be positive
  • Allows the user to specify the origin for an adamantine-generated meshes
  • Allows user-defined scaling of a read-in mesh
  • Allows the material id of a read-in mesh be cleared and set to 0

Copy link
Member

@Rombur Rombur left a comment

Choose a reason for hiding this comment

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

The PR looks fine. I am not sure about the name set_material_id_to_0

README.md Outdated
* if import\_mesh is false:
* length: the length of the domain in meters (required)
* height: the height of the domain in meters (required)
* width: the width of the domain in meters (only in 3D)
* length_origin: the reference location in the length direction (default value: 0)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* length_origin: the reference location in the length direction (default value: 0)
* length\_origin: the reference location in the length direction (default value: 0)

README.md Outdated
* if import\_mesh is false:
* length: the length of the domain in meters (required)
* height: the height of the domain in meters (required)
* width: the width of the domain in meters (only in 3D)
* length_origin: the reference location in the length direction (default value: 0)
* height_origin: the reference location in the height direction (default value: 0)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* height_origin: the reference location in the height direction (default value: 0)
* height\_origin: the reference location in the height direction (default value: 0)

README.md Outdated
* if import\_mesh is false:
* length: the length of the domain in meters (required)
* height: the height of the domain in meters (required)
* width: the width of the domain in meters (only in 3D)
* length_origin: the reference location in the length direction (default value: 0)
* height_origin: the reference location in the height direction (default value: 0)
* width_origin: the reference location in the width direction (only in 3D) (default value: 0)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* width_origin: the reference location in the width direction (only in 3D) (default value: 0)
* width\_origin: the reference location in the width direction (only in 3D) (default value: 0)

README.md Outdated
@@ -105,10 +105,15 @@ The following options are available:
* mesh\_format: abaqus, assimp, unv, ucd, dbmesh, gmsh, tecplot, xda, vtk,
vtu, exodus, or default, i.e., use the file suffix to try to determine the
mesh format (required)
* mesh\_scale\_factor: Apply a uniform scaling factor to the mesh (e.g. if the mesh is defined in mm or inches instead of m), (default value: 1)
* set\_material\_id\_to\_0: Clear the material IDs defined in the mesh and sets them all to zero: true or false (default value: false)
Copy link
Member

Choose a reason for hiding this comment

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

I think I would call this something like set_material_id or set_uniform_material_id. Use don't need to know/don't care which value we are using.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about reset_material_id, and then mention that we set it to zero in the description? I think the value being zero is important because it corresponds to the material_0 material input block.

Suggested change
* set\_material\_id\_to\_0: Clear the material IDs defined in the mesh and sets them all to zero: true or false (default value: false)
* reset\_material\_id: Clear the material IDs defined in the mesh and set them all to zero so all material properties are given by the `material\_0` input block: true or false (default value: false)

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good.


// Set the mesh material id to 0 if specified in the input
// PropertyTreeInput geometry.set_material_id_to_0
auto reset_material_id = database.get("set_material_id_to_0", false);
Copy link
Member

Choose a reason for hiding this comment

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

This still needs to be updated

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching that! Fixed

@Rombur Rombur merged commit feeb684 into adamantine-sim:master Mar 18, 2024
1 check passed
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.

None yet

2 participants