Hello,
I’m trying to figure out the correct syntax for generating the matrices with
periodic boundary conditions with PETSc and vectorial FEspace, such as in the case of Stokes equations with periodic boundary conditions.
I looked at diffusion-periodic-2d-PETSc.edp and stokes-2D-PETSc.edp, and came up with this code, but I get an error:
load “PETSc” //
include “macro_ddm.idp” //
macro dimension()2// EOM // 2D or 3D
int[int] labPeriodic = [1,2,3,4];
macro Pk() [P2,P2,P1], periodic=[[2,y],[4,y]] //EOM
mesh Th = square(40,40);
Mat A;
int[int] n2o;
macro ThPeriodicity()labPeriodic//
macro ThN2O()n2o//
buildDmesh(Th)
//createMat(Th, A, Pk) //<--------------- This didn’t work either
buildMatPeriodic(Th, getARGV(“-split”, 1), A, Pk, piCommWorld,labPeriodic)