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

Enhance Boundary: Add support for multiaxial prescribed value-argument #912

Merged
merged 4 commits into from
Nov 30, 2024

Conversation

adtzlr
Copy link
Owner

@adtzlr adtzlr commented Nov 30, 2024

This PR closes #911.

Now it's possible to prescribe multiaxial values without manual broadcast+ravel required:

import felupe as fem
import numpy as np

mesh = fem.Cube(n=6)
region = fem.RegionHexahedron(mesh)
field = fem.FieldContainer([fem.Field(region, dim=3)])

value = np.array([1.0, 2.0, 3.0])
boundaries = dict(
    left=fem.Boundary(field[0], fx=0),
    right=fem.Boundary(field[0], fx=1, value=value),
)

dof0, dof1 = fem.dof.partition(field, boundaries)
ext0 = fem.dof.apply(field, boundaries, dof0)

@adtzlr adtzlr added the enhancement New feature or request label Nov 30, 2024
@adtzlr adtzlr self-assigned this Nov 30, 2024
Copy link

codecov bot commented Nov 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.32%. Comparing base (43a7705) to head (b9a0d74).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #912   +/-   ##
=======================================
  Coverage   97.32%   97.32%           
=======================================
  Files         180      180           
  Lines        6424     6432    +8     
=======================================
+ Hits         6252     6260    +8     
  Misses        172      172           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adtzlr adtzlr merged commit 088e64f into main Nov 30, 2024
5 checks passed
@adtzlr adtzlr deleted the enhance-boundary branch November 30, 2024 21:32
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
None yet
Development

Successfully merging this pull request may close these issues.

Multiaxial prescribed displacement boundary condition
1 participant