Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Closed
psakievich opened this issue May 4, 2023 · 2 comments
Closed
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
@marchdf
Copy link
Contributor

marchdf commented Jul 30, 2024

I think this is fixed, looking at the history. Closing. Please reopen if not.

@marchdf marchdf closed this as completed Jul 30, 2024
@psakievich
Copy link
Contributor Author

It's partially complete but not needed unless someone plans to pursue the SmartFields concept further. I don't see myself having time to devote to that in the near future.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants