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

LCM start up simulations #5

Open
RuixiongHu opened this issue Jun 11, 2020 · 6 comments
Open

LCM start up simulations #5

RuixiongHu opened this issue Jun 11, 2020 · 6 comments
Labels

Comments

@RuixiongHu
Copy link

Hello @JustinClough

Alex is finishing her first year of PhD with prof Maniatty and she will be trying to start up on some mechancis simulations. So I know you've been experienced on LCM and you've provided some start up docs for others so could you please give us some pointer on some simple run of LCM so that we could evolve based on that?

Thanks
Ruixiong

@RuixiongHu RuixiongHu added the LCM label Jun 11, 2020
@JustinClough
Copy link
Collaborator

I found the best way to get started with LCM (or Albany in general) is to run the tests in the tests/small/LCM/ directory. Start with the simple ones like Static Elasticity 3D and work up in complexity from there. Try changing inputs in both the material.yaml and input.yaml to see what changes; purposely breaking things by giving bad inputs will also tell you a lot about the code.

In parallel to the above, I'd also recommend trying to follow the execution order in the code to understand what code blocks do what. You can do this with a step-through style debugger like GDB or more simply by adding print statements. Again, I recommend purposely trying to break things to understand how things break and get used to the errors and warnings that the compiler may issue; that'll make debugging easier when things are broken but not on purpose.

Two other mechanics-focused examples to look at from personal projects (note that I'm using Gmsh, not SCOREC meshes for both):

  1. Any of the input.yaml files here.
  2. The templated pair of input yaml files here.

Let me know if that helps. I'll keep a closer eye on github and it's notifications now that it's more active.

@JustinClough
Copy link
Collaborator

I know you didn't ask for help outside of Albany/LCM but I did put together a few tools and tutorials for beginning grad students: https://github.com/OberaiGroup/getting_started/tree/master/tutorials_and_tools

It's basically everything I wish someone told me/taught me about when I got started.

@vestal16
Copy link

Thank you very much for all of this help and guidance. I appreciate it and will get to looking into it.

@RuixiongHu
Copy link
Author

@JustinClough thanks for the information.

There's one thing I would like to ask. For those tests, do you have any better ways to determine where the source code is, I mean which is the problem file and which are evaluators it uses to implement equations.

I'm asking cuz I remember when I previously tried some LCM simulations some of them are in the /src/LCM/problems and evaluators, but some of them are using the /src/LCM/models. I know there's a LCM problem file called 'Mechanics' and it utilizes the 'models' to represent different material models, I don't know how much you know about these but it might be somewhat confused for @vestal16 if she can't actually find the source code and looking at what equations are exactly executed.

@JustinClough
Copy link
Collaborator

There's one thing I would like to ask. For those tests, do you have any better ways to determine where the source code is, I mean which is the problem file and which are evaluators it uses to implement equations.

I don't really have a better way. Admittedly, I've been using the same material model for the past few years so I'm probably not the best person to ask. A quick thought is to get fancy with some grep commands based on what is in your input and material yamls.

For example, say my input and material files looked like the below and I wanted to find out where the creep model lived.
input.yaml

1 LCM:
2  Build Type: Tpetra
3  Problem:
4    Name: Mechanics 3D
5    Solution Method: Continuation
6    MaterialDB Filename: material.yaml
...

material.yaml

1 ANONYMOUS:
2  ElementBlocks:
3    Element Block 0:
4      material: mat
5    Use Composite Tet 10: true
6  Materials:
7    mat:
8      Material Model:
9        Model Name: Creep
...

From line 1 in input.yaml, I know to limit my search to the src/LCM/ directory. After that I would want to search that whole directory for instances where the string Creep is near the string Model Name:. Essentially I'm looking for the code that reads in line 9 in material.yaml with the assumption that the related source code is nearby. To do that search, I would give the command:

grep -rnc 10 "Model Name:" <home>/src/LCM | grep "Creep"

and look deeper into what file(s) are returned. There's a chance that I get no returns in which case I would step back and make the search more general:

grep -rin "creep" <home>/src/LCM

Searching for any string that's unique to your model (in place of creep) would be a good idea. You could do something similar by searching for string's from Albany's output to see what code block is printing them.

@vestal16
Copy link

vestal16 commented Jul 2, 2020

@Jpess1997

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

No branches or pull requests

3 participants