Skip to content

Commit

Permalink
Merge pull request #25443 from GiudGiud/PR_catch_all
Browse files Browse the repository at this point in the history
Second catch all PR for the tutorial
  • Loading branch information
GiudGiud authored Sep 12, 2023
2 parents b24839d + 9d1acaa commit 1acda23
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion large_media
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Scientists are adept at creating applications in their domain
- What about collaborating across research groups and/or disciplines?

- Head in the sand?
- Iterating between design teams?
- Development of "coupling" codes?
- Is there something better?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,31 +229,31 @@ Write in inner product notation. Each term of the equation will inherit from an
!style! fontsize=60%

!row!
!col! width=20%
!col! width=15%
!listing test/tests/kernels/2d_diffusion/2d_diffusion_neumannbc_test.i block=Kernels remove=Kernels/active
!col-end!

!col! width=1%
$\quad$
!col-end!

!col! width=20%
!col! width=15%
!listing test/tests/kernels/2d_diffusion/2d_diffusion_neumannbc_test.i block=BCs remove=BCs/active BCs/left
!col-end!

!col! width=1%
$\quad$
!col-end!

!col! width=20%
!col! width=15%
!listing test/tests/dgkernels/1d_advection_dg/1d_advection_dg.i block=Kernels remove=Kernels/time_u
!col-end!

!col! width=1%
$\quad$
!col-end!

!col! width=20%
!col! width=15%
!listing test/tests/bcs/nodal_normals/circle_tris.i block=Kernels remove=Kernels/diff
!col-end!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,17 @@ $\psi_8$ is associated to the "center" node, it is symmetric and $\geq 0$ on the

!row!
!col! width=33%
!media darcy_thermo_mech/fem_quad9_phi0.png style=width:100% caption= $\psi_0$ prefix=''
!media darcy_thermo_mech/fem_quad9_phi0.png style=width:100% caption= $\psi_0$ prefix=' '
!col-end!

!col! width=33%
!col width=33%
!media darcy_thermo_mech/fem_quad9_phi4.png style=width:100%; caption= $\psi_4$ prefix=''
!media darcy_thermo_mech/fem_quad9_phi4.png style=width:100%; caption= $\psi_4$ prefix=' '
!col-end!

!col! width=33%
!col width=33%
!media darcy_thermo_mech/fem_quad9_phi8.png style=width:100%; caption= $\psi_8$ prefix=''
!media darcy_thermo_mech/fem_quad9_phi8.png style=width:100%; caption= $\psi_8$ prefix=' '
!col-end!

!row-end!
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Gaussian Quadrature can exactly integrate polynomials of order $2n-1$ with $n$ q

!---

Quadrature applied to [ref_elems] yields an equation that can be analyzed numerically:
Applying the quadrature to [ref_elems] we can simply compute:

!equation
\sum_e \int_{\hat{\Omega}_e} f(\vec{\xi}) \left|\mathcal{J}_e\right| \;\text{d}\vec{\xi} \approx
Expand Down Expand Up @@ -208,9 +208,9 @@ Some examples:

- LU : form the actual Jacobian inverse, useful for small to medium problems but does not scale well
- Hypre BoomerAMG : algebraic multi-grid, works well for diffusive problems
- jacobi : preconditions with the diagonal of Jacobian
- Jacobi : preconditions with the diagonal, row sum, or row max of Jacobian

Can also combine pre-conditioners using sub-preconditioning with option `-sub_pc_type`.
For parallel preconditioners, the sub-block (on-process) preconditioners can be controlled with the PETSc option `-sub_pc_type`. E.g. for a parallel block Jacobi preconditioner (-pc_type bjacobi) the sub-block preconditioner could be set to ILU or LU etc. with `-sub_pc_type ilu`, `-sub_pc_type lu`, etc.

!---

Expand All @@ -227,7 +227,7 @@ Integrals are computed numerically using quadrature.

Newton's method provides a mechanism for solving a system of nonlinear equations.

The Preconditioned Jacobian Free Newton Krylov (JFNK) method allows us to avoid explicitly forming
The Preconditioned Jacobian Free Newton Krylov (PJFNK) method allows us to avoid explicitly forming
the Jacobian matrix while still computing its action.

!---
Expand Down Expand Up @@ -286,6 +286,12 @@ Thus, the $i^{th}$ component of the residual vector is:

!---

!equation
\begin{aligned}
\vec{R}_i(u_h) = \left(\nabla\psi_i, k\nabla u_h \right) - \langle\psi_i, k\nabla u_h\cdot \hat{n} \rangle +
\left(\psi_i, \vec{\beta} \cdot \nabla u_h\right) - \left(\psi_i, f\right)
\end{aligned}

Using the previously-defined rules in [diff_u] and [grad_u] for $\frac{\partial u_h}{\partial u_j}$
and $\frac{\partial \left(\nabla u_h\right)}{\partial u_j}$, the $(i,j)$ entry of the Jacobian is
then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ where $\psi_i$ are the test functions and $u_h$ is the finite element solution.

## Input File(s)

All capabilities of MOOSE, modules, and your application are compiled into a single executable.
An input file is used to define which capabilities are used to perform a simulation.
An input file is used to represent the problem in MOOSE. It follows a very standardized
syntax.

MOOSE uses the "hierarchical input text" (hit) format.

Expand All @@ -37,7 +37,7 @@ A basic MOOSE input file requires six parts, each of which will be covered in gr
- `[Kernels]`: Define the equation(s) to solve
- `[BCs]`: Define the boundary condition(s) of the problem
- `[Executioner]`: Define how the problem will be solved
- `[Outputs]`: Define how the solution will be written
- `[Outputs]`: Define how the solution will be returned

!---

Expand All @@ -49,6 +49,9 @@ A basic MOOSE input file requires six parts, each of which will be covered in gr

## Step 1: Run

An executable is produced by compiling an application or a MOOSE module. It can be used
to run input files.

```bash
cd ~/projects/moose/tutorials/darcy-thermo_mech/step01_diffusion
make -j 12 # use number of processors for your system
Expand Down

0 comments on commit 1acda23

Please sign in to comment.