summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmds2/check_perturbative_approach/Makefile28
-rw-r--r--xmds2/check_perturbative_approach/pp.m22
2 files changed, 44 insertions, 6 deletions
diff --git a/xmds2/check_perturbative_approach/Makefile b/xmds2/check_perturbative_approach/Makefile
new file mode 100644
index 0000000..79e73d2
--- /dev/null
+++ b/xmds2/check_perturbative_approach/Makefile
@@ -0,0 +1,28 @@
+### -*- make -*-
+### This makefile can be used to build and run the XMDS examples
+
+
+XSIL_FILES = $(shell ls *.xsil)
+M_FILES = $(patsubst %.xsil,%.m,$(XSIL_FILES))
+
+XSIL2GRAPHICS = xsil2graphics
+
+all: Nlevels_no_dopler_with_z_4wm_with_perturbations.xsil Nlevels_no_dopler_with_z_4wm.xsil $(M_FILES)
+
+Nlevels_no_dopler_with_z_4wm_with_perturbations.xsil: ../Nlevels_no_dopler_with_z_4wm_with_perturbations/Nlevels_no_dopler_with_z_4wm_with_perturbations.run
+ $<
+
+Nlevels_no_dopler_with_z_4wm.xsil: ../Nlevels_no_dopler_with_z_4wm/Nlevels_no_dopler_with_z_4wm.run
+ $<
+
+%.m: %.xsil
+ $(XSIL2GRAPHICS) $<
+
+plot: $(M_FILES)
+ octave pp.m
+
+clean:
+ rm -f $(CC_FILES) $(RUN_FILES) $(M_FILES) $(XSIL_FILES) *.wisdom.fftw3 *.dat octave-core *.wisdom *.pdf
+
+.PRECIOUS: %.run %.xsil %.m
+.PHONY: all clean
diff --git a/xmds2/check_perturbative_approach/pp.m b/xmds2/check_perturbative_approach/pp.m
index a80c9c4..e9c3847 100644
--- a/xmds2/check_perturbative_approach/pp.m
+++ b/xmds2/check_perturbative_approach/pp.m
@@ -3,19 +3,27 @@
% we treat as constant (along z and t) during propagation. We keep track only of coherences
% created by week fields E2 and E4.
-% Code below checks result of two solvers. User shuold double check that
+% In perturbative approach:
+% rho11, rho22, rho33, rho13, rho24, and rho44 dpepend only on E1 and E2.
+% They are also treated ad time independent.
+% only r12 r14 r23 r34 treated fully since they are driven by weak fields E2 and E4
+% which are strongly z dependent as well as E1 and E2 and time.
+
+% Code below checks result of two solvers. User should double check that
% scripts are run with the same command line and internal dimensions are the
% same.
% Notice that all fields feel the propagation but E1 and E2 will look like time
-% independent in the perturbation approach
+% independent in the perturbation approach.
%% Loading fields data files
% let's load exact solver solutions
-fpDat = fopen('../Nlevels_no_dopler_with_z_4wm/Nlevels_no_dopler_with_z_mg0.dat', 'r', 'ieee-le');
+fname='./Nlevels_no_dopler_with_z_4wm_mg0.dat';
+fpDat = fopen(fname, 'r', 'ieee-le');
if (fpDat < 0)
- disp('Cannot open binary data file: Nlevels_no_dopler_with_z_mg0.dat')
+ msg=strcat('Cannot open binary data file: ', fname);
+ disp(msg)
return
end
z_1Len = fread(fpDat, 1, 'uint32');
@@ -37,9 +45,11 @@ clear fpDat z_1Len t_1Len I1_out_1Len I2_out_1Len I3_out_1Len I4_out_1Len
% let's load perturbative solver solutions
-fpDat = fopen('../Nlevels_no_dopler_with_z_4wm_with_perturbations/Nlevels_no_dopler_with_z_mg0.dat', 'r', 'ieee-le');
+fname = './Nlevels_no_dopler_with_z_4wm_with_perturbations_mg0.dat';
+fpDat = fopen(fname, 'r', 'ieee-le');
if (fpDat < 0)
- disp('Cannot open binary data file: Nlevels_no_dopler_with_z_mg0.dat')
+ msg=strcat('Cannot open binary data file: ', fname);
+ disp(msg)
return
end
z_1Len = fread(fpDat, 1, 'uint32');