30 PetscInt level = usermg->
mglevels - 1;
32 PetscReal tm_s, tm_e, tp_e, tpr_e;
34 PetscFunctionBeginUser;
91 ierr = PetscTime(&tm_s); CHKERRQ(ierr);
97 ierr =
ImpRK(user, NULL, NULL); CHKERRQ(ierr);
102 ierr =
RungeKutta(user, NULL, NULL); CHKERRQ(ierr);
105 ierr = PetscTime(&tm_e); CHKERRQ(ierr);
111 PetscReal unorm, pnorm, phinorm;
112 for (PetscInt bi = 0; bi < simCtx->
block_number; bi++) {
113 VecNorm(user[bi].Ucont, NORM_2, &unorm);
114 VecNorm(user[bi].P, NORM_2, &pnorm);
115 VecNorm(user[bi].Phi,NORM_2,&phinorm);
116 LOG_ALLOW(
GLOBAL,
LOG_DEBUG,
"Before Correction (Block %d): Ucont Norm = %e, P Norm = %e Phi Norm = %e \n", bi, unorm, pnorm, phinorm);
140 ierr = PetscTime(&tp_e); CHKERRQ(ierr);
150 for (PetscInt bi = 0; bi < simCtx->
block_number; bi++) {
162 ierr = PetscTime(&tpr_e); CHKERRQ(ierr);
169 for (PetscInt bi = 0; bi < simCtx->
block_number; bi++) {
170 VecNorm(user[bi].Ucont, NORM_2, &unorm);
171 VecNorm(user[bi].P, NORM_2, &pnorm);
172 VecNorm(user[bi].Phi,NORM_2,&phinorm);
173 LOG_ALLOW(
GLOBAL,
LOG_DEBUG,
"After Correction (Block %d): Ucont Norm = %e, P Norm = %e, Phi Norm = %e\n", bi, unorm, pnorm,phinorm);
181 for (PetscInt bi = 0; bi < simCtx->
block_number; bi++) {
215 simCtx->
step, tm_e - tm_s, tp_e - tm_e, tpr_e - tp_e, tpr_e - tm_s);
219 PetscFunctionReturn(0);
PetscErrorCode ImpRK(UserCtx *user, IBMNodes *ibm, FSInfo *fsi)
Advances the momentum equations using an iterative explicit Runge-Kutta scheme.
PetscErrorCode RungeKutta(UserCtx *user, IBMNodes *ibm, FSInfo *fsi)
Advances the momentum equations using an explicit 4th-order Runge-Kutta scheme.
#define LOG_ALLOW(scope, level, fmt,...)
Logging macro that checks both the log level and whether the calling function is in the allowed-funct...