-- test_pde_process_ucd.adb with Ada.Text_Io; use Ada.Text_Io; with Real_Arrays; use Real_Arrays; with Pde_Process_Ucd; use Pde_Process_Ucd; with Ada.Command_Line; procedure Test_Pde_Process_Ucd is File_Name1 : String := "pde_ucd2.inp"; File_Name : access String; Argc : Integer := Ada.Command_Line.Argument_Count; package Int_Io is new Integer_Io(Integer); use Int_Io; package Real_Io is new Float_Io(Real); use Real_Io; begin if Argc>0 then File_Name := new String'(Ada.Command_Line.Argument(1)); else File_Name := new String'(File_Name1); end if; Put_Line("test_pde_process_ucd.adb reading "&File_Name.all); Pde_Process_Ucd_File(File_Name.all); Put("nx="); Put(Nx,5); Put(", ny="); Put(Ny,5); Put(", nz="); Put(Nz,5); Put(", nt="); Put(Nt,5); New_Line; if Nx>1 then Put_Line("xg(1.."&Integer'Image(Nx)&")="); for I in 1..Nx loop Put_Line(Real'Image(Xg(I))); end loop; end if; if Ny>1 then Put_Line("yg(1.."&Integer'Image(Ny)&")="); for I in 1..Ny loop Put_Line(Real'Image(Yg(I))); end loop; end if; if Nz>1 then Put_Line("zg(1.."&Integer'Image(Nz)&")="); for I in 1..Nz loop Put_Line(Real'Image(Zg(I))); end loop; end if; if Nt>1 then Put_Line("tg(1.."&Integer'Image(Nt)&")="); for I in 1..Nt loop Put_Line(Real'Image(Tg(I))); end loop; end if; if Ndirchilet>0 then Put_Line("Ndirchilet="&Integer'Image(Ndirchilet)); if Nx>1 and Ny>1 and Nz<2 and Nt<2 then for I in 1..Nx loop for J in 1..Ny loop Put(Xg(I),4,4,0); Put(" "); Put(Yg(J),4,4,0); Put(" "); Put(Ub2(Xg(I),Yg(J))); New_Line; end loop; end loop; end if; -- 2D if Nx>1 and Ny>1 and Nz>1 and Nt<2 then for I in 1..Nx loop for J in 1..Ny loop for K in 1..Nz loop Put(Xg(I),4,4,0); Put(" "); Put(Yg(J),4,4,0); Put(" "); Put(Zg(K),4,4,0); Put(" "); Put(Ub3(Xg(I),Yg(J),Zg(K))); New_Line; end loop; end loop; end loop; end if; -- 3D if Nx>1 and Ny>1 and Nz>1 and Nt>1 then for I in 1..Nx loop for J in 1..Ny loop for K in 1..Nt loop for M in 1..Nz loop Put(Xg(I),4,4,0); Put(" "); Put(Yg(J),4,4,0); Put(" "); Put(Zg(K),4,4,0); Put(" "); Put(Tg(M),4,4,0); Put(" "); Put(Ub4(Xg(I),Yg(J),Zg(K),Tg(M))); New_Line; end loop; end loop; end loop; end loop; end if; -- 4D end if; if Nneumann > 0 then Put_Line("cell Nneumann="&Integer'Image(Nneumann)); for I in 1..Nneumann loop Put(I,5); Put(" "); Put(Neumann(I)); New_Line; end loop; end if; Put_Line("test_pde_process_ucd.adb finished."); end Test_Pde_Process_Ucd;