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

Feature/variable resolution damage #68

Merged
merged 38 commits into from
Jun 3, 2021

Conversation

jmikeowen
Copy link
Collaborator

This change is focused on updates to our damage models to make them more efficient and able to properly handle damage in the presence of varying initial resolution. There are two major algorithmic changes:

  1. GradyKippTensorDamageOwen was an existing algorithm to handle this situation, but was way to slow during problem generation. I've implemented support for per point random number generators, and used this to more effectively parallelize problem setup of this model. It is now orders of magnitude faster in typical problems (minutes to setup rather than hours). However, this model still requires explicitly holding all the activation flaw strains, which for hi-res impact problems can be many billions and overflow memory on achievable machine allocations.

  2. We have a new model (ProbabilisticTensorDamage) which implements a similar algorithm to GradyKippTensorDamageOwen, but based on statistics is able to represent the span of flaws on each point mathematically. This reduces our storage per point to a few doubles and some relatively quick math to update the damage when the implicit flaw distribution is activated. The results are similar to the older algorithm, run just as quickly, but require very little memory.

I have added regression tests of the new model in TensileRod-1d, and tested it out for 1d and 2d tensile rods, as well as hypervelocity cratering impact models.

The bulk of the files touched in this merge are just to support Fields of std::uniform_distribution random number generators.

Weibull flaw distribution.  Needs more testing.
for constructing Fields of random generators.
but untested.  This also includes a number of infrastructure
extensions to suppport this model, like FileIO support for Fields of
unsigned and such.
generalizing our random number generator a bit.
Copy link
Collaborator

@mdavis36 mdavis36 left a comment

Choose a reason for hiding this comment

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

Overall looks good, I only have a small change request for the nullptr otherwise I noticed some comment blocks that I'm not sure were purposely left behind along with a point of discussion on policy traits.

The random generator looks good to me, this will certainly be something that might be a tricky point for GPU implementation in the future but we can approach that when we get there, I know there are specific libraries dedicated to random number generation on the GPU we will be able to utilize.

src/Damage/ProbabilisticDamageModel.cc Show resolved Hide resolved
src/Damage/ProbabilisticDamagePolicy.cc Show resolved Hide resolved
src/Damage/ProbabilisticDamagePolicy.cc Show resolved Hide resolved
src/Damage/ProbabilisticDamagePolicy.cc Outdated Show resolved Hide resolved
Comment on lines +632 to +633
// VERIFY2(DBReadVar(mFilePtr, varname.c_str(), &value) == 0,
// "SiloFileIO ERROR: unable to read variable " << pathName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comments

Comment on lines +293 to +294
#[x for x in self._fields if isinstance(x, eval("UnsignedField%s" % self.dimension))] +
#[x for x in self._fields if isinstance(x, eval("ULLField%s" % self.dimension))])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comments

Comment on lines +116 to +117
// mGen.discard(n * mGen.state_size);
// mNumCalls += n;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comments

@jmikeowen jmikeowen merged commit 723370e into develop Jun 3, 2021
@jmikeowen jmikeowen deleted the feature/variable-resolution-damage branch June 3, 2021 17:04
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