+
Skip to content

Add Region.astype(dtype=None) and Field(..., dtype=None) #797

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

Merged
merged 13 commits into from
Jun 17, 2024

Conversation

adtzlr
Copy link
Owner

@adtzlr adtzlr commented Jun 17, 2024

also for axisymmetric and plane-strain fields.

This PR enables the assembly of single-precision vectors/matrices.

import felupe as fem
import numpy as np

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

boundaries, loadcase = fem.dof.uniaxial(field, clamped=True)

solid = fem.SolidBody(fem.NeoHooke(mu=1.0, bulk=2.0), field)
job = fem.Job([fem.Step([solid], boundaries=boundaries)]).evaluate(tol=tol)

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

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.45%. Comparing base (f3ea0cf) to head (a43f141).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #797   +/-   ##
=======================================
  Coverage   97.44%   97.45%           
=======================================
  Files         137      137           
  Lines        5481     5495   +14     
=======================================
+ Hits         5341     5355   +14     
  Misses        140      140           

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

@adtzlr adtzlr merged commit 35b284e into main Jun 17, 2024
8 checks passed
@adtzlr adtzlr deleted the add-region-field-dtype branch June 17, 2024 13:25
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.

1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载