SpinGlassSimulations added (and removed junk)
This commit is contained in:
parent
69c3497bee
commit
58c48f9e21
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,91 +0,0 @@
|
||||
!----------------------------------------------------------------------------------------
|
||||
! test for precession, ge nieuwenhuys, Oktober 25, 2005
|
||||
!----------------------------------------------------------------------------------------
|
||||
!
|
||||
! The initial muon direction is given by the unit vector emu, the magnetic field
|
||||
! is b (vector) and the observer (positroncounter) is supposed to be in the
|
||||
! direction of the unit-vector observer.
|
||||
!
|
||||
USE DFLIB
|
||||
!
|
||||
real*8 b(3), eb(3), emu(3), gyro(3), azi(3), length_b, length_gyro, length_azi
|
||||
real*8 observer(3), amplitude, help(3), cos_phase, phase
|
||||
real*8 length, saclar_pruduct, length_vector_product
|
||||
|
||||
1 write(6,2)
|
||||
2 format(' Give initial muon > '\)
|
||||
read(5,*,err=1) emu
|
||||
emu = emu / length(emu)
|
||||
3 write(6,4)
|
||||
4 format(' Give field > '\)
|
||||
read(5,*,err=3) b
|
||||
length_b = length( b )
|
||||
IF ( length_b .LT. 0.001 ) GOTO 1
|
||||
5 write(6,6)
|
||||
6 format(' Give observer > '\)
|
||||
read(5,*,err=5) observer
|
||||
IF ( length(observer) .LT. 0.01 ) GOTO 3
|
||||
observer = observer / length( observer)
|
||||
!
|
||||
eb = b / length_b ! unit vector along b
|
||||
length_azi = scalar_product( emu, eb ) ! length of azimuth of cone
|
||||
azi = length_azi * eb ! vector with length parallel to field
|
||||
length_gyro = length_vector_product( emu, eb ) ! length of the radius of base circle
|
||||
gyro = emu - azi ! that radius as vector at t = 0
|
||||
amplitude = length_vector_product( observer, eb ) ! the projection of the radius on the
|
||||
! direction of the observer.
|
||||
!
|
||||
! Spin will rotate around the field, and start -of course- from the initial spin direction.
|
||||
! So the radial vector at t=0 equals emu - azi, while the amplitude is the length
|
||||
! of the vector product observer, field. That means that the cosine of the phase angle
|
||||
! is the projection of gyro on the observer direction divided by the amplitude.
|
||||
!
|
||||
IF ( abs( amplitude ) .GT. 1D-09 ) THEN
|
||||
cos_phase = scalar_product( gyro, observer ) / amplitude
|
||||
ELSE
|
||||
cos_phase = 1.0
|
||||
END IF
|
||||
!
|
||||
phase = acos( cos_phase )
|
||||
!
|
||||
write(6,'(a,3f10.5)') ' emu = ', emu
|
||||
write(6,'(a,3f10.5)') ' eb = ', eb
|
||||
write(6,'(a,1f10.5)') ' length_azi = ', length_azi
|
||||
write(6,'(a,3f10.5)') ' azi = ', azi
|
||||
write(6,'(a,1f10.5)') ' length_gyro= ', length_gyro
|
||||
write(6,'(a,3f10.5)') ' gyro = ', gyro
|
||||
write(6,'(a,1f10.5)') ' amplitude = ', amplitude
|
||||
write(6,'(a,1f10.5)') ' cos_phase = ', cos_phase
|
||||
write(6,'(a,1f10.5)') ' phase = ', phase
|
||||
write(6,*) ' '
|
||||
!
|
||||
GOTO 5
|
||||
!
|
||||
END
|
||||
!
|
||||
real*8 FUNCTION length( v )
|
||||
real*8 v(3)
|
||||
length = sqrt( sum( v * v ) )
|
||||
RETURN
|
||||
END
|
||||
!
|
||||
real*8 FUNCTION scalar_product( v, w )
|
||||
real*8 v(3), w(3)
|
||||
scalar_product = sum( v * w )
|
||||
RETURN
|
||||
END
|
||||
!
|
||||
real*8 FUNCTION length_vector_product( v, w )
|
||||
real*8 v(3), w(3), vp(3), length
|
||||
call vector_product( vp, v, w )
|
||||
length_vector_product = length( vp )
|
||||
RETURN
|
||||
END
|
||||
!
|
||||
SUBROUTINE vector_product( vp, v, w )
|
||||
real*8 v(3), w(3), vp(3)
|
||||
vp(1) = v(2) * w(3) - v(3) * w(2)
|
||||
vp(2) = v(3) * w(1) - v(1) * w(3)
|
||||
vp(3) = v(1) * w(2) - v(2) * w(1)
|
||||
RETURN
|
||||
END
|
@ -1,62 +0,0 @@
|
||||
!----------------------------------------------------------------------------------------
|
||||
! test for precession, ge nieuwenhuys, Oktober 25, 2005
|
||||
!----------------------------------------------------------------------------------------
|
||||
!
|
||||
! The initial muon direction is given by the unit vector emu, the magnetic field
|
||||
! is b (vector) and the observer (positroncounter) is supposed to be in the
|
||||
! direction of the unit-vector observer.
|
||||
!
|
||||
USE DFLIB
|
||||
!
|
||||
real*8 b(3), eb(3), emu(3), gyro(3), azi(3), length_b, length_gyro, length_azi
|
||||
real*8 observer(3), amplitude, help(3), cos_phase, phase, g_t_x, g_t_y, g_t_z, omega
|
||||
real*8 length, saclar_pruduct, length_vector_product
|
||||
|
||||
1 write(6,2)
|
||||
2 format(' Give initial muon > '\)
|
||||
read(5,*,err=1) emu
|
||||
emu = emu / length(emu)
|
||||
3 write(6,4)
|
||||
4 format(' Give field > '\)
|
||||
read(5,*,err=3) b
|
||||
length_b = length( b )
|
||||
IF ( length_b .LT. 0.001 ) GOTO 1
|
||||
!
|
||||
open(1,file='e:\simulations\rotatie.dat',status='unknown')
|
||||
eb = b / length_b
|
||||
omega = 135. * 6.28 * length_b
|
||||
!
|
||||
DO i = 1, 100
|
||||
!
|
||||
t = float(i-1) * 0.01
|
||||
!
|
||||
c = cos( omega * t )
|
||||
s = sin( omega * t )
|
||||
!
|
||||
g_t_x = ( c + eb(1)*eb(1)*(1-c) ) * emu(1) + &
|
||||
& ( eb(1)*eb(2)*(1-c)-eb(3)*s ) * emu(2) + &
|
||||
& ( eb(2)*s+eb(1)*eb(3)*(1-c) ) * emu(3)
|
||||
!
|
||||
g_t_y = ( eb(3)*s+eb(1)*eb(2)*(1-c) ) * emu(1) + &
|
||||
& ( c + eb(2)*eb(2) * (1-c) ) * emu(2) + &
|
||||
& ( -eb(1)*s+eb(2)*eb(3)*(1-c)) * emu(3)
|
||||
!
|
||||
g_t_z = ( -eb(2)*s+eb(1)*eb(3)*(1-c)) * emu(1) + &
|
||||
& ( eb(1)*s+eb(2)*eb(3)*(1-c)) * emu(2) + &
|
||||
& ( c+eb(3)*eb(3)*(1-c) ) * emu(3)
|
||||
!
|
||||
write(1,'(4E18.6)') t, g_t_x, g_t_y, g_t_z
|
||||
!
|
||||
END DO
|
||||
!
|
||||
Close(1)
|
||||
GOTO 3
|
||||
!
|
||||
END
|
||||
!
|
||||
real*8 FUNCTION length( v )
|
||||
real*8 v(3)
|
||||
length = sqrt( sum( v * v ) )
|
||||
RETURN
|
||||
END
|
||||
!
|
118
test/test.dsp
118
test/test.dsp
@ -1,118 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="test" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=test - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "test.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "test.mak" CFG="test - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "test - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "test - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
F90=df.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "test - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE F90 /compile_only /nologo /warn:nofileopt
|
||||
# ADD F90 /compile_only /nologo /warn:nofileopt
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "test - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE F90 /check:bounds /compile_only /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt
|
||||
# ADD F90 /check:bounds /compile_only /debug:full /nologo /traceback /warn:argument_checking /warn:nofileopt
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "test - Win32 Release"
|
||||
# Name "test - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;f90;for;f;fpp"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\test-1.f90"
|
||||
|
||||
!IF "$(CFG)" == "test - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "test - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\test-2.f90"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
@ -1,24 +0,0 @@
|
||||
! test.f90
|
||||
!
|
||||
! FUNCTIONS:
|
||||
! test - Entry point of console application.
|
||||
!
|
||||
! Example of displaying 'Hello World' at execution time.
|
||||
!
|
||||
|
||||
!****************************************************************************
|
||||
!
|
||||
! PROGRAM: test
|
||||
!
|
||||
! PURPOSE: Entry point for 'Hello World' sample console application.
|
||||
!
|
||||
!****************************************************************************
|
||||
|
||||
program test
|
||||
|
||||
implicit none
|
||||
|
||||
print *, 'Hello World'
|
||||
|
||||
end program test
|
||||
|
@ -1,19 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: test - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating command line "link.exe kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"Release/test.pdb" /machine:I386 /out:"Release/test.exe" ".\Release\test-2.obj" "
|
||||
<h3>Output Window</h3>
|
||||
Linking...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
test.exe - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user