Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions examples/app/input-file.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ expressions = ["2 * pi^2 * sin(2 * pi * x) * sin(2 * pi * y)"]
variables = ["x", "y", "t"]

[mesh]
file_path = "poisson.g"
file_type = "exodus"
dimension = 2
"file path" = "poisson.g"
"file type" = "exodus"

[[boundary_conditions.dirichlet]]
[["boundary conditions".dirichlet]]
function = "zero_bc"
side_sets = ["sset_1", "sset_2"]
"side sets" = ["sset_1", "sset_2"]
variables = ["u"]

[[boundary_conditions.dirichlet]]
[["boundary conditions".dirichlet]]
function = "zero_bc"
side_sets = ["sset_3", "sset_4"]
"side sets" = ["sset_3", "sset_4"]
variables = ["u"]

[[boundary_conditions.source]]
[["boundary conditions".source]]
function = "source_func"
blocks = ["block_1"]
variables = ["u"]
Expand Down
41 changes: 41 additions & 0 deletions examples/app/input-file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
device:
backend: cpu

functions:
zero_ic:
type: scalar expression
expression: "0.0"
variables: [x, y]
zero_bc:
type: scalar expression
expression: "0.0"
variables: [x, y, t]
source_func:
type: vector expression
expressions:
- "2 * pi^2 * sin(2 * pi * x) * sin(2 * pi * y)"
variables: [x, y, t]

mesh:
dimension: 2
file path: poisson.g
file type: exodus

initial conditions:
- blocks: [block_1]
function: zero_ic
variables: [u]

boundary conditions:
dirichlet:
- function: zero_bc
side sets: [sset_1, sset_2]
variables: [u]
- function: zero_bc
side sets: [sset_3, sset_4]
variables: [u]

source:
- function: source_func
blocks: [block_1]
variables: [u]
3 changes: 2 additions & 1 deletion examples/app/src/MyApp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ include("Physics.jl")

# f(X, _) = 2. * π^2 * sin(2π * X[1]) * sin(2π * X[2])

const D = 2
const N = 1

function app_main(ARGS::Vector{String})
Expand All @@ -26,7 +27,7 @@ function app_main(ARGS::Vector{String})
##################################################
# Setup app
##################################################
app = AT.App{N}("MyApp")
app = AT.App{D, N}("MyApp")
sim = AT.setup(app, ARGS)

#####################################
Expand Down
Loading
Loading