-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
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.
problems with unsigned Fields.
… ProbabilisticDamageModel.
default minimum flaws per node.
in the ProbabilisticDamagePolicy, rather than regenerating a new realization each time. Should be *much* faster.
There was a problem hiding this 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.
// VERIFY2(DBReadVar(mFilePtr, varname.c_str(), &value) == 0, | ||
// "SiloFileIO ERROR: unable to read variable " << pathName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments
#[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))]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments
// mGen.discard(n * mGen.state_size); | ||
// mNumCalls += n; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments
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:
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.
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.