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

FEMSystem TimeSolver Fixes #1069

Merged
merged 7 commits into from Aug 25, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 13 additions & 11 deletions src/systems/fem_context.C
Expand Up @@ -1305,18 +1305,20 @@ void FEMContext::elem_reinit(Real theta)

// Handle a moving element if necessary.
if (_mesh_sys)
// We assume that the ``default'' state
// of the mesh is its final, theta=1.0
// position, so we don't bother with
// mesh motion in that case.
if (theta != 1.0)
{
// FIXME - ALE is not threadsafe yet!
libmesh_assert_equal_to (libMesh::n_threads(), 1);
{
// We assume that the ``default'' state
// of the mesh is its final, theta=1.0
// position, so we don't bother with
// mesh motion in that case.
if (theta != 1.0)
{
// FIXME - ALE is not threadsafe yet!
libmesh_assert_equal_to (libMesh::n_threads(), 1);

elem_position_set(theta);
}
elem_fe_reinit();
elem_position_set(theta);
}
elem_fe_reinit();
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This is good, but the doxygen comment for elem_reinit should probably be made clearer.

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean adding the note about setting the time?

Copy link
Member

Choose a reason for hiding this comment

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

Nah, I mean making it clearer that we're not reinitializing FE objects unless a moving mesh requires it.

Originally elem_reinit was supposed to reinitialize FE objects; and if you look at the documentation in DiffSystem that's clearly implied. It wasn't until later optimization that I broke out elem_fe_reinit() as a separate method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nah, I mean making it clearer that we're not reinitializing FE objects unless a moving mesh requires it.

Ah,OK.

Originally elem_reinit was supposed to reinitialize FE objects; and if you look at the documentation in DiffSystem that's clearly implied. It wasn't until later optimization that I broke out elem_fe_reinit() as a separate method.

Thanks for the clarification. I don't remember a time elem_fe_reinit wasn't called in the AssemblyContributions functor. But my memory has never been the same since my kids were born.



Expand Down