Skip to content
Snippets Groups Projects
Commit 5cf0bdc9 authored by Thorsten Ohl's avatar Thorsten Ohl
Browse files

tho/UFO2: misc [ci skip]

parent ca9428b2
Branches tho/UFO2
No related tags found
No related merge requests found
......@@ -948,7 +948,7 @@ module Fortran : T =
" ! %s = %s"
name (F.dirac_string_to_string ds.F.atom); nl();
let gamma = F.dirac_string_to_matrix (fun _ -> -1) ds.F.atom in
dirac_sandwich_to_fortran "ds" bra gamma ket; nl();
dirac_sandwich_to_fortran name bra gamma ket; nl();
(name, [])
| indices ->
printf
......@@ -995,12 +995,15 @@ module Fortran : T =
(fun indent ->
printf "%*ssum = sum + 1" indent "";
List.iter
(fun (name, indices) ->
printf
" * %s(%s)"
name
(String.concat "," (List.map index_variable indices)))
contractions)
(function
| (name, []) -> printf " * %s" name
| (name, indices) ->
printf
" * %s(%s)"
name
(String.concat "," (List.map index_variable indices)))
contractions);
nl ()
let fusion_to_fortran wfs fusion =
contract_indices
......@@ -1052,7 +1055,7 @@ module Fortran : T =
end;
printf " ! %s" (unparse fusion); nl ();
printf " @[<2>%s = ... " wfs.(0).name; nl ();
List.iter (fusion_to_fortran wfs) fusion; nl ();
List.iter (fusion_to_fortran wfs) fusion;
printf "end function %s" prefix; nl ();
()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment