Skip to content

Conversation

@nandu90
Copy link

@nandu90 nandu90 commented Dec 5, 2025

Work in progress

@moosebuild
Copy link
Collaborator

Job Precheck, step Clang format on 193f563 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/cardinal/docs/PRs/1257/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format bc9dfd058117dc584cfec5579a8a5b6f6ddab5bd


freePointer(nrs->usrwrk);
nrs->o_usrwrk.free();
freePointer(usrwrk);
Copy link
Collaborator

Choose a reason for hiding this comment

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

now that we're creating additional arrays to manage data NekRS used to, we'll also want to free them here/somewhere equivalent

nrs_t * nrs = (nrs_t *)nrsPtr();
mesh_t * mesh = temperatureMesh();

const auto sid = nrs->scalar->nameToIndex.find("temperature")->second;
Copy link
Collaborator

Choose a reason for hiding this comment

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

out of curiosity, would the temperature scalar ID ever be different from 0, if temperature exists in the problem? If the scalars now have arbitrary ordering this will be important to know since it'll impact a lot of other places in the code where we'd need the same kind of index usage as here

auto vc = _nek_mesh->volumeCoupling();
int id = vc.element[elem_id] * mesh->Np;

auto [x, y, z] = nekrs::host_xyz();
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need host_xyz(), or could we get away with just the host_x, host_y, and host_z functions?

case field::velocity_y_squared:
case field::velocity_z_squared:
n_values = n * nrs->NVfields;
n_values = n * 3; //nVFields
Copy link
Collaborator

Choose a reason for hiding this comment

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

did NVfields get deleted? not an issue, just asking for my understanding

@aprilnovak
Copy link
Collaborator

Thanks @nandu90 , this is a great start. I think the overall design will be compatible with the rest of Cardinal - can you point me to where the host-side solution fields are being updated from the device-side solutions? I may have missed it or it hasn't been added yet to the draft PR (in which case we'll need to add it probably in NekRSProblem::syncSolutions so that any Cardinal objects which try to access U, P, S have up to date values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants