Skip to content

Conversation

@bartgol
Copy link
Collaborator

@bartgol bartgol commented Nov 12, 2025

I was trying to make the logically extruded mesh/disc save the solution into the basal mesh, and ran into issues regarding wrong layouts (as the basal disc already defines a solution, with layout matching the extents of the basal mesh).

In order to be more free to add the solution field in the basal mesh, I had to cleanup and rework a few things, and ended up cleaning a bit of other stuff in the STK stack. Below is a sumamry of the main changes.

  • Remove mesh transformation params from the abstract stk mesh struct. They are read from the plist and just stored, and later only used in the STK disc when transforming the mesh. Hence, the disc can simply access them from the plist if needed.
  • Similar change for exo and output params. Move them from the mesh struct (where they are just stored) to the disc (which is the only customer of these params).
  • Remove a few other unused params in the abstract stk mesh struct.
  • Do not call setFieldData on the side discs from the disc factory. Instead, let the disc do it. This will help the extruded disc to inject different logic regarding the basal disc solution field.
  • Move common impl of Oridnary and Multi stk field containers to the Generic one
  • Remove 2nd constructor of Multi/Ordinary/Generic stk field container. The user can add solution field metadata at a later stage, if need be.
  • To avoid adding coord/proc_rank fields twice to the metadata, make Ordinary/Multi stk containers add these geo fields at construction only if requested (via bool flag)
  • In Generic STK mesh, only create ordinary stk container for fields. Since this container is NOT used for the solution, the Multi one is pointless.

Tests pass on my workstation (except the known fail of NullSpace utils).

Let the volume disc dispatch the call to the sideset disc.
This can allow extruded mesh to do something different.
Now it matches the name used by the stk field containers
They are NEVER used in the mesh, so just access them
from the param list from inside the disc if/when needed
Unused members, or members that are read from param list
by the mesh, and used ONCE by stk disc. Instead, make the
the disc just grab them from the param list when it needs them
@bartgol bartgol force-pushed the bartgol/stk-field-containers-cleanup branch from 683858d to 7e78fcf Compare November 12, 2025 21:17
@bartgol bartgol force-pushed the bartgol/stk-field-containers-cleanup branch from 7e78fcf to bed03ed Compare November 13, 2025 03:04
Copy link
Collaborator

@mperego mperego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.
I tried to run a MALI problem and it works fine.

@bartgol bartgol merged commit 75bfec1 into master Nov 17, 2025
@bartgol bartgol deleted the bartgol/stk-field-containers-cleanup branch November 17, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants