Skip to content

Commit

Permalink
refactor(oommf): push fetched files of new version
Browse files Browse the repository at this point in the history
  • Loading branch information
Swapneel Amit Pathak committed Feb 29, 2024
1 parent b70bdd8 commit 55067c4
Show file tree
Hide file tree
Showing 724 changed files with 29,865 additions and 16,704 deletions.
Binary file added Downloads/oommf21a0_20230927.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion oommf-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20b0-1 20220930 b0
21a0 20230927 a0
29 changes: 29 additions & 0 deletions oommf/CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
========== OOMMF 2.1a0 released 2023/09/30 ==========
Significant changes since 2.0b0:

* New command line apps:
- computefield
- logreview

* New features:
- avf2odt option -wgtfunc
- odtcalc option -supfile
- hook in Oxs for time-varying Ms
- expanded PPM file formats support

* New MIF file functionality:
- Script control for output filenames
- Random variables with std normal distribution

* New contributed Oxs extension:
- oommf-mel (magnetoelastic coupling)

* Bug fixes
- Ow_EntryScale re-entrancy
- mmArchive: more robust concurrent writing
- mmDisp: more robust acceptance of non-finite inputs
- killoommf: greater reliability against non-server apps

* Platform support
- eliminate sprintf() calls to satisfy clang 14.

========== OOMMF 2.0b0 released 2022/09/30 ==========
Significant changes since 2.0a3:

Expand Down
29 changes: 29 additions & 0 deletions oommf/Changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
========== OOMMF 2.1a0 released 2023/09/30 ==========
Significant changes since 2.0b0:

* New command line apps:
- computefield
- logreview

* New features:
- avf2odt option -wgtfunc
- odtcalc option -supfile
- hook in Oxs for time-varying Ms
- expanded PPM file formats support

* New MIF file functionality:
- Script control for output filenames
- Random variables with std normal distribution

* New contributed Oxs extension:
- oommf-mel (magnetoelastic coupling)

* Bug fixes
- Ow_EntryScale re-entrancy
- mmArchive: more robust concurrent writing
- mmDisp: more robust acceptance of non-finite inputs
- killoommf: greater reliability against non-server apps

* Platform support
- eliminate sprintf() calls to satisfy clang 14.

========== OOMMF 2.0b0 released 2022/09/30 ==========
Significant changes since 2.0a3:

Expand Down
16 changes: 6 additions & 10 deletions oommf/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
README: OOMMF
Object Oriented MicroMagnetic computing Framework
Release 2.0b0
Release 2.1a0

OOMMF is a project in the Mathematical and Computational Sciences
Division (MCSD) of ITL/NIST aimed at developing portable, extensible
Expand All @@ -17,29 +17,25 @@ The main contributors to OOMMF are Mike Donahue and Don Porter.
Before you can do anything with OOMMF, you must have Tcl/Tk installed
on your computer. The Tcl/Tk Core is available for free download from
the Tcl Developer eXchange at <URL:http://www.tcl.tk/>. We recommend
the latest Tcl/Tk releases, currently 8.6.12. The oldest versions
of Tcl/Tk compatible with OOMMF varies with the computing platform,
but any installation likely to be found should be acceptable.
Please note as exceptions that releases 8.6.2, 8.6.3, 8.5.16, and
8.5.17 of Tcl should be avoided as they include I/O bugs that interfere
with OOMMF's ability to reliably record output in the file system.
OOMMF software does not support any alpha or beta versions of Tcl/Tk.
the latest Tcl/Tk releases, currently 8.6.13. OOMMF software does not
support any alpha or beta versions of Tcl/Tk, or any releases before
Tcl/Tk 8.5.

-----------------------------------------------------------------------
QUICK INSTALL:
Most OOMMF users on MS Windows platforms will download a release
with pre-compiled executables compatible with Tcl/Tk 8.6.x. Type
the following commands at an MS-DOS Prompt to start using OOMMF:

unzip oommf20b0.zip
unzip oommf21a0.zip
cd oommf
tclsh86 oommf.tcl pimake upgrade
tclsh86 oommf.tcl

For most OOMMF users on Unix and Mac OS X, the following sequence of
commands should upgrade, build, and run your OOMMF installation:

gunzip -c oommf20b0.tar.gz | tar xvf -
gunzip -c oommf21a0.tar.gz | tar xvf -
cd oommf
oommf.tcl pimake distclean
oommf.tcl pimake upgrade
Expand Down
16 changes: 6 additions & 10 deletions oommf/Readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
README: OOMMF
Object Oriented MicroMagnetic computing Framework
Release 2.0b0
Release 2.1a0

