Skip to content

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

Merged
adtzlr merged 4 commits into
mainfrom
enhance-boundary
Nov 30, 2024
Merged

Enhance Boundary: Add support for multiaxial prescribed value-argument#912
adtzlr merged 4 commits into
mainfrom
enhance-boundary

Conversation

@adtzlr

@adtzlr adtzlr commented Nov 30, 2024

Copy link
Copy Markdown
Owner

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
@codecov

codecov Bot commented Nov 30, 2024

Copy link
Copy Markdown

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
@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