Giter Site home page Giter Site logo

Comments (6)

cyrush avatar cyrush commented on August 27, 2024

these would simply be mcarrays named in a way that would allow us to understand they are density for each material

for example, if I have 3 materials, we could have an mcarray:

per_material_density:
{
den_mat_1: vals
den_mat_2: vals
den_mat_3: vals
}

and associated:

vol_fracs:
{
mat_1_vf:
mat_2_vf:
mat_3_vf:
}

of course in the future, we need to support sparse representations -- and would share indices across these type of mcarray reps

beyond this we can think about grouping via a hierarchy, having a special treatment for material fields

{
volume_fractions: { }
fields: {}
}

from conduit.

xjrc avatar xjrc commented on August 27, 2024

Storing per-material fields as an mcarray seems very sensible to me, and I like the idea of interpreting materials as a special type of field in Blueprint.

Given this information, I'd imagine that a Blueprint mesh with per-material fields would look like this:

mesh: {
  domain0: {
    /* coordsets, topologies */
    fields: {
      /* material is a reserved field name */
      material: {
        type: "scalar",
        association: "element",
        topology: "topology0",
        values: {
          material0: [ /* volume fractions for material 0 */ ],
          ...
          materialN: [ /* volume fractions for material N */ ],
        }
      },
      field0: {
        type: "scalar",
        association: "element",
        topology: "topology0",
        values: {
          material0: [ /* per-material field values for material 0 */ ],
          ...
          materialN: [ /* per-material field values for material N */ ],
        }
      },
      /* other fields */
    }
  },
  /* other domains */
}

Does this interpretation of Blueprint with materials seem correct, or is there something I'm missing? Thanks again for your help and I'm sorry if I'm missing anything obvious!

from conduit.

cyrush avatar cyrush commented on August 27, 2024

yes -- close to what I am thinking, lets chat in person to discuss using high bandwidth.

from conduit.

xjrc avatar xjrc commented on August 27, 2024

Based on our discussion, it seems like preliminary support for materials and per-material fields will look something like the following:

mesh: {
  domain0: {
    /* coordsets, topologies */
    materials: {
      association: "element",
      topology: "topology0",
      volume_fractions: {
        material0: [ /* volume fractions for material 0 */ ],
        ...
        materialN: [ /* volume fractions for material N */ ],
      }
    },
    fields: {
      field0: {
        type: "scalar",
        association: "element",
        topology: "topology0",
        values: {
          material0: [ /* per-material field values for material 0 */ ],
          ...
          materialN: [ /* per-material field values for material N */ ],
        }
      },
      /* other fields */
    }
  },
  /* other domains */
}

I'm going to close this issue for now, but we can reopen it when we refine the material and per-material field specifications in Blueprint.

from conduit.

cyrush avatar cyrush commented on August 27, 2024

that sounds good, I would just add that under "materials" we will want to have a name -- to support the possibility of multiple material volume fraction sets

from conduit.

xjrc avatar xjrc commented on August 27, 2024

Just a few quick examples for reference:

Multi-Material, Single-Component Fields

