I’m trying to convert some code to use PETSc. I tried to copy an example but got
various compile errors and then seg faults at run time. I isolated a problem upstream
but have not verified to is a problem later. At issue seems tobe the name of the mesh and
requirement for macro defs that are suspcious later on. For example, the two attached files
differ only in Th vs Th3 for the mesh name but Th3 fails at compile without the defs for def and
init lol. What is the deal here? Am I missing something simple? Thanks.
mwe_defs3.edp (1.6 KB)
mwe_defs.edp (1.5 KB)
diff mwe*
32c32
< mesh3 Th3 = cube(Xpts,Ypts,Tpts);
---
> mesh3 Th = cube(Xpts,Ypts,Tpts);
34c34
< Th3=change(Th3,refface=chlab);
---
> Th=change(Th,refface=chlab);
39c39
< buildDmesh(Th3)
---
> buildDmesh(Th)
41d40
< // need to uncomment naming mesh Th3 and then it bombs during run ???
46c45
< createMat(Th3, AP, Pk)
---
> createMat(Th, AP, Pk)
4967 ff-mpirun -np 1 mwe_defs.edp -wg
4968 vi mwe_defs.edp
4969 cp mwe_defs.edp mwe_defs3.edp
4970 vi mwe_defs3.edp
4971 ff-mpirun -np 1 mwe_defs3.edp -wg