Comments (6)
@matekelemen I think I'm going to start with the second option as there is no harm in it, but we can maybe try to think about something else for the future.
from kratos.
Just a note: the mapper works with variable components (which are Variable<double>
internally) so you can already kind-of support other array types. I have already used that in the past to map array_1d<double, 6> variables one component at a time. You just need to loop over components on your side when calling the map function (which is the same the mapper already does for array-3 anyway)
from kratos.
I'd go with the second option (extend the interface with array_1d<double,6>
).
I think we could also go with a limited support for "dynamic" arrays by extending the interface with bounded_array
. Sure, it's a lot of overhead but it's definitely safer (and maybe even faster) than asking the size of each node's Vector
(or, god forbid, assuming all nodes have Vector
s of the same size).
from kratos.
@jcotela hmm you are right, I think I will just use it like that, thanks for the suggestion!
from kratos.
I'll close this for the moment as @jcotela solution with the workaround of creating an array_1d6 intermediary variable is working fine for me. Thanks all!
from kratos.
Yep as @jcotela says I am anyway doing it component wise: https://github.com/KratosMultiphysics/Kratos/blob/master/applications/MappingApplication/custom_mappers/interpolative_mapper_base.h#L473-L487
If you want the interface could be extended to array_1d6, I dont see a problem as long as it is fixed size
Dynamic size is different though, not sure if it is worth the pain and hassle ...
from kratos.
Related Issues (20)
- [GeoMechanicsApplication] Extract a static utility function for the calculation of the Stiffness Matrix (K)
- [GeoMechanicsApplication][Thermal] Write the results of the initial stage to the output file HOT 2
- [Mapping] Map elemental/condition values HOT 1
- [CoSim] Incorrect residuals in `ConvergenceCriteria` HOT 4
- [GeoMechanicsApplication] Refactor Linear Elastic law to extract a policy for 2D behavior
- [GeoMechanicsApplication] Extract a static utility for VoigtVector
- [Core][IO] wrong output in vtk files when Point3D elements are present in model HOT 3
- [GeoMechanicsApplication] Investigate unstable 1D consolidation test
- [GeoMechanicsApplication] Cleaning of element variables structure
- Running Kratos HOT 5
- [GeoMechanicsApplication] Create backbone and unloading model with elastic unloading for trusses and interface elements
- [GeoMechanicsApplication] Convert piping interface element, to 1D line element HOT 1
- [GeoMechanicsApplication] Make `UPwBaseElement` a non-template class
- [GeoMechanicsApplication] Calculate integration coefficients prior to integration point loop
- [GeoMechanicsApplication] Creation of a backbone model for interface elements
- [GeoMechanicsApplication] Change the base class of `SmallStrainUPwDiffOrderElement` to `UPwBaseElement`
- [GeoMechanicsApplication] Investigate thermal simulation performance
- [General] Output no longer outputs the initial conditions (i.e. time = 0 ) HOT 1
- [GeoMechanicsApplication] Degrees of freedom should be freed in between stages HOT 5
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 kratos.