Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registration of interior algs needs to use a partvec instead of a part #1183

Open
psakievich opened this issue May 4, 2023 · 0 comments
Open
Assignees

Comments

@psakievich
Copy link
Contributor

The current infrastructure is looping over parts where a partvec could be assembled instead. It will require a lot of code changes but it will improve things.

for (size_t itarget = 0; itarget < targetNames.size(); ++itarget) {
stk::mesh::Part* targetPart = meta_data.get_part(targetNames[itarget]);
if (NULL == targetPart) {
throw std::runtime_error(
"Sorry, no part name found by the name " + targetNames[itarget]);
} else {
// found the part; no need to subset
if (stk::topology::ELEMENT_RANK != targetPart->primary_entity_rank()) {
throw std::runtime_error(
"Sorry, parts need to be elements.. " + targetNames[itarget]);
}
realm_.register_interior_algorithm(targetPart);
EquationSystemVector::iterator ii;
for (ii = equationSystemVector_.begin();
ii != equationSystemVector_.end(); ++ii)
(*ii)->register_interior_algorithm(targetPart);
}

overfelt added a commit that referenced this issue May 9, 2023
…sue #1183

PartVectors allow for the specification of a field on a list of parts
instead of one part at a time. For some classes it was only possible
to pass a single part pointer for the field specification where a
part vector would be more flexible.

Started with register_nodal_fields:
from: register_nodal_fields(stk::mesh::Part* part)
to:   register_nodal_fields(const stk::mesh::PartVector &part_vec)

The stk::mesh::put_field_on_mesh function does not take a PartVector
so create a Selector form a PartVector:
  stk::mesh::Selector selector = stk::mesh::selectUnion(part_vec);
and use that instead. There were a couple of places where the
construction of a PartVector from a single Part pointer:
   PartVector(1,Part*)
was useful.

There were a lot of files changed, but the changes are trivial.
overfelt added a commit that referenced this issue May 9, 2023
…sue #1183

PartVectors allow for the specification of a field on a list of parts
instead of one part at a time. For some classes it was only possible
to pass a single part pointer for the field specification where a
part vector would be more flexible.

Started with register_nodal_fields:
from: register_nodal_fields(stk::mesh::Part* part)
to:   register_nodal_fields(const stk::mesh::PartVector &part_vec)

The stk::mesh::put_field_on_mesh function does not take a PartVector
so create a Selector form a PartVector:
  stk::mesh::Selector selector = stk::mesh::selectUnion(part_vec);
and use that instead. There were a couple of places where the
construction of a PartVector from a single Part pointer:
   PartVector(1,Part*)
was useful.

There were a lot of files changed, but the changes are trivial.
psakievich pushed a commit that referenced this issue Jun 21, 2023
* More changes to use mesh::PartVector instead of mesh::Part.

* Clang format.
psakievich added a commit that referenced this issue Aug 29, 2023
psakievich added a commit that referenced this issue Aug 29, 2023
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

No branches or pull requests

3 participants