Single run with FOM - LLNL/scaleupROM GitHub Wiki


In this tutorial, we run the following commands:

cd examples/poisson
../../bin/main -i poisson.yml
../../bin/main -i poisson.yml -f single_run/poisson0/k=1.5
../../bin/main -i poisson.component.yml

The main category in the input file specifies the mode of main and the type of the solver. For example, examples/poisson/poisson.yml specifies,

  mode: single_run
  use_rom: false
  solver: poisson

that (1) it is single_run mode, (2) FOM simulation will be run, and (3) Poisson equation will be solved.

Parameterized problem

At single_run mode, the equation will be solved on a particular right-hand side function and boundary condition set by the parameterized problem. In the tutorial for main driver, we ran the following command:

cd examples/poisson
../../bin/main -i poisson.yml

In examples/poisson/poisson.yml, the type of the parameterized problem is set as:

  name: poisson0

The parameterized problem poisson0 defines a right-hand side and a boundary condition as: $$-\nabla^2 u = \sin2\pi\left(kx + ky + kz + \theta\right)$$ $$u = 0 \qquad \text{on } \partial D$$ with parameters $k$ and $\theta$. The parameters for each parameterized problem can be set under single_run/[the name of parameterized problem]. For example of examples/poisson/poisson.yml,

    k: 2.5

which sets the parameters as: $$k = 2.5$$ If the parameter values are not specified, hard-coded default values are used instead ($\theta=0$ by default).

There are a variety of parameterized problems defined for each physics solver, which can be found in the source code include/parameterized_problem.hpp.

It is possible to change these parameter values at runtime using forced inputs, as instructed here. For example, if we want to solve the same problem as above but with a different $k$,

../../bin/main -i poisson.yml -f single_run/poisson0/k=1.5

will return a solution with $k=1.5$,

Domain decomposition

Domain decomposition option is set up in the input file as:

  type: interior_penalty

Currently either interior_penalty or none is supported:

  • interior_penalty: DG interface enforcement between subdomains
  • none: The interfaces between subdomains are considered continuous. The equation is solved on a unified large mesh.

Mesh options


scaleupROM can use SubMesh feature for automatic decomposition, where you can simply specify one mesh filename. In the example of examples/poisson/poisson.yml,

  filename: meshes/test.2x2.mesh

The domain is then decomposed according to element attributes. (For element attribute and the mesh format, see MFEM's documentation). In the example of examples/poisson/poisson.yml, the domain is decomposed into 4 subdomains as shown below:

When using a single mesh file, it needs to cover the global, large scale domain and it cannot be built from unit cells in a bottom-up way.

Component Meshes

In case of using component meshes, we need to specify component mesh files and the global configuration file that specifies the global topology and boundaries. For example, in examples/poisson/poisson.component.yml,

  type: component-wise
  uniform_refinement: 2
    global_config: "config/2x2_config.h5"
      - name: "empty"
        file: "meshes/square.mesh"
      - name: "square-circle"
        file: "meshes/square-circle.mesh"
      - name: "square-square"
        file: "meshes/square-square.mesh"
      - name: "square-triangle"
        file: "meshes/square-triangle.mesh"
      - name: "square-star"
        file: "meshes/square-star.mesh"

We defer the description of the data format used for the global configuration to here. Running the single run with this input file

../../bin/main -i poisson.component.yml

saves the solution visualization on each subdomain at paraview_output_0, paraview_output_1, ...

Currently, scaleupROM does not support saving the unified paraview when component meshes are used, and each subdomain paraview file has to be loaded one by one. Fortunately, ParaView provides automatic python script generator to create a macro. For the example of examples/poisson/poisson.component.yml, you can import the macro file examples/poisson/ from ParaView.

NOTE: before importing the macro file on ParaView, specify the path to visualization directories at the first line of examples/poisson/

### Set the root directory where paraview_output_0, ... are located.
root_dir = '/absolute/path/to/your/paraview/output'

Running the macro will visualize the solution as below: