Skip to content

Commit

Permalink
Docs and sqa changes (idaholab#21885)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Aug 18, 2022
1 parent 7f51c69 commit 703394b
Show file tree
Hide file tree
Showing 21 changed files with 359 additions and 53 deletions.
44 changes: 23 additions & 21 deletions modules/optimization/doc/config.yml
@@ -1,45 +1,47 @@
Content:
- ${ROOT_DIR}/examples
- ${ROOT_DIR}/doc/content
- ${MOOSE_DIR}/framework/doc/content
- ${MOOSE_DIR}/modules/heat_conduction/doc/content
- ${MOOSE_DIR}/modules/stochastic_tools/doc/content
- ${MOOSE_DIR}/modules/ray_tracing/doc/content
- ${MOOSE_DIR}/modules/tensor_mechanics/doc/content
- framework/doc/content
- modules/heat_conduction/doc/content
- modules/stochastic_tools/doc/content

>>>>>>> 46426fd27e (Docs and sqa changes (#21885))
Renderer:
type: MooseDocs.base.MaterializeRenderer

Extensions:
MooseDocs.extensions.navigation:
name: Isopod
repo: https://github.com/zachmprince/isopod
name: MOOSE Optimization Module
repo: https://github.com/idaholab/moose
home: /modules/optimization/index.md
menu:
Theory: getting_started/InvOptTheory.md
Getting Started:
Theory: getting_started/InvOptTheory.md
Running Optimization Problems: getting_started/RunningOptimization.md
Input Structure: getting_started/OptimizationInputStructure.md
Syntax: syntax/index.md
Examples: examples/index.md
Syntax: syntax/index.md

MooseDocs.extensions.appsyntax:
executable: ${ROOT_DIR}
executable: ${MOOSE_DIR}.modules/optimize
remove:
framework: !include ${MOOSE_DIR}/framework/doc/remove.yml
includes:
- framework/include
- modules/optimization/include
- modules/heat_conduction/include
- modules/stochastic_tools/include

MooseDocs.extensions.common:
shortcuts: !include ${MOOSE_DIR}/framework/doc/globals.yml

MooseDocs.extensions.acronym:
acronyms: !include ${MOOSE_DIR}/framework/doc/acronyms.yml

MooseDocs.extensions.template:
active: True
MooseDocs.extensions.sqa:
active: False
reports: !include ${ROOT_DIR}/doc/sqa_reports.yml
repos:
default: https://github.com/idaholab/isopod
moose: https://github.com/idaholab/moose
categories:
framework: !include ${MOOSE_DIR}/framework/doc/sqa_framework.yml
stochastic_tools: !include ${MOOSE_DIR}/modules/stochastic_tools/doc/sqa_stochastic_tools.yml
heat_conduction: !include ${MOOSE_DIR}/modules/heat_conduction/doc/sqa_heat_conduction.yml
tensor_mechanics: !include ${MOOSE_DIR}/modules/tensor_mechanics/doc/sqa_tensor_mechanics.yml
isopod: !include ${ROOT_DIR}/doc/sqa_isopod.yml
framework: !include framework/doc/sqa_framework.yml
optimization: !include modules/stochastic_tools/doc/sqa_optimization.yml
stochastic_tools: !include modules/stochastic_tools/doc/sqa_stochastic_tools.yml
heat_conduction: !include modules/heat_conduction/doc/sqa_heat_conduction.yml
@@ -0,0 +1,110 @@
# Input File Structure

## Basic Syntax

The input file used by Isopod (or any MOOSE application) is broken into
sections or blocks identified with square brackets. The type of input block is
placed in the opening brackets, and empty brackets mark the end of the block.

```text
[BlockName]
<block lines and subblocks>
[]
```

Each block may contain an arbitrary number of line commands to define
parameters related to that block. They can also optionally contain one
or more subblocks, which may in turn contain their own nested subblocks.
Subblocks are opened and closed with the following syntax:

```text
[./subblock_name]
<line commands>
[../]
```

Note that all subblocks contained within a given block must have unique
names (within the opening [] brackets).

Parameters are defined with line commands, and are given as key/value
pairs separated by an equals sign (=). They specify parameters to be
used by the object being described. The key is a string (no
whitespace), and the value may be a string, an integer, a real number,
or a list of strings, integers, or real numbers. Lists are given
in single quotes and are separated by whitespace.

The following are examples of line commands for a single parameter and
for a list of parameters:

```text
single_parameter = 2.3
list_of_parameters = '1.0 2.3 3.7'
```

Blocks and subblocks at any level can contain line commands, which must
be appropriate for the scope of the block containing them. Most of the
time, blocks are used to create instances of MOOSE objects, and contain
a ```type = ``` parameter to specify the type of MOOSE object to be
created. The name of the MOOSE object specified in the parameter
corresponds to the name of the class in the C++ source code.

Each object type has a unique set of input parameters that are valid for
specifying the behavior of that object. Some parameters are required,
and some are optional, and revert to default behavior if they are not
specified. An error message is generated if a line command does not
apply within the scope in which it is provided. Repeating a line within
a block also results in an error.

In this document, line commands are shown with the keyword, an equal
sign, and, in angle brackets, the value. If a default value exists for
that line command, it is shown in parentheses.

In the initial description of a block, line commands common to all
subblocks will be described. Those line commands are then omitted from
the description of the subblocks but are nonetheless valid line commands
for those subblocks.

The name of a subblock (`[./<name>]`) is arbitrary. However, these
names should be chosen to be meaningful because they can be used to
refer to those entities elsewhere in the input file. Not every created
entity is referenced elsewhere, but a name must be created for every
entity regardless.

## Summary of MOOSE Object Types

MOOSE is an objected-oriented system with well-defined interfaces for
applications to define their own physics-specific code modules. The
following is a listing of the major types of MOOSE objects used by Isopod:

- Variable
- Kernel
- AuxVariable
- AuxKernel
- Material
- BoundaryCondition
- Function
- Postprocessor
- VectorPostprocessor
- Constraint
- Damper

Specialized versions of these object types are implemented to provide
the functionality needed to model physics of interest for Isopod.

## Isopod Syntax Page

A complete listing of all input syntax options in MOOSE is available on
[the MOOSE Documentation page](http://mooseframework.org/documentation/).
See the section on Input File Documentation. Note also that you can run

```text
isopod-opt --dump
```

to get a list of valid input options for Isopod.

## Units

Isopod can be run using any unit system preferred by the
user. Empirical models within Isopod that depend on a specific unit
system are noted in this documentation.
@@ -0,0 +1,176 @@
# Obtaining and Running Isopod

## Checking Out the Code

Isopod uses the git revision control system, and its repository is
hosted on GitHub at [https://github.com/idaholab/isopod](https://github.com/idaholab/isopod).
The following steps are required for the initial checkout of
the code:

First, create a GitHub account and add an SSH key to your GitHub profile. Note that
this is not completely necessary, as you can check out the code without a GitHub
account using the https protocol. However, using ssh with a GitHub account is recommended,
as it makes it easier to contribute to the code later on. The instructions provided here just
document the steps to take, and more detailed information
on using ssh keys with GitHub is available [here](https://help.github.com/articles/connecting-to-github-with-ssh/).

First generate a public/private keypair and show the generated public key by
typing the following in a terminal:

```bash
ssh-keygen -t rsa -C "your_email"
cat ~/.ssh/id_rsa.pub
```

Then copy and paste the key to the 'SSH and GPG keys' section under the 'Settings' menu
in your GitHub user profile. Next clone the Isopod repository. This assumes
that you want the code to be in a directory named `projects` in your home directory, which
you have already created:

```bash
cd ~/projects/
git clone git@github.com:idaholab/isopod.git
```

Isopod requires a checkout of the MOOSE repository to link against. By default, the Isopod
build process looks for that in a directory called `moose` located in the same directory
that contains the `isopod` directory. Clone the MOOSE repository using the following command:

```bash
cd ~/projects/
git clone git@github.com:idaholab/moose.git
```

After doing this, the `~/projects` directory should contain `isopod` and `moose` subdirectories:
```bash
$ ls ~/projects/
isopod moose
```

It is necessary to build libMesh within the MOOSE repository before building any application:

```bash
cd ~/projects/moose/scripts
./update_and_rebuild_libmesh.sh
```

On a multiprocessor machine, this process can optionally be done in parallel by setting
the `JOBS` environment variable equal to the number of processors to be used. For example, to
build using 8 processors, the libMesh build script can be run as follows:
```bash
JOBS=8 ./update_and_rebuild_libmesh.sh
```

Once libMesh has compiled successfully, you may now compile Isopod:

```bash
cd ~/projects/isopod/
make (add -jn to run on multiple "n" processors)
```

Once Isopod has compiled successfully, it is recommended to run the tests
to make sure the version of the code you have is running correctly.

```bash
cd ~/projects/isopod/
./run_test (add -jn to run "n" jobs at one time)
```

## Updating Isopod

If it has been some time since you have checked out the code an update
will be required to gain access to the new features in Isopod.
First update Isopod:

```bash
cd ~/projects/isopod/
git pull --rebase
```

Then update MOOSE:

```bash
cd ~/projects/moose/
git pull --rebase
```

Next rebuild libMesh:

```bash
cd ~/projects/moose/scripts/
./update_and_rebuild_libmesh.sh
```

And finally recompile Isopod:

```bash
cd ~/projects/isopod/
make (add -jn to run on multiple "n" processors)
```

## Executing Isopod

When first starting out with Isopod, it is recommended to start from an
example problem similar to the problem that you are trying to solve.
Multiple examples can be found in isopod/test/tests/.
It may be worth running the example problems to see how the code works
and modifying input parameters to see how the run time, results and
convergence behavior change.

To demonstrate running Isopod, consider running one of the regression tests:

```bash
cd isopod/test/tests/concrete_ASR_swelling
# To run with one processor
~/projects/isopod/isopod-opt -i asr_confined.i
# To run in parallel (2 processors)
mpiexec -n 2 ~/projects/isopod/isopod-opt -i asr_confined.i
```

Note that the procedure for running this model in parallel is shown only
for illustrative purposes. This particular model is quite small, and would
not benefit from being run in parallel, although it can be run that way.

## Input to Isopod

Isopod simulation models are defined by the user through a text file
that defines the parameters of the run. This text file specifies the
set of code objects that are composed together to simulate a physical
problem, and provides parameters that control how those objects behave
and interact with each other. This text file can be prepared using any
text editor.

In addition to the text file describing the model parameters, Isopod also
requires a definition of the finite element mesh on which the physics
equations are solved. The mesh can be generated internally by Isopod using
parameters defined in Isopod's input file for very simple geometries, or can
be read from a file as defined in the Isopod input file. Isopod supports the
full set of mesh file formats supported by MOOSE, although the most common
mesh format is the ExodusII format.

## Post Processing

Isopod typically writes solution data to an ExodusII file. Data may also
be written in other formats, a simple comma separated file giving global
data being the most common.

Several options exist for viewing ExodusII results files. These include
commercial as well as open-source tools. One good choice is ParaView,
which is open-source.

ParaView is available on a variety of platforms. It is capable of
displaying node and element data in several ways. It will also produce
line plots of global data or data from a particular node or element.
Detailed information on ParaView is available on its project
[website](https://www.paraview.org).

## Graphical User Interface

It is worth noting that a graphical user interface (GUI) exists for all
MOOSE-based applications. This GUI is named Peacock. Information about
Peacock and how to set it up for use may be found on
[the MOOSE wiki page](http://mooseframework.org/wiki/Peacock).

Peacock may be used to generate a text input file. It is also capable of
submitting the analysis. It also provides basic post processing
capabilities.
2 changes: 1 addition & 1 deletion modules/optimization/doc/content/sqa/index.md
@@ -1 +1 @@
!template load file=app_index.md.template app=Isopod category=isopod
!template load file=app_index.md.template app=Optimization category=optimization
1 change: 0 additions & 1 deletion modules/optimization/doc/content/sqa/isopod_far.md

This file was deleted.

1 change: 0 additions & 1 deletion modules/optimization/doc/content/sqa/isopod_rtm.md

This file was deleted.

1 change: 0 additions & 1 deletion modules/optimization/doc/content/sqa/isopod_sdd.md

This file was deleted.

1 change: 0 additions & 1 deletion modules/optimization/doc/content/sqa/isopod_srs.md

This file was deleted.

2 changes: 0 additions & 2 deletions modules/optimization/doc/content/sqa/isopod_ssr.md

This file was deleted.

1 change: 0 additions & 1 deletion modules/optimization/doc/content/sqa/isopod_stp.md

This file was deleted.

1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_far.md
@@ -0,0 +1 @@
!template load file=app_far.md.template app=Optimization category=optimization
1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_rtm.md
@@ -0,0 +1 @@
!template load file=app_rtm.md.template app=Optimization category=optimization
1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_sdd.md
@@ -0,0 +1 @@
!template load file=app_sdd.md.template app=Optimization category=optimization
1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_sll.md
@@ -0,0 +1 @@
!template load file=app_sll.md.template app=Optimization category=optimization
1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_srs.md
@@ -0,0 +1 @@
!template load file=app_srs.md.template app=Optimization category=optimization
1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_ssr.md
@@ -0,0 +1 @@
!template load file=app_ssr.md.template app=Optimization category=optimization
1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_stp.md
@@ -0,0 +1 @@
!template load file=app_stp.md.template app=Optimization category=optimization
1 change: 1 addition & 0 deletions modules/optimization/doc/content/sqa/optimization_vvr.md
@@ -0,0 +1 @@
!template load file=app_vvr.md.template app=Optimization category=optimization
10 changes: 10 additions & 0 deletions modules/optimization/doc/sqa_optimization.yml
@@ -0,0 +1,10 @@
directories:
- ${MOOSE_DIR}/modules/optimization/test/tests
specs:
- tests
dependencies:
- framework
- heat_conduction
- stochastic_tools
repo: moose
reports: !include ${MOOSE_DIR}/modules/optimization/doc/sqa_reports.yml

0 comments on commit 703394b

Please sign in to comment.