Giter Site home page Giter Site logo

Comments (6)

ddiezrod avatar ddiezrod commented on June 16, 2024 1

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

jcotela avatar jcotela commented on June 16, 2024 1

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.

matekelemen avatar matekelemen commented on June 16, 2024

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 Vectors of the same size).

from kratos.

ddiezrod avatar ddiezrod commented on June 16, 2024

@jcotela hmm you are right, I think I will just use it like that, thanks for the suggestion!

from kratos.

ddiezrod avatar ddiezrod commented on June 16, 2024

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.

philbucher avatar philbucher commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.