<commit_before># MOOSE News (April 2019)

## MooseIndex type

Have you ever written a for loop like this?

```C++
for (unsigned int i = 0; i < vector.size(); ++i)
```

If so, you may have inadvertanently created a bug as we continue to scale MOOSE up!
Some of our bigger simulations are routinely reaching well into the millions of elements
and tens of millions of DOFs. While you may never loop over every single element or DOF
directly, there are still cases where you are processing information that exceeds the
storage capacity of `unsigned int`. For a long time, we've tried to make it easier to
deal with all of the different integer types that you may encounter in a for loop and
we've decided to make it foolproof for you.

We now have `MooseIndex`, which is always the right type (sign and size) to use it, simply
pass the instance you are looping to as an argument and it'll return the right type. Note that
you should only be using index based counters where range-based counters won't met your needs.

```C++
for (MooseIndex(some_vector) i = 0; i < some_vector.size(); ++i)

for (MooseIndex(num_values) i = 1; i < num_values; ++i)
```

Additionally a new "enumerate" function was added to MOOSE that is forwards compatible
with C++17 structured binding. You may use this method if you need both the index and
the value in a loop.

```C++
#include "Enumerate.h"

for (auto it : Moose::enumerate(values))
  _console << it.index() << ": " << it.value() << '\n';
```


## Miscallaneous enhancements and bug fixes

- The documentation for Postprocessors was improved: [Postprocessors/index.md].
- Scalar Variable values can now be read as an initial condition from an exodus file.
- Better formatting of solver norms when using `ReferenceResidualProblem`.
- Several GCC 8 fixes and LLVM 6 fixes in preparation for the next compiler package.
- Improved [Code Coverage](https://mooseframework.inl.gov/docs/coverage/moose/) reporting (Headers now included)
- Header symlinking can be turned off by exporting `MOOSE_HEADER_SYMLINKS=false` in your environment<commit_msg>Mention AD version of Navier Stokes<commit_after># MOOSE News (April 2019)

## MooseIndex type

Have you ever written a for loop like this?

```C++
for (unsigned int i = 0; i < vector.size(); ++i)
```

If so, you may have inadvertanently created a bug as we continue to scale MOOSE up!
Some of our bigger simulations are routinely reaching well into the millions of elements
and tens of millions of DOFs. While you may never loop over every single element or DOF
directly, there are still cases where you are processing information that exceeds the
storage capacity of `unsigned int`. For a long time, we've tried to make it easier to
deal with all of the different integer types that you may encounter in a for loop and
we've decided to make it foolproof for you.

We now have `MooseIndex`, which is always the right type (sign and size) to use it, simply
pass the instance you are looping to as an argument and it'll return the right type. Note that
you should only be using index based counters where range-based counters won't met your needs.

```C++
for (MooseIndex(some_vector) i = 0; i < some_vector.size(); ++i)

for (MooseIndex(num_values) i = 1; i < num_values; ++i)
```

Additionally a new "enumerate" function was added to MOOSE that is forwards compatible
with C++17 structured binding. You may use this method if you need both the index and
the value in a loop.

```C++
#include "Enumerate.h"

for (auto it : Moose::enumerate(values))
  _console << it.index() << ": " << it.value() << '\n';
```


## Miscallaneous enhancements and bug fixes

- There is now an automatic differentiation version of the incompressible Navier Stokes equations
- The documentation for Postprocessors was improved: [Postprocessors/index.md].
- Scalar Variable values can now be read as an initial condition from an exodus file.
- Better formatting of solver norms when using `ReferenceResidualProblem`.
- Several GCC 8 fixes and LLVM 6 fixes in preparation for the next compiler package.
- Improved [Code Coverage](https://mooseframework.inl.gov/docs/coverage/moose/) reporting (Headers now included)
- Header symlinking can be turned off by exporting `MOOSE_HEADER_SYMLINKS=false` in your environment
{'fraction_non_alphanumeric': 0.07712142522269104, 'fraction_numerical': 0.005157055789967183, 'mean_word_length': 4.505806451612903, 'pattern_counts': {'":': 2, '<': 25, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7647399', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1153, 'n_words': 627}