Hello, everyone.

I’m having trouble understanding the concept and usage of Spatial Weighting of Losses (SDF weighting).

In ldc example,

Introductory Example - NVIDIA Docs

# top wall

```
top_wall = PointwiseBoundaryConstraint(
nodes=nodes,
geometry=rec,
outvar={"u": 1.0, "v": 0},
batch_size=cfg.batch_size.TopWall,
lambda_weighting={"u": 1.0 - 20 * Abs(x), "v": 1.0}, # weight edges to be zero
criteria=Eq(y, height / 2),
)
ldc_domain.add_constraint(top_wall, "top_wall")
# no slip
no_slip = PointwiseBoundaryConstraint(
nodes=nodes,
geometry=rec,
outvar={"u": 0, "v": 0},
batch_size=cfg.batch_size.NoSlip,
criteria=y < height / 2,
)
ldc_domain.add_constraint(no_slip, "no_slip")
# interior
interior = PointwiseInteriorConstraint(
nodes=nodes,
geometry=rec,
outvar={"continuity": 0, "momentum_x": 0, "momentum_y": 0},
batch_size=cfg.batch_size.Interior,
lambda_weighting={
"continuity": Symbol("sdf"),
"momentum_x": Symbol("sdf"),
"momentum_y": Symbol("sdf"),
},
)
ldc_domain.add_constraint(interior, "interior")
```

For boundary constraints for #top wall, they use Spatial Weighting of Losses (SDF weighting) as

“1-20*abs(x)” to avoid sharp discontinuity.

My question here is,

- Why they chose “1-20
*abs(x)" as SDF weighting, for discontinuity also occurs in the center of x- direction in "1-20*abs(x)”, as well. - Does SDF means Signed Distance Function?

For # interior

interior = PointwiseInteriorConstraint,

lambda_weighting={

“continuity”: Symbol(“sdf”),

“momentum_x”: Symbol(“sdf”),

“momentum_y”: Symbol(“sdf”),

},

- What is the meaning of “Symbol(“sdf”)”?

I’d greatly appreciate it if you could answer the questions above. Thanks for the help!