Skip to content

Commit

Permalink
Remove all C++ from systems definitions
Browse files Browse the repository at this point in the history
Add more on some systems
  • Loading branch information
GiudGiud committed Jan 29, 2025
1 parent 018c104 commit bec6818
Show file tree
Hide file tree
Showing 49 changed files with 112 additions and 1,379 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@

!---

!include user_workshop/systems_user/mooseobject.md

!---

!include user_workshop/systems_user/inputparameters.md

!---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ A system for the programmatic creation of simulation objects and input file synt
### Syntax

Action recognize syntax such as `[Kernels]` or `[Outputs]` and perform actions based on them.
Many actions simply create an object, using the `type` parameter. Other parse parameters
in the block and perform the relevant setup steps.

!---

<<<<<<< HEAD
## Tasks
=======
## Syntax and Tasks
>>>>>>> a95471b138 (Add intermediary steps back to the simulations)

The MOOSE action system operates on tasks, each task is connected to one or many actions.


Tasks are ordered based on their dependencies, which are set by the developers. This ensures
the correctness of the simulation setup.
To see tasks being executed, use `Debug/show_actions=true`.

!---

Expand All @@ -32,6 +31,16 @@ An action designed to build one or many other MooseObjects, such as in the case
## Physics

An action designed to build an entire equation. Solid mechanics, computational fluid dynamics, heat conduction
are all implemented as Physics.
are all implemented as Physics. Depending on the `Physics`, it can include only the kernels, or also include
boundary conditions and material properties.

!listing problems/step10.i block=Physics

!---

`Physics` are meant to facilitate numerous simulation common needs such as:

- multi-system simulation setups
- preconditioning
- initialization from mesh files
- interaction with other `Physics`, creating the adequate coupling terms

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,41 +69,9 @@ other nodal auxiliary variables

!---

## AuxKernel Objects

Directly compute AuxVariable values by overriding `computeValue()` and they can operate on
both elemental and nodal auxiliary variable.

When operating on a nodal variable `computeValue()` operates on each node; when operating
on a elemental variable it operates on each element.

!---

## AuxKernel Object Members

`_u`, `_grad_u`\\
Value and gradient of variable this AuxKernel is operating on

`_q_point`\\
Coordinates of the current q-point that is only valid for elemental AuxKernels, `_current_node`
should be used for nodal variables

`_qp`\\
Current quadrature point, this indexing is used for both nodal (`_qp=0` at the node) and elemental variables for consistency

`_current_elem`\\
Pointer to the current element that is being operated on (elemental only)

`_current_node`\\
Pointer to the current node that is being operated on (nodal only)

!---

## VectorAuxKernel Objects

Directly compute a vector AuxVariable values by:
- inheriting from the `VectorAuxKernel` class
- overriding `computeValue()`, with the difference being the return value of a `RealVectorValue` instead of Real.
`VectorAuxKernels` can compute vector auxiliary variables.

The auxiliary variable will have to be one of the vector types (LAGRANCE_VEC, MONOMIAL_VEC or NEDELEC_VEC).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,60 +12,17 @@ There are two flavors of BC objects: Nodal and Integrated.

## Integrated BC

Integrated BCs are integrated over a boundary or internal side and should inherit
from `ADIntegratedBC`.
Integrated BCs are integrated over a boundary or internal side. They are meant to add a
surface integral term, coming from example from the application of the divergence theorem.

The structure is very similar to Kernels: objects must override `computeQpResidual`

!---

## ADIntegratedBC Object Members

`_u`, `_grad_u`\\
Value and gradient of the variable this Kernel is operating on

`_test`, `_grad_test`\\
Value ($\psi$) and gradient ($\nabla \psi$) of the test functions at the quadrature points

`_phi`, `_grad_phi`\\
Value ($\phi$) and gradient ($\nabla \phi$) of the trial functions at the quadrature points

`_i`, `_j`, `_qp`\\
Current index for test function, trial functions, and quadrature point, respectively

`_normals`:\\
Outward normal vector for boundary element

`_boundary_id`\\
The boundary ID

`_current_elem`, `_current_side`\\
A pointer to the element and index to the current boundary side
This integral is computed using a surface quadrature.

!---

## Non-Integrated BC

Non-integrated BCs set values of the residual directly on a boundary or internal side and
should inherit from `ADNodalBC`.

The structure is very similar to Kernels: objects must override `computeQpResidual`.

!---

## NodalBC Object Members

`_u`\\
Value of the variable this Kernel is operating on

`_qp`\\
Current index, used for interface consistency

`_boundary_id`\\
The boundary ID

`_current_node`\\
A pointer to the current node that is being operated on.
Non-integrated BCs set values of the residual directly on a boundary or internal side.
They do not rely a quadrature-point based integration.

!---

Expand All @@ -83,18 +40,6 @@ u - g_1 = 0 \quad \text{on} \quad \partial\Omega_1

!---

## DirichletBC.h

!listing framework/include/bcs/DirichletBC.h

!---

## DirichletBC.C

!listing framework/src/bcs/DirichletBC.C

!---

## Integrated BCs

Integrated BCs (including Neumann BCs) are actually integrated over the external face of an element.
Expand All @@ -116,19 +61,6 @@ becomes:
If $\nabla u \cdot \hat{\boldsymbol n} = 0$, then the boundary integral is zero
("natural boundary condition").


!---

## NeumannBC.h

!listing framework/include/bcs/NeumannBC.h

!---

## NeumannBC.C

!listing framework/src/bcs/NeumannBC.C

!---

## Periodic BCs
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,3 @@ solver. Here are a few common options:
| `nl_rel_tol` | Nonlinear Relative Tolerance (default: 1e-8) |
| `nl_abs_tol` | Nonlinear Absolute Tolerance (default: 1e-50) |
| `nl_max_its` | Max Nonlinear Iterations (default: 50) |


!---

## TimeKernel Object

The TimeKernel object adds two member variables to a Kernel object:

`_u_dot`\\
Time derivative of the associated nonlinear variable

`_du_dot_du`\\
The derivative of _u_dot with respect to _u

!---

## TimeKernel Base Classes

| Base | Override | Use |
| :- | :- | :- |
| TimeKernel\\ +ADTimeKernel+ | computeQpResidual | Use when the time term in the [!ac](PDE) is multiplied by both the test function and the gradient of the test function (`_test` and `_grad_test` must be applied) |
| TimeKernelValue\\ +ADTimeKernelValue+ | precomputeQpResidual | Use when the time term computed in the [!ac](PDE) is only multiplied by the test function (do not use `_test` in the override, it is applied automatically) |
| TimeKernelGrad\\ +ADTimeKernelGrad+ | precomputeQpResidual | Use when the time term computed in the [!ac](PDE) is only multiplied by the gradient of the test function (do not use `_grad_test` in the override, it is applied automatically) |

This file was deleted.

Loading

0 comments on commit bec6818

Please sign in to comment.