OOMMF is a project in the Mathematical and Computational Sciences
Division (MCSD) of ITL/NIST aimed at developing portable, extensible
Expand All @@ -17,29 +17,25 @@ The main contributors to OOMMF are Mike Donahue and Don Porter.
Before you can do anything with OOMMF, you must have Tcl/Tk installed
on your computer. The Tcl/Tk Core is available for free download from
the Tcl Developer eXchange at <URL:http://www.tcl.tk/>. We recommend
the latest Tcl/Tk releases, currently 8.6.12. The oldest versions
of Tcl/Tk compatible with OOMMF varies with the computing platform,
but any installation likely to be found should be acceptable.
Please note as exceptions that releases 8.6.2, 8.6.3, 8.5.16, and
8.5.17 of Tcl should be avoided as they include I/O bugs that interfere
with OOMMF's ability to reliably record output in the file system.
OOMMF software does not support any alpha or beta versions of Tcl/Tk.
the latest Tcl/Tk releases, currently 8.6.13. OOMMF software does not
support any alpha or beta versions of Tcl/Tk, or any releases before
Tcl/Tk 8.5.

-----------------------------------------------------------------------
QUICK INSTALL:
Most OOMMF users on MS Windows platforms will download a release
with pre-compiled executables compatible with Tcl/Tk 8.6.x. Type
the following commands at an MS-DOS Prompt to start using OOMMF:

unzip oommf20b0.zip
unzip oommf21a0.zip
cd oommf
tclsh86 oommf.tcl pimake upgrade
tclsh86 oommf.tcl

For most OOMMF users on Unix and Mac OS X, the following sequence of
commands should upgrade, build, and run your OOMMF installation:

gunzip -c oommf20b0.tar.gz | tar xvf -
gunzip -c oommf21a0.tar.gz | tar xvf -
cd oommf
oommf.tcl pimake distclean
oommf.tcl pimake upgrade
Expand Down
4 changes: 2 additions & 2 deletions oommf/app/mmarchive/appindex.tcl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Oc_Application Define {
-name mmArchive
-version 2.0b0
-version 2.1a0
-machine filtersh
-file mmarchive.tcl
-options {-tk 0}
}

Oc_Application Define {
-name cmdserver
-version 2.0b0
-version 2.1a0
-machine filtersh
-file cmdserver.tcl
-options {-tk 0}
Expand Down
2 changes: 1 addition & 1 deletion oommf/app/mmarchive/cmdserver.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ package require Oc 2 ;# Error & usage handling below requires Oc
package require Net 2

Oc_Main SetAppName CmdServer
Oc_Main SetVersion 2.0b0
Oc_Main SetVersion 2.1a0
regexp \\\044Date:(.*)\\\044 {$Date: 2015/09/10 22:13:14 $} _ date
Oc_Main SetDate [string trim $date]
# regexp \\\044Author:(.*)\\\044 {$Author: donahue $} _ author
Expand Down
25 changes: 15 additions & 10 deletions oommf/app/mmarchive/mmarchive.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if {[Oc_Main HasTk]} {
}

Oc_Main SetAppName mmArchive
Oc_Main SetVersion 2.0b0
Oc_Main SetVersion 2.1a0
regexp \\\044Date:(.*)\\\044 {$Date: 2015/11/24 21:17:20 $} _ date
Oc_Main SetDate [string trim $date]
Oc_Main SetAuthor [Oc_Person Lookup dgp]
Expand Down Expand Up @@ -127,7 +127,7 @@ append gui {
foreach elt $result {
$logwidget Append $elt
}
trace variable status w [subst {$logwidget Append \$status ;#}]
trace add variable status write [subst {$logwidget Append \$status ;#}]
}
remote -callback LogInit set log

Expand Down Expand Up @@ -347,21 +347,27 @@ proc WriteTriples {conn triples} {
lappend conn_data_fmt($conn) $fmt
}

# Open output file for append
# Open output file for append. Note the difference between "a" and
# "a+" in the open command. The first appends to the end of the
# file with each write (albeit on Windows this is done via a seek
# + write and is not atomic), while "a+" positions at the end of
# the file when it is opened, but makes no allowance for writes
# from other sources.
set chan {}
set conn_file($conn) $conn_file_req($conn)
if {[string match {} $conn_file($conn)] || \
[catch {open $conn_file($conn) "a+"} chan]} {
[catch {open $conn_file($conn) "a"} chan]} {
# Unable to open output file. Try using temporary filename
set conn_file($conn) [Oc_TempName "mmArchive" ".odt"]
if {[catch {open $conn_file($conn) "a+"} chan]} {
if {[catch {open $conn_file($conn) "a"} chan]} {
# Abandon ship!
error "Unable to open DataTable output file: $chan"
# Note: Error will get logged by catch around WriteTriples
}
}
LogMessage status "Opened $conn_file($conn)"
fconfigure $chan -buffering line
set conn_channel($conn) $chan
LogMessage status "Opened $conn_file($conn)"

# Setup exit handler
global server
Expand Down Expand Up @@ -424,7 +430,7 @@ proc WriteTriples {conn triples} {
# Index into tripdata using the column list. Note that
# there is no check for extra (new) data columns; any
# such will just be ignored.
puts -nonewline $chan " " ;# Indent past "# Columns:" heading
set datarow " " ;# Indent past "# Columns:" heading
foreach label $conn_col_list($conn) \
width $conn_head_width($conn) \
fmt $conn_data_fmt($conn) {
Expand All @@ -443,10 +449,9 @@ proc WriteTriples {conn triples} {
set value [format " %*s" $width $value]
}
}
puts -nonewline $chan $value
append datarow $value
}
puts $chan {}
flush $chan
puts $chan $datarow
}

proc CloseTriplesFile {conn} {
Expand Down
2 changes: 1 addition & 1 deletion oommf/app/mmdatatable/appindex.tcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Oc_Application Define {
-name mmDataTable
-version 2.0b0
-version 2.1a0
-machine omfsh
-file mmdatatable.tcl
}
Expand Down
2 changes: 1 addition & 1 deletion oommf/app/mmdatatable/mmdatatable.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package require Ow
wm withdraw .

Oc_Main SetAppName mmDataTable
Oc_Main SetVersion 2.0b0
Oc_Main SetVersion 2.1a0
regexp \\\044Date:(.*)\\\044 {$Date: 2015/10/09 05:50:34 $} _ date
Oc_Main SetDate [string trim $date]
# regexp \\\044Author:(.*)\\\044 {$Author: donahue $} _ author
Expand Down
17 changes: 9 additions & 8 deletions oommf/app/mmdisp/bitmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -607,10 +607,12 @@ void OommfBitmap::DrawFilledArrow(OC_REAL8m xc,OC_REAL8m yc,OC_REAL8m size,
work_poly.Shift(xc,yc);
DrawFilledPoly(work_poly,color,antialias);
if(outline_width != 0.0) {
const OC_REAL8m base_width = 1.5; // Emperical value
const OC_REAL8m base_width = 0.25*BitmapLineWidth*size;
OC_REAL8m ow = outline_width*base_width;
ow = (ow<1.0 ? 1.0 : ow); // Minimum outline width == 1 pixel
Nb_List<PlanePoint> vlist;
work_poly.MakeVertexList(vlist);
DrawPolyLine(vlist,outline_width*base_width,outline_color,2,antialias);
DrawPolyLine(vlist,ow,outline_color,2,antialias);
}
}

Expand Down Expand Up @@ -746,11 +748,9 @@ int OommfBitmap::WritePPMChannel(Tcl_Channel channel,int ppm_type)
Tcl_SetChannelOption(NULL, channel,
Oc_AutoBuf("-translation"), Oc_AutoBuf("binary"));

/// Note: On some (non-ANSI) compilers, sprintf() returns a pointer
/// to the buffer instead of an output byte count.
if(ppm_type==6) {
char scratch[256]; // Make sure this is big enough as used below!
sprintf(scratch,"P6\n%d %d\n%d\n",xsize,ysize,255);
snprintf(scratch,sizeof(scratch),"P6\n%d %d\n%d\n",xsize,ysize,255);
Tcl_Write(channel,scratch,int(strlen(scratch)));
for(int i=0;i<totalsize;i++) {
// Note: The following code breaks encapsulation of
Expand All @@ -761,7 +761,7 @@ int OommfBitmap::WritePPMChannel(Tcl_Channel channel,int ppm_type)
}
} else {
char scratch[1024]; // Make sure this is big enough as used below!
sprintf(scratch,"P3\n%d %d\n%d\n",xsize,ysize,255);
snprintf(scratch,sizeof(scratch),"P3\n%d %d\n%d\n",xsize,ysize,255);
Tcl_Write(channel,scratch,int(strlen(scratch)));
unsigned int comp[12];
int i,chunksize;
Expand All @@ -771,7 +771,8 @@ int OommfBitmap::WritePPMChannel(Tcl_Channel channel,int ppm_type)
bitmap[i+1].Get(comp[3],comp[4],comp[5]);
bitmap[i+2].Get(comp[6],comp[7],comp[8]);
bitmap[i+3].Get(comp[9],comp[10],comp[11]);
sprintf(scratch,"%u %u %u\n%u %u %u\n%u %u %u\n%u %u %u\n",
snprintf(scratch,sizeof(scratch),
"%u %u %u\n%u %u %u\n%u %u %u\n%u %u %u\n",
comp[0],comp[1],comp[2],comp[3],comp[4],comp[5],
comp[6],comp[7],comp[8],comp[9],comp[10],comp[11]);
chunksize=int(strlen(scratch));
Expand All @@ -782,7 +783,7 @@ int OommfBitmap::WritePPMChannel(Tcl_Channel channel,int ppm_type)
for(;i<totalsize;i++) {
// Remainder
bitmap[i].Get(comp[0],comp[1],comp[2]);
sprintf(scratch,"%u %u %u\n",comp[0],comp[1],comp[2]);
snprintf(scratch,sizeof(scratch),"%u %u %u\n",comp[0],comp[1],comp[2]);
chunksize=int(strlen(scratch));
if(Tcl_Write(channel,scratch,chunksize) != chunksize) {
return 4;
Expand Down

0 comments on commit 55067c4

Please sign in to comment.