Lines Matching refs:physics

207   PhysicsCtx physics;  member
366 ctx->physics.sample = PhysicsSample_Advect; in PhysicsCreate_Advect()
367 ctx->physics.riemann = PhysicsRiemann_Advect; in PhysicsCreate_Advect()
368 ctx->physics.characteristic = PhysicsCharacteristic_Advect; in PhysicsCreate_Advect()
369 ctx->physics.destroy = PhysicsDestroy_SimpleFree; in PhysicsCreate_Advect()
370 ctx->physics.user = user; in PhysicsCreate_Advect()
371 ctx->physics.dof = 1; in PhysicsCreate_Advect()
372 PetscCall(PetscStrallocpy("u", &ctx->physics.fieldname[0])); in PhysicsCreate_Advect()
489 ctx->physics.sample = PhysicsSample_Burgers; in PhysicsCreate_Burgers()
490 ctx->physics.characteristic = PhysicsCharacteristic_Conservative; in PhysicsCreate_Burgers()
491 ctx->physics.destroy = PhysicsDestroy_SimpleFree; in PhysicsCreate_Burgers()
492 ctx->physics.user = user; in PhysicsCreate_Burgers()
493 ctx->physics.dof = 1; in PhysicsCreate_Burgers()
495 PetscCall(PetscStrallocpy("u", &ctx->physics.fieldname[0])); in PhysicsCreate_Burgers()
507 ctx->physics.riemann = r; in PhysicsCreate_Burgers()
614 ctx->physics.sample = PhysicsSample_Traffic; in PhysicsCreate_Traffic()
615 ctx->physics.characteristic = PhysicsCharacteristic_Conservative; in PhysicsCreate_Traffic()
616 ctx->physics.destroy = PhysicsDestroy_SimpleFree; in PhysicsCreate_Traffic()
617 ctx->physics.user = user; in PhysicsCreate_Traffic()
618 ctx->physics.dof = 1; in PhysicsCreate_Traffic()
620 PetscCall(PetscStrallocpy("density", &ctx->physics.fieldname[0])); in PhysicsCreate_Traffic()
634 ctx->physics.riemann = r; in PhysicsCreate_Traffic()
761 ctx->physics.sample = PhysicsSample_Acoustics; in PhysicsCreate_Acoustics()
762 ctx->physics.destroy = PhysicsDestroy_SimpleFree; in PhysicsCreate_Acoustics()
763 ctx->physics.user = user; in PhysicsCreate_Acoustics()
764 ctx->physics.dof = 2; in PhysicsCreate_Acoustics()
766 PetscCall(PetscStrallocpy("u", &ctx->physics.fieldname[0])); in PhysicsCreate_Acoustics()
767 PetscCall(PetscStrallocpy("v", &ctx->physics.fieldname[1])); in PhysicsCreate_Acoustics()
783 PetscCall(RiemannListFind(rlist, rname, &ctx->physics.riemann)); in PhysicsCreate_Acoustics()
784 PetscCall(ReconstructListFind(rclist, rcname, &ctx->physics.characteristic)); in PhysicsCreate_Acoustics()
974 ctx->physics.sample = PhysicsSample_IsoGas; in PhysicsCreate_IsoGas()
975 ctx->physics.destroy = PhysicsDestroy_SimpleFree; in PhysicsCreate_IsoGas()
976 ctx->physics.user = user; in PhysicsCreate_IsoGas()
977 ctx->physics.dof = 2; in PhysicsCreate_IsoGas()
979 PetscCall(PetscStrallocpy("density", &ctx->physics.fieldname[0])); in PhysicsCreate_IsoGas()
980 PetscCall(PetscStrallocpy("momentum", &ctx->physics.fieldname[1])); in PhysicsCreate_IsoGas()
994 PetscCall(RiemannListFind(rlist, rname, &ctx->physics.riemann)); in PhysicsCreate_IsoGas()
995 PetscCall(ReconstructListFind(rclist, rcname, &ctx->physics.characteristic)); in PhysicsCreate_IsoGas()
1132 ctx->physics.sample = PhysicsSample_IsoGas; in PhysicsCreate_Shallow()
1133 ctx->physics.destroy = PhysicsDestroy_SimpleFree; in PhysicsCreate_Shallow()
1134 ctx->physics.user = user; in PhysicsCreate_Shallow()
1135 ctx->physics.dof = 2; in PhysicsCreate_Shallow()
1137 PetscCall(PetscStrallocpy("density", &ctx->physics.fieldname[0])); in PhysicsCreate_Shallow()
1138 PetscCall(PetscStrallocpy("momentum", &ctx->physics.fieldname[1])); in PhysicsCreate_Shallow()
1151 PetscCall(RiemannListFind(rlist, rname, &ctx->physics.riemann)); in PhysicsCreate_Shallow()
1152 PetscCall(ReconstructListFind(rclist, rcname, &ctx->physics.characteristic)); in PhysicsCreate_Shallow()
1197 …PetscCall((*ctx->physics.characteristic)(ctx->physics.user, dof, &x[i * dof], ctx->R, ctx->Rinv, c… in FVRHSFunction()
1232 PetscCall((*ctx->physics.riemann)(ctx->physics.user, dof, uL, uR, ctx->flux, &maxspeed)); in FVRHSFunction()
1277 PetscInt i, j, dof = ctx->physics.dof; in FVIJacobian()
1291 …PetscCall((*ctx->physics.characteristic)(ctx->physics.user, dof, &x[i * dof], ctx->R, ctx->Rinv, c… in FVIJacobian()
1315 …PetscCheck(ctx->physics.sample, PETSC_COMM_SELF, PETSC_ERR_SUP, "Physics has not provided a sampli… in FVSample()
1327 …PetscCall((*ctx->physics.sample)(ctx->physics.user, ctx->initial, ctx->bctype, ctx->xmin, ctx->xma… in FVSample()
1390 PetscFunctionList limiters = 0, physics = 0; in main() local
1427 PetscCall(PetscFunctionListAdd(&physics, "advect", PhysicsCreate_Advect)); in main()
1428 PetscCall(PetscFunctionListAdd(&physics, "burgers", PhysicsCreate_Burgers)); in main()
1429 PetscCall(PetscFunctionListAdd(&physics, "traffic", PhysicsCreate_Traffic)); in main()
1430 PetscCall(PetscFunctionListAdd(&physics, "acoustics", PhysicsCreate_Acoustics)); in main()
1431 PetscCall(PetscFunctionListAdd(&physics, "isogas", PhysicsCreate_IsoGas)); in main()
1432 PetscCall(PetscFunctionListAdd(&physics, "shallow", PhysicsCreate_Shallow)); in main()
1443 …ics", "Name of physics (Riemann solver and characteristics) to use", "", physics, physname, physna… in main()
1459 PetscCall(PetscFunctionListFind(physics, physname, &r)); in main()
1466 PetscCall(DMDACreate1d(comm, DM_BOUNDARY_PERIODIC, 50, ctx.physics.dof, 2, NULL, &da)); in main()
1471 …for (i = 0; i < ctx.physics.dof; i++) PetscCall(DMDASetFieldName(da, i, ctx.physics.fieldname[i])); in main()
1542 PetscCall((*ctx.physics.destroy)(ctx.physics.user)); in main()
1543 for (i = 0; i < ctx.physics.dof; i++) PetscCall(PetscFree(ctx.physics.fieldname[i])); in main()
1553 PetscCall(PetscFunctionListDestroy(&physics)); in main()