Skip to content

Commit

Permalink
Fix missing error for local links
Browse files Browse the repository at this point in the history
  • Loading branch information
aeslaughter committed Jan 12, 2021
1 parent 227da28 commit 7071b75
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 41 deletions.
14 changes: 7 additions & 7 deletions framework/doc/content/syntax/Kernels/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,27 @@ $\left(\frac{\partial (.)}{\partial u_j}\right)$, is defined as:

As mentioned, the `computeQpResidual` method must be overridden for both flavors of kernels non-AD
and AD. The `computeQpResidual` method for the non-AD version, [`Diffusion`](/Diffusion.md), is
provided in [#non-ad-residual].
provided in [non-ad-residual].

!listing framework/src/kernels/Diffusion.C id=non-ad-residual
re=Real\nDiffusion::computeQpResidual.*?}
caption=The C++ weak-form residual statement of [#weak-form] as implemented in the Diffusion kernel.
caption=The C++ weak-form residual statement of [weak-form] as implemented in the Diffusion kernel.

This object also overrides the `computeQpJacobian` method to define Jacobian term of [#jacobian] as
shown in [#non-ad-jacobian].
This object also overrides the `computeQpJacobian` method to define Jacobian term of [jacobian] as
shown in [non-ad-jacobian].


!listing framework/src/kernels/Diffusion.C id=non-ad-residual
!listing framework/src/kernels/Diffusion.C id=non-ad-jacobian
re=Real\nDiffusion::computeQpJacobian.*?}
caption=The C++ weak-form Jacobian statement of [#jacobian] as implemented in the Diffusion kernel.
caption=The C++ weak-form Jacobian statement of [jacobian] as implemented in the Diffusion kernel.


The AD version of this object, [`ADDiffusion`](/ADDiffusion.md), relies on an optimized kernel object
(see [#optimized]), as such it overrides `precomputeQpResidual` as follows.

!listing framework/src/kernels/ADDiffusion.C id=ad-residual
re=ADDiffusion::precomputeQpResidual.*?}
caption=The C++ pre-computed portions of the weak-form residual statement of [#weak-form] as implemented in the ADDiffusion kernel.
caption=The C++ pre-computed portions of the weak-form residual statement of [weak-form] as implemented in the ADDiffusion kernel.


## Time Derivative Kernels
Expand Down
2 changes: 1 addition & 1 deletion framework/doc/content/syntax/Materials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fashion.

## Default Material Properties

The [#material-name] input parameter also provides the ability to set default values for scalar
The `MaterialPropertyName` input parameter also provides the ability to set default values for scalar
(`Real`) properties. In the above example, the input file can use number or
parsed function (see [MooseParsedFunction.md]) to define a the property value. For example, the input
snippet above could set a constant value.
Expand Down
8 changes: 4 additions & 4 deletions modules/doc/content/python/MooseDocs/extensions/sqa.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ A dictionary that links the default requirement group names to the desired group
the list of directories provided in each category defined in each item of the "categories"
configuration option (see [#categories-config]). When listed this group is used to organize
the requirements (see [framework_srs.md]). The "requirement-groups" allows the group name to
be modified. For example, [#example-req-groups] demonstrates the use of this option.
be modified. For example, [example-req-groups] demonstrates the use of this option.

!listing caption=Example use of "requirement-groups" configuration option. id=example-req-groups
MooseDocs.extensions.sqa:
Expand All @@ -181,18 +181,18 @@ on [sqa/index.md] for MOOSE; please refer to [python/moosesqa/index.md] for addi
### +`default_collection`+

An option that includes a single string that provides the default collection name
(see [#collections]) for requirements. This option defaults to "FUNCTIONAL", thus all requirements
(see [#requirements-list]) for requirements. This option defaults to "FUNCTIONAL", thus all requirements
gathered from the specifications are considered to be functional requirements by default.

### +`append_run_exception_to_failure_analysis`+

A boolean that when true (the default) adds the "FAILURE_ANALYSIS" collection (see [#collections])
A boolean that when true (the default) adds the "FAILURE_ANALYSIS" collection (see [#requirements-list])
to all [RunException](framework_stp.md#approval-requirements) tests.

## Requirements List

The `sqa requirements` command will list all the requirements located in the test specifications
for a project; [#sqa-requirements] lists all the available settings for this command. Please
for a project; [sqa-requirements] lists all the available settings for this command. Please
refer to the [moose_srs.md#system-requirements] for example use.

!devel settings id=sqa-requirements
Expand Down
18 changes: 8 additions & 10 deletions modules/phase_field/test/tests/conserved_noise/tests
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
[Tests]
issues = '#4763'
design = 'phase_field/Nucleation/LangevinNoise.md'

[./integral]
type = 'CSVDiff'
input = 'integral.i'
csvdiff = 'integral.csv'
issues = '#4763'
design = '/Nucleation/conservednoise_include.md'

requirement = 'A system to supply a noise field with a domain integral of zero shall be provided'
[../]
[./normal]
max_parallel = 1
type = 'Exodiff'
input = 'normal.i'
exodiff = 'normal.e'
issues = '#4763'
design = '/Nucleation/conservednoise_include.md'

requirement = 'A system to supply a normal distributed noise field with a domain integral of zero shall be provided'
[../]
[./uniform]
max_parallel = 1
type = 'Exodiff'
input = 'uniform.i'
exodiff = 'uniform.e'
issues = '#4763'
design = '/Nucleation/conservednoise_include.md'

requirement = 'A system to supply a uniformly distributed noise field with a domain integral of zero shall be provided'
[../]
[./integral_normal_masked]
type = 'CSVDiff'
input = 'normal_masked.i'
csvdiff = 'normal_masked.csv'
issues = '#4763'
design = '/Nucleation/conservednoise_include.md'

requirement = 'A system to supply a normal distributed noise field with an amplitude mask and a domain integral of zero shall be provided'
[../]

Expand All @@ -39,8 +38,7 @@
input = 'integral.i'
cli_args = 'Kernels/conserved_langevin/seed=1234'
expect_err = "This parameter has no effect in this kernel. The noise is generated in the user object"
issues = '#14368'
design = '/Nucleation/conservednoise_include.md'

requirement = "The conserved noise kernel shall error out with a helpful message if a 'seed' parameter is supplied"
[../]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ the vectors supplied.

If CSV output is enabled, the [SobolStatistics.md] object will write a file that contains
columns of data. Each column comprises of the computed indices for the quantities of
interest. For example, [#sobol_out] is the complete output from the [SobolStatistics.md] object
interest. For example, [sobol_out] is the complete output from the [SobolStatistics.md] object
for this example problem.

!listing caption=Computed Sobol indices for the example heat conduction problem. id=sobol_out
Expand All @@ -70,7 +70,7 @@ $s$). The next four rows contain the total-effect indices. The final rows contai
indices, see [SobolStatistics.md] for further information regarding the output.

For the problem at hand, the first-order and second-order indices for the two quantities of interest
are presented in [#S_T_avg] and [#S_q_left]. The diagonal entries are the first-order incides and
are presented in [S_T_avg] and [S_q_left]. The diagonal entries are the first-order incides and
the off-diagonal terms are the second-order indices. For example for $T_{avg}$ the first order-index
for $\gamma$ is $S_1 = 0.763$ and the second-order index $S_{1,2} = 0.014$ for $\gamma$ interacting
with $q_0$. The negative values are essentially zero, if more replicates were executed these
Expand All @@ -96,7 +96,7 @@ The data in these two tables clearly indicates that a majority of the variance o
interest are due to the variance of $\gamma$ ($S_1$) and $q_0$ ($S_2$). Additionally, a small
contribution of the variance is from a second-order interaction, $S_{1,2}$, between $\gamma$ and
$q_0$. The importance of $\gamma$ and $q_0$ if further evident by the total-effect indices, as shown in
[#total-effect].
[total-effect].

!table id=total-effect caption=Total-effect Sobol indices for $T_{avg}$ and $q_{left}$.
| $S_T$ | 1 ($\gamma$) | 2 ($q_0$) | 3 ($T_0$) | 4 ($s$) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ Follow the MOOSE standards for [contributing code and documentation](MooseDocs/g
## Software Quality

The Tensor Mechanics module follows strict software quality guidelines, refer to
[tensor_mechanics/sqa/index.md] for more information.
[Tensor Mechanics SQA](tensor_mechanics/sqa/index.md) for more information.
4 changes: 4 additions & 0 deletions python/MooseDocs/extensions/autolink.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ def createHTMLHelper(self, parent, token, page, desired):
else:
link['class'] = 'moose-error'
tokens.String(link, content=url)
msg = "Unable to locate local heading with URL '{}'".format(url)
LOG.error(common.report_error(msg, page.source,
token.info.line if token.info else None,
token.info[0] if token.info else token.text()))
else:
token.copyToToken(link)

Expand Down
6 changes: 3 additions & 3 deletions python/MooseDocs/test/content/extensions/acronym.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

[!ac](MTU)

# Page Acronym List
## Page Acronym List

!acronym list

# Directory Acronym List
## Directory Acronym List

!acronym list location=extensions

# Complete Acronym List
## Complete Acronym List

!acronym list complete=True
4 changes: 0 additions & 4 deletions python/MooseDocs/test/content/extensions/autolink.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,3 @@
[index.md exact=True]

[Home](index.md exact=True)

## Incorrect Bookmark

[core.md#wrong]
10 changes: 2 additions & 8 deletions python/mooseutils/eval_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,12 @@
import os
import re

def __sub(match):
"""Substitute function for environment variables."""
env = match.group('env')
if env in os.environ:
return os.environ[env]
return match.group()

def eval_path(path):
"""
Import environment variables into paths.
Inputs:
path[str]: Path containing environment variable: e.g., ${MOOSE_DIR}/python
"""
return re.sub(r'\$\{(?P<env>.*?)\}', __sub, path)
assert isinstance(path, str), "Input argument must be a 'str', '{}' provided".format(type(path))
return re.sub(r'\$\{(?P<env>.*?)\}', lambda m: os.environ.get(m.group('env'), m.group()), path)

0 comments on commit 7071b75

Please sign in to comment.