Comments (4)
If you rely on this feature, then please open a pull request. We can improve this in the future if necessary.
from felupe.
Hi @adtzlr , I'm not sure if my suggestion can solve this issue, but we can add a callback
to the mesh.update
method, so after updating the mesh the callback will be called internally; let's take a look:
def update(self, points=None, cells=None, cell_type=None, callback=None):
"Update the cell and dimension attributes with a given cell array."
if points is not None:
self.points = points
if cells is not None:
self.cells = cells
...
############## - Added - ################
if callable(callback):
callback(self)
#########################################
And then, the
mesh.update(points=mesh.rotate(angle_deg=-90, axis=2).points)
# this is important!
region.reload(mesh)
is replaced with the;
mesh.update(points=mesh.rotate(angle_deg=-90, axis=2).points, callback=region.reload)
from felupe.
Hi, thanks! I was thinking about that too, i.e. to add an update-method to a region like region.update(mesh=None, element=None, quadrature=None)
. However, this could lead to problems with the subsequent usage of template classes like RegionHexahedron
. Currently, all FElupe classes are more or less "stand alone concepts". Your approach wouldn't change that. I'm still not sure if I should add callbacks here and there in FElupe as I think they are not very "pythonic".
from felupe.
Hi, thanks! I was thinking about that too, i.e. to add an update-method to a region like
region.update(mesh=None, element=None, quadrature=None)
. However, this could lead to problems with the subsequent usage of template classes likeRegionHexahedron
. Currently, all FElupe classes are more or less "stand alone concepts". Your approach wouldn't change that. I'm still not sure if I should add callbacks here and there in FElupe as I think they are not very "pythonic".
Okey then, I'm sure that there's no a just one solution👌🙂, it's a matter of time, hope this fixed.
from felupe.
Related Issues (20)
- The Ogden-Roxburgh model should be also implemented with automatic differentiation
- The optimization of material parameters should optionally be based on relative residuals
- 💡 Collection of Ideas 💡
- Deprecate `MaterialAD` and use `Hyperelastic` everywhere instead HOT 2
- The material parameters are overwritten in-place in `ConstitutiveMaterial.optimize()`
- Material-parameter scalars are converted to arrays in `ConstitutiveMaterial.optimize()`
- Add the MORPH X material model
- The state variables are not-resetted after finishing a load case in the plot of a constitutive material
- Prepare for Numpy 2.0
- Enhance the performance of uniform grid meshes
- `FormItem()` needs an `update()` method
- Include some hello-world lines of code
- Rubber roller compacting analysis: contact pressure plot HOT 19
- Formula broken in Jupyter HOT 3
- Anisotropic material & composites laminate modeling HOT 1
- `MultiPointContact`: The `skip`-argument is ignored HOT 2
- 🌍Call for translators in FElupe official document🌍 HOT 3
- Compaction rubber roller analysis issue (with inear isotropic material assumption) HOT 1
- Mixed-field formulations with multiple solid bodies
- `MultiPointContact` with custom rigid edge / surface HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from felupe.