{
  "coordsets": 
  {
    "domain0": 
    {
      "type": "explicit",
      "values": 
      {
        "x": [0.0, 0.333333343267441, 0.666666686534882, 1.0, 0.0, 0.333333343267441, 0.666666686534882, 1.0, 0.0, 0.333333343267441, 0.666666686534882, 1.0, 0.0, 0.333333343267441, 0.666666686534882, 1.0],
        "y": [0.0, 0.0, 0.0, 0.0, 0.333333343267441, 0.333333343267441, 0.333333343267441, 0.333333343267441, 0.666666686534882, 0.666666686534882, 0.666666686534882, 0.666666686534882, 1.0, 1.0, 1.0, 1.0]
      }
    }
  },
  "topologies": 
  {
    "domain0": 
    {
      "type": "unstructured",
      "coordset": "domain0",
      "elements": 
      {
        "shape": "quad",
        "connectivity": [0, 1, 4, 5, 1, 2, 5, 6, 2, 3, 6, 7, 4, 5, 8, 9, 5, 6, 9, 10, 6, 7, 10, 11, 8, 9, 12, 13, 9, 10, 13, 14, 10, 11, 14, 15]
      }
    }
  },
  "materials": 
  {
    "LL": 
    {
      "type": "scalar",
      "association": "element",
      "topology": "domain0",
      "values": [1.0, 0.5, 0.0, 0.5, 0.25, 0.0, 0.0, 0.0, 0.0]
    },
    "LR": 
    {
      "type": "scalar",
      "association": "element",
      "topology": "domain0",
      "values": [0.0, 0.5, 1.0, 0.0, 0.25, 0.5, 0.0, 0.0, 0.0]
    },
    "UL": 
    {
      "type": "scalar",
      "association": "element",
      "topology": "domain0",
      "values": [0.0, 0.0, 0.0, 0.5, 0.25, 0.0, 1.0, 0.5, 0.0]
    },
    "UR": 
    {
      "type": "scalar",
      "association": "element",
      "topology": "domain0",
      "values": [0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.0, 0.5, 1.0]
    }
  },
  "fields": 
  {
    "temp": 
    {
      "type": "scalar",
      "association": "element",
      "topology": "domain0",
      "values": 
      {
        "LL": [15.0, 15.0, 0.0, 15.0, 15.0, 0.0, 0.0, 0.0, 0.0],
        "LR": [0.0, 5.0, 5.0, 0.0, 5.0, 5.0, 0.0, 0.0, 0.0],
        "UL": [-0.0, -0.0, -0.0, -5.0, -5.0, -0.0, -5.0, -5.0, -0.0],
        "UR": [-0.0, -0.0, -0.0, -0.0, -15.0, -15.0, -0.0, -15.0, -15.0]
      }
    }
  }
}

Multi-Material, Multi-Component Fields

{
  "coordsets": 
  {
    "domain0": 
    {
      "type": "explicit",
      "values": 
      {
        "x": [0.0, 0.333333343267441, 0.666666686534882, 1.0, 0.0, 0.333333343267441, 0.666666686534882, 1.0, 0.0, 0.333333343267441, 0.666666686534882, 1.0, 0.0, 0.333333343267441, 0.666666686534882, 1.0],
        "y": [0.0, 0.0, 0.0, 0.0, 0.333333343267441, 0.333333343267441, 0.333333343267441, 0.333333343267441, 0.666666686534882, 0.666666686534882, 0.666666686534882, 0.666666686534882, 1.0, 1.0, 1.0, 1.0]
      }
    }
  },
  "topologies": 
  {
    "domain0": 
    {
      "type": "unstructured",
      "coordset": "domain0",
      "elements": 
      {
        "shape": "quad",
        "connectivity": [0, 1, 4, 5, 1, 2, 5, 6, 2, 3, 6, 7, 4, 5, 8, 9, 5, 6, 9, 10, 6, 7, 10, 11, 8, 9, 12, 13, 9, 10, 13, 14, 10, 11, 14, 15]
      }
    }
  },
  "materials": 
  {
    "L": 
    {
      "type": "scalar",
      "association": "element",
      "topology": "domain0",
      "values": [0.0, 0.5, 1.0, 0.0, 0.5, 1.0, 0.0, 0.5, 1.0]
    },
    "R": 
    {
      "type": "scalar",
      "association": "element",
      "topology": "domain0",
      "values": [1.0, 0.5, 0.0, 1.0, 0.5, 0.0, 1.0, 0.5, 0.0]
    }
  },
  "fields": 
  {
    "velo": 
    {
      "type": "vector",
      "association": "element",
      "topology": "domain0",
      "values": 
      {
        "L": 
        {
          "x": [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0],
          "y": [-2.0, -2.0, -2.0, -2.0, -2.0, -2.0, -2.0, -2.0, -2.0]
        },
        "R": 
        {
          "x": [4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0],
          "y": [-4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0]
        }
      }
    }
  }
}

from conduit.

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.