Skip to content

Conversation

@timspainNERSC
Copy link
Collaborator

Stress restart

Fixes #779


Change Description

Move the stress and strain arrays to the lowest possible point in the class hierarchy. It turns out that this is CGDynamicsKernel, only one level lower than DynamicsKernel.
Convert the stress arrays to DGVectorHolders to allow data to be passed around without copying.


Test Description

Manually check that valid stress values occur in the restart file after a run length of 0.

Copy link
Member

@einola einola left a comment

Choose a reason for hiding this comment

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

Looks fine to me. Just a bit of cleaning of commented out code needed.

Comment on lines -13 to +17
static const std::map<std::string, std::pair<ModelArray::Type, double>> defaultFields = {};
static const std::map<std::string, std::pair<ModelArray::Type, double>> defaultFields = {
// { stress11Name, { ModelArray::Type::DG, 0. } },
// { stress12Name, { ModelArray::Type::DG, 0. } },
// { stress22Name, { ModelArray::Type::DG, 0. } },
};
Copy link
Member

Choose a reason for hiding this comment

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

I guess this should be reverted?

Comment on lines +160 to +165
// } else if (name == stress11Name) {
// DGModelArray::ma2dg(data, s11);
// } else if (name == stress12Name) {
// DGModelArray::ma2dg(data, s12);
// } else if (name == stress22Name) {
// DGModelArray::ma2dg(data, s22);
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 also not needed

Comment on lines +60 to +65
// e11.resize_by_mesh(*smesh);
// e12.resize_by_mesh(*smesh);
// e22.resize_by_mesh(*smesh);
// s11.resize_by_mesh(*smesh);
// s12.resize_by_mesh(*smesh);
// s22.resize_by_mesh(*smesh);
Copy link
Member

Choose a reason for hiding this comment

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

Remove commented code

Comment on lines +68 to +73
// e11.zero();
// e12.zero();
// e22.zero();
// s11.zero();
// s12.zero();
// s22.zero();
Copy link
Member

Choose a reason for hiding this comment

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

Remove commented code

Comment on lines +201 to +203
// DGVector<DGstress> e11, e12, e22;
// DGVector<DGstress> /*s11,*/ s12, s22;
// DGVectorHolder<DGstress> s11, s12, s22;
Copy link
Member

Choose a reason for hiding this comment

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

Remove commented code

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

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

Include stress in restart files

3 participants