Index: src_plugins/export_openems/export_openems.c =================================================================== --- src_plugins/export_openems/export_openems.c (revision 23006) +++ src_plugins/export_openems/export_openems.c (revision 23007) @@ -570,7 +570,8 @@ fprintf(ctx->f, "mesh.x = mesh.x .+ offset.x;\n"); fprintf(ctx->f, "mesh.y = offset.y .- mesh.y;\n"); fprintf(ctx->f, "mesh.z = z_bottom_copper .- mesh.z .+ offset.z;\n"); - fprintf(ctx->f, "mesh = AddPML(mesh, %d); %% add %d cells around the exterior of the existing mesh of \"perfectly matched\" impedance. 8 is just an example\n", mesh->pml, mesh->pml); + if (mesh->pml > 0) + fprintf(ctx->f, "mesh = AddPML(mesh, %d); %% add %d cells around the exterior of the existing mesh of \"perfectly matched\" impedance. 8 is just an example\n", mesh->pml, mesh->pml); fprintf(ctx->f, "CSX = DefineRectGrid(CSX, unit, mesh);\n"); fprintf(ctx->f, "\n"); }