How to generate a fixed uniform training samples using PointwiseInteriorConstraint #1365
Unanswered
SinaAkhyani
asked this question in
Q&A
Replies: 1 comment
-
|
I figured it out by using the PointwiseConstraint class and .from_numpy() method. Full description of the arguments can be found in physicsnemo.sym.domain.constraint.PointwiseConstraint. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to generate a fixed uniform spatio-temporal ((x, t)) mesh using the PointwiseInteriorConstraint class for multiple time steps to have a full control on the training mesh?
I tried the following approach:
geo = Line1D(0, 10)
time_range_interior = np.linspace(1, 20, 100)
for j, time_val in enumerate(time_range_interior):
interior = PointwiseInteriorConstraint(
nodes=nodes,
geometry=geo,
outvar={"lmxs": 0, "lmxf": 0},
batch_size=cfg.batch_size.interior,
lambda_weighting={"lmxs": 1, "lmxf": 1},
parameterization={t_symbol: time_val},
fixed_dataset=True,
quasirandom=True,
)
domain.add_constraint(interior, f"interior_t{j}")
According to the above code, for each "time_val", different spatial points (x) are sampled from "geo". However, my goal is to use the same fixed set of spatial samples for all "interior_t{j}"s constraints.
I would appreciate your advice on this.
Beta Was this translation helpful? Give feedback.
All reactions