Problem: The statement
puts -nonewline stdout a
does not work in tkcon.tcl because of a bug in tkcon. This affects,
among other things, gmsummary.
Solution: Replace line 2295 of QMGROOT/tcl/tkcon.tcl, which is,
[regexp {^(stdout|stderr)$} [lreplace $args 2 2] junk tmp]} {
by
[regexp {^(stdout|stderr)$} [lrange $args 1 1] junk tmp]} {
Problem: QMG's ray intersection routines can fail for higher degree parametric patches.
Solution: Download the completely rewritten version of qpatchmath.cpp. It is believed that this version is more robust than its predecessor. Replace QMGROOT/src/common/qpatchmath.cpp with the downloaded version. Also, modify QMGROOT/src/common/qpatchmath.h as follows. Replace line 49 of qpatchmath.h, which is
bool marker_active_;
by
int marker_active_;
Problem: Under some rare circumstances, the gmdouble routine could access a nonexistent output stream through an uninitialized pointer.
Solution: Add the following four lines after line 1447 (may be different if other patches below have been applied) of QMGROOT/src/meshgen/double.cpp (which is a declaration "ostream log2(0);"),
#ifdef DEBUGGING
Local_to_PatchMath_CPP::dump_everything = false;
Local_to_PatchMath_CPP::debug_str = &log2;
#endif
Problem: The new version of qpatchtab.cpp invokes routines in LAPACK not invoked by the previous version. This means that the custom file may need to be redone if the LAPACK routine names have been remapped with -D options.
Solution: To indicate this, change the comment in line 21 of QMGROOT/build/unixmatlab/custom and line 11 of custom of QMGROOT/build/unixtcl/custom, which was formerly
# zgegv
to
# zgeqrf_, zunmqr_, zungqr_, zgghrd_, zhgeqz_
Problem: gmfem.m does not correctly compute the contribution of the source term, that is, the contribution from f in the boundary value problem div(c grad u) = −f.
Solution: To fix this problem, download the new version of gmfem.m and save it in QMGROOT/mfiles/.
Problem: The QMG documentation incorrectly implies that QMG 2.0 is compatible with all versions of Matlab 5.x. In fact, it is not compatible with Matlab 5.0 or 5.1. There is no workaround.
Problem: When a sparse zba matrix is displayed, the subscripting shown is 1-based instead of zero-based.
Workaround: Replace the statement
a.entries
in QMGROOT/mfiles/@zba/display.m with
if issparse(a.entries)
[ii,jj,ss] = find(a.entries);
if length(ii) == 0
disp('Empty zba sparse matrix')
else
for p = 1 : length(ii)
disp(sprintf(' (%d,%d) %d', ii(p)-1, jj(p)-1,ss(p)))
end
end
else
if (length(a.entries)) == 0
disp('Empty zba matrix')
else
disp(a.entries)
end
end
This solution has problems of its own. For instance, it ignores
the current setting of the output format. A full solution to this
problem will be postponed for a future major release of QMG.
Problem: QMG 2.0 will not compile under Visual C++ 6.0 because of bugs in the compiler. Note: the following patches apply to VC++ 6.0 SP3. They have not been tested on other SP's.
Solution:
# If using VC++ 6.0, the followings statement should be
# modified to:
# MSROOT = c:\Program Files\Microsoft Visual Studio\VC98
# or something similar, depending on where VC++ 6.0 is installed.
#ifdef _MSC_VER
#if _MSC_VER == 1200
#pragma warning (disable: 4786)
#pragma warning (disable: 4788)
#endif
#endif
#ifdef _MSC_VER
#if _MSC_VER == 1200
#include "qmatvec.h"
#endif
#endif
before all #include directives in the following files:
QMGROOT/src/meshgen/align.cpp,
QMGROOT/src/meshgen/crtsubbox.cpp,
QMGROOT/src/meshgen/double.cpp,
QMGROOT/src/meshgen/meshgen.cpp,
QMGROOT/src/meshgen/qboxstack.cpp,
QMGROOT/src/meshgen/qinctab.cpp,
QMGROOT/src/meshgen/qpatchtab.cpp,
QMGROOT/src/meshgen/qseparation.cpp,
QMGROOT/src/meshgen/split1.cpp,
QMGROOT/src/model/checktri.cpp,
QMGROOT/src/model/gmapply.cpp,
QMGROOT/src/model/gm_polytri.cpp,
QMGROOT/src/model/gm_vizp.cpp,
QMGROOT/src/model/polytri.cpp,
QMGROOT/src/matlab/qfrontend.cpp, and
QMGROOT/src/tcl/qfrontend.cpp.
if (next_chamber != Brep::Face_Spec(-1,-1)) {
with the following
#ifdef _MSC_VER
#if _MSC_VER == 1200
Brep::Face_Spec tmpfspec = Brep::Face_Spec(-1,-1);
if (next_chamber != tmpfspec)
#else
if (next_chamber != Brep::Face_Spec(-1,-1))
#endif
#else
if (next_chamber != Brep::Face_Spec(-1,-1))
#endif
{