From e01aa21ea8a010c9c26ad91fd20f7dac196287d1 Mon Sep 17 00:00:00 2001 From: Max Khon Date: Thu, 27 Jan 2022 10:21:37 +0700 Subject: [PATCH] [libmesh] Fix Windows build - compile .C files as C++ - Fix unistd.h inclusions - export explicit template instantiations as libtool "export all" linking does not pick them up due to their sections marked as "(pick any)" in dumpbin output - other MS VC-related fixes --- ports/libmesh/0001-windows-build.patch | 556 +++++ .../libmesh/0002-windows-build-contrib.patch | 136 ++ ports/libmesh/0003-libmesh-export.patch | 2039 +++++++++++++++++ ports/libmesh/0004-netcdf-getopt.patch | 51 + ports/libmesh/portfile.cmake | 40 +- ports/libmesh/vcpkg.json | 15 +- versions/baseline.json | 2 +- versions/l-/libmesh.json | 5 + 8 files changed, 2840 insertions(+), 4 deletions(-) create mode 100644 ports/libmesh/0001-windows-build.patch create mode 100644 ports/libmesh/0002-windows-build-contrib.patch create mode 100644 ports/libmesh/0003-libmesh-export.patch create mode 100644 ports/libmesh/0004-netcdf-getopt.patch diff --git a/ports/libmesh/0001-windows-build.patch b/ports/libmesh/0001-windows-build.patch new file mode 100644 index 00000000000000..2b9551f2d61585 --- /dev/null +++ b/ports/libmesh/0001-windows-build.patch @@ -0,0 +1,556 @@ +diff --git a/configure b/configure +index 78c1cd204..e66a23380 100755 +--- a/configure ++++ b/configure +@@ -3180,6 +3180,73 @@ $as_echo "$ac_res" >&6; } + + } # ac_fn_cxx_check_decl + ++# ac_fn_cxx_check_func LINENO FUNC VAR ++# ------------------------------------ ++# Tests whether FUNC exists, setting the cache variable VAR accordingly ++ac_fn_cxx_check_func () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++/* Define $2 to an innocuous variant, in case declares $2. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $2 innocuous_$2 ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $2 (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $2 ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $2 (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$2 || defined __stub___$2 ++choke me ++#endif ++ ++int ++main () ++{ ++return $2 (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_cxx_check_func ++ + # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES + # ------------------------------------------------------- + # Tests whether HEADER exists, giving a warning if it cannot be compiled using +@@ -30077,6 +30144,30 @@ fi + + done + ++for ac_header in sys/time.h ++do : ++ ac_fn_cxx_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_time_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SYS_TIME_H 1 ++_ACEOF ++ ++fi ++ ++done ++ ++for ac_header in process.h ++do : ++ ac_fn_cxx_check_header_mongrel "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default" ++if test "x$ac_cv_header_process_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_PROCESS_H 1 ++_ACEOF ++ ++fi ++ ++done ++ + for ac_header in csignal + do : + ac_fn_cxx_check_header_mongrel "$LINENO" "csignal" "ac_cv_header_csignal" "$ac_includes_default" +@@ -30425,6 +30516,19 @@ cat >>confdefs.h <<_ACEOF + _ACEOF + + ++for ac_func in mkstemp gettimeofday ++do : ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ ++ + # Check for uname header. + for ac_header in sys/utsname.h + do : +--- a/build-aux/compile 2022-01-26 21:31:18.033418700 +0700 ++++ b/build-aux/compile 2019-10-08 23:55:38.000000000 +0700 +@@ -53,7 +53,7 @@ + MINGW*) + file_conv=mingw + ;; +- CYGWIN*) ++ CYGWIN* | MSYS*) + file_conv=cygwin + ;; + *) +@@ -67,7 +67,7 @@ + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; +- cygwin/*) ++ cygwin/* | msys/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) +@@ -204,7 +204,7 @@ + set x "$@" "$1" + shift + ;; +- *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) ++ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++ | *.C) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift +diff --git a/include/libmesh/Makefile.in b/include/libmesh/Makefile.in +index 251bf5c03..14c26cea3 100644 +--- a/include/libmesh/Makefile.in ++++ b/include/libmesh/Makefile.in +@@ -645,10 +645,11 @@ BUILT_SOURCES = auto_ptr.h default_coupling.h dirichlet_boundaries.h \ + pointer_to_pointer_iter.h pool_allocator.h restore_warnings.h \ + simple_range.h statistics.h string_to_enum.h timestamp.h \ + topology_map.h tree.h tree_base.h tree_node.h utility.h \ +- vectormap.h xdr_cxx.h parallel_communicator_specializations \ +- $(am__append_1) $(am__append_3) $(am__append_5) \ +- $(am__append_7) $(am__append_9) $(am__append_11) \ +- libmesh_config.h ++ vectormap.h win_gettimeofday.h xdr_cxx.h \ ++ parallel_communicator_specializations $(am__append_1) \ ++ $(am__append_3) $(am__append_5) $(am__append_7) \ ++ $(am__append_9) $(am__append_11) \ ++ libmesh_config.h + DISTCLEANFILES = $(BUILT_SOURCES) $(am__append_2) $(am__append_4) \ + $(am__append_6) $(am__append_8) $(am__append_10) \ + $(am__append_12) libmesh_config.h +@@ -2231,6 +2232,9 @@ utility.h: $(top_srcdir)/include/utils/utility.h + vectormap.h: $(top_srcdir)/include/utils/vectormap.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + ++win_gettimeofday.h: $(top_srcdir)/include/utils/win_gettimeofday.h ++ $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ ++ + xdr_cxx.h: $(top_srcdir)/include/utils/xdr_cxx.h + $(AM_V_GEN)rm -f $@ && $(LN_S) -f $< $@ + +diff --git a/include/libmesh_config.h.in b/include/libmesh_config.h.in +index 9587c1098..3ab8fea9f 100644 +--- a/include/libmesh_config.h.in ++++ b/include/libmesh_config.h.in +@@ -392,6 +392,9 @@ + /* Flag indicating if the library should be built with calls to getpwuid() */ + #undef HAVE_GETPWUID + ++/* Define to 1 if you have the `gettimeofday' function. */ ++#undef HAVE_GETTIMEOFDAY ++ + /* define if the compiler supports glibc backtrace */ + #undef HAVE_GLIBC_BACKTRACE + +@@ -437,6 +440,9 @@ + /* "The make directory command" */ + #undef HAVE_MKDIR + ++/* Define to 1 if you have the `mkstemp' function. */ ++#undef HAVE_MKSTEMP ++ + /* Flag indicating whether or not MPI is available */ + #undef HAVE_MPI + +@@ -474,6 +480,9 @@ + is available via PETSc */ + #undef HAVE_PETSC_TAO + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_PROCESS_H ++ + /* Define if you have POSIX threads libraries and header files. */ + #undef HAVE_PTHREAD + +@@ -537,6 +546,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_STAT_H + ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TIME_H ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_TYPES_H + +diff --git a/include/utils/perf_log.h b/include/utils/perf_log.h +index 86092a274..bbdf312ee 100644 +--- a/include/utils/perf_log.h ++++ b/include/utils/perf_log.h +@@ -30,7 +30,12 @@ + #include + #include + #include +-#include ++#ifdef LIBMESH_HAVE_SYS_TIME_H ++#include // gettimeofday() on Unix ++#endif ++#ifndef LIBMESH_HAVE_GETTIMEOFDAY ++#include "libmesh/win_gettimeofday.h" // gettimeofday() on Windows ++#endif + + namespace libMesh + { +diff --git a/include/utils/perfmon.h b/include/utils/perfmon.h +index 8cf3a7f37..f02b8bb4e 100644 +--- a/include/utils/perfmon.h ++++ b/include/utils/perfmon.h +@@ -33,7 +33,12 @@ namespace Papi { + // C++ includes + #include + #include +-#include ++#ifdef LIBMESH_HAVE_SYS_TIME_H ++#include // gettimeofday() on Unix ++#endif ++#ifndef LIBMESH_HAVE_GETTIMEOFDAY ++#include "libmesh/win_gettimeofday.h" // gettimeofday() on Windows ++#endif + + namespace libMesh + { +diff --git a/include/utils/win_gettimeofday.h b/include/utils/win_gettimeofday.h +new file mode 100644 +index 000000000..d0a9de2ce +--- /dev/null ++++ b/include/utils/win_gettimeofday.h +@@ -0,0 +1,43 @@ ++/* ++ * This code is in public domain ++ */ ++ ++#ifndef _WIN_GETTIMEOFDAY_H_ ++#define _WIN_GETTIMEOFDAY_H_ ++ ++#ifdef _MSC_VER ++#define NOMINMAX ++#define WIN32_LEAN_AND_MEAN ++#include ++#include // portable: uint64_t MSVC: __int64 ++ ++// MSVC defines this in winsock2.h!? ++typedef struct timeval { ++ long tv_sec; ++ long tv_usec; ++} timeval; ++ ++inline int gettimeofday(struct timeval * tp, struct timezone * tzp) ++{ ++ // This magic number is the number of 100 nanosecond intervals since January 1, 1601 (UTC) ++ // until 00:00:00 January 1, 1970 ++ static const uint64_t EPOCH = ((uint64_t) 116444736000000000ULL); ++ ++ SYSTEMTIME system_time; ++ FILETIME file_time; ++ uint64_t time; ++ ++ GetSystemTime(&system_time); ++ SystemTimeToFileTime(&system_time, &file_time); ++ time = ((uint64_t)file_time.dwLowDateTime ); ++ time += ((uint64_t)file_time.dwHighDateTime) << 32; ++ ++ tp->tv_sec = (long) ((time - EPOCH) / 10000000L); ++ tp->tv_usec = (long) (system_time.wMilliseconds * 1000); ++ return 0; ++} ++#else // _MSC_VER ++#error "gettimeofday() is not implemented" ++#endif // _MSC_VER ++ ++#endif // _WIN_GETTIMEOFDAY_H_ +diff --git a/src/base/win_mkstemp.h b/src/base/win_mkstemp.h +new file mode 100644 +index 000000000..849550513 +--- /dev/null ++++ b/src/base/win_mkstemp.h +@@ -0,0 +1,25 @@ ++/* ++ * This code is in public domain ++ */ ++ ++#ifndef _WIN_MKSTEMP_H_ ++#define _WIN_MKSTEMP_H_ ++ ++#ifdef _MSC_VER ++#include ++#include ++#include ++ ++inline int mkstemp(char *tmpl) ++{ ++ char *fn = _mktemp(tmpl); ++ if (fn == NULL) ++ return -1; ++ ++ return _open(fn, _O_RDWR | _O_CREAT | _O_EXCL, _S_IREAD | _S_IWRITE); ++} ++#else ++#error "mkstemp() is not implemented" ++#endif ++ ++#endif // _WIN_MKSTEMP_H_ +diff --git a/src/base/print_trace.C b/src/base/print_trace.C +index d51f0b814..5e71644e7 100644 +--- a/src/base/print_trace.C ++++ b/src/base/print_trace.C +@@ -46,7 +46,14 @@ + #include "libmesh/print_trace.h" + #include "libmesh/libmesh.h" + ++#ifdef LIBMESH_HAVE_UNISTD_H +-#include // needed for getpid() ++#include // needed for getpid() on Unix ++#endif ++#ifdef LIBMESH_HAVE_PROCESS_H ++#include // for getpid() on Windows ++ ++typedef int pid_t; ++#endif + #include + #include + #include +@@ -55,6 +60,9 @@ + #include // std::remove + #include // std::system + #include // pid_t ++#ifndef LIBMESH_HAVE_MKSTEMP ++#include "win_mkstemp.h" ++#endif + + #if defined(LIBMESH_HAVE_GLIBC_BACKTRACE) + #include +diff --git a/src/mesh/checkpoint_io.C b/src/mesh/checkpoint_io.C +index 5b7e9207c..1e22627ba 100644 +--- a/src/mesh/checkpoint_io.C ++++ b/src/mesh/checkpoint_io.C +@@ -40,7 +40,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -47,6 +47,9 @@ + #include // for ostringstream + #include + #include ++#ifdef LIBMESH_HAVE_DIRECT_H ++#include // rmdir() on Windows ++#endif + + namespace + { +diff --git a/src/mesh/namebased_io.C b/src/mesh/namebased_io.C +index 671749aea..044e5fa74 100644 +--- a/src/mesh/namebased_io.C ++++ b/src/mesh/namebased_io.C +@@ -21,9 +21,6 @@ + #include + #include + +-#include // getpid +-#include +- + // Local includes + #include "libmesh/libmesh_logging.h" + #include "libmesh/mesh_base.h" +@@ -57,6 +47,15 @@ + + #include "libmesh/parallel.h" // broadcast + ++#ifdef LIBMESH_HAVE_UNISTD_H ++#include // getpid ++#include ++#endif ++#ifdef LIBMESH_HAVE_PROCESS_H ++#include ++ ++typedef int pid_t; ++#endif + + namespace libMesh + { +--- a/src/mesh/unstructured_mesh.C 2019-10-08 23:55:38.000000000 +0700 ++++ b/src/mesh/unstructured_mesh.C 2022-01-24 10:21:22.473864700 +0700 +@@ -24,8 +24,4 @@ + #include + +-// C includes +-#include // for pid_t +-#include // for getpid(), unlink() +- + // Local includes + #include "libmesh/boundary_info.h" +--- a/src/numerics/petsc_matrix.C 2019-10-08 23:55:38.000000000 +0700 ++++ b/src/numerics/petsc_matrix.C 2022-01-24 10:24:31.664512100 +0700 +@@ -17,7 +17,6 @@ + + + // C++ includes +-#include // mkstemp + #include + + #include "libmesh/libmesh_config.h" +@@ -30,6 +30,10 @@ + #include "libmesh/petsc_vector.h" + #include "libmesh/parallel.h" + ++#ifdef LIBMESH_HAVE_UNISTD_H ++#include // mkstemp ++#endif ++ + + // For some reason, the blocked matrix API calls below seem to break with PETSC 3.2 & presumably earlier. + // For example: +diff --git a/src/systems/fem_context.C b/src/systems/fem_context.C +index 4f6685fb1..84906c997 100644 +--- a/src/systems/fem_context.C ++++ b/src/systems/fem_context.C +@@ -81,19 +81,8 @@ void FEMContext::init_internal_data(const System & sys) + // Reserve space for the FEAbstract and QBase objects for each + // element dimension possibility (0,1,2,3) + +- // Below is a workaround for the ICC 19. The original code was: +- // +- // _element_fe.resize(4); +- // _side_fe.resize(4); +- +- _element_fe.clear(); +- for (int i=0; i<4; ++i) +- _element_fe.push_back(std::map>()); +- +- _side_fe.clear(); +- for (int i=0; i<4; ++i) +- _side_fe.push_back(std::map>()); +- ++ _element_fe = std::vector>>(4); ++ _side_fe = std::vector>>(4); + _element_fe_var.resize(4); + _side_fe_var.resize(4); + +--- a/src/utils/perf_log.C 2022-01-23 15:18:33.284466800 +0700 ++++ b/src/utils/perf_log.C 2022-01-24 10:26:02.790736000 +0700 +@@ -23,7 +23,9 @@ + #include + #include + #include ++#ifdef LIBMESH_HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +--- a/src/utils/utility.C 2019-10-08 23:55:38.000000000 +0700 ++++ b/src/utils/utility.C 2022-01-24 10:29:14.465738100 +0700 +@@ -20,10 +20,15 @@ + #include "libmesh/libmesh_config.h" + + // System includes +-#include ++#if LIBMESH_HAVE_SYS_STAT_H + #include ++#endif ++#if LIBMESH_HAVE_SYS_TYPES_H + #include ++#endif ++#if LIBMESH_HAVE_UNISTD_H + #include ++#endif + #include + + #ifdef LIBMESH_HAVE_SYS_UTSNAME_H +diff --git a/src/utils/xdr_cxx.C b/src/utils/xdr_cxx.C +index ea2cb0963..3dc8e647a 100644 +--- a/src/utils/xdr_cxx.C ++++ b/src/utils/xdr_cxx.C +@@ -23,8 +23,6 @@ + #include + #include + +-#include // for getpid() +- + // Local includes + #include "libmesh/xdr_cxx.h" + #include "libmesh/libmesh_logging.h" +@@ -36,6 +32,13 @@ + # include "libmesh/restore_warnings.h" + #endif + ++#ifdef LIBMESH_HAVE_UNISTD_H ++#include // for getpid() on Unix ++#endif ++#ifdef LIBMESH_HAVE_PROCESS_H ++#include // for getpid() on Windows ++#endif ++ + + // Anonymous namespace for implementation details. + namespace { +--- a/src/apps/meshtool.C 2019-10-08 23:55:38.000000000 +0700 ++++ b/src/apps/meshtool.C 2022-01-24 19:24:03.701327100 +0700 +@@ -26,7 +26,6 @@ + #include + #include + #include +-#include + #include + + // Local Includes diff --git a/ports/libmesh/0002-windows-build-contrib.patch b/ports/libmesh/0002-windows-build-contrib.patch new file mode 100644 index 00000000000000..bc54ec83a11702 --- /dev/null +++ b/ports/libmesh/0002-windows-build-contrib.patch @@ -0,0 +1,136 @@ +diff --git a/contrib/exodusii/5.22b/exodus/cbind/src/ex_utils.c b/contrib/exodusii/5.22b/exodus/cbind/src/ex_utils.c +index d245d1051..baacf13a4 100644 +--- a/contrib/exodusii/5.22b/exodus/cbind/src/ex_utils.c ++++ b/contrib/exodusii/5.22b/exodus/cbind/src/ex_utils.c +@@ -46,7 +46,6 @@ + #include + #include + #include +-#include + + #include "exodusII.h" + #include "exodusII_int.h" +@@ -1255,8 +1254,8 @@ static void ex_swap64 (int64_t v[], int64_t i, int64_t j) + + static int ex_int_median3(int v[], int iv[], int left, int right) + { +- ssize_t center; +- center = ((ssize_t)left + (ssize_t)right) / 2; ++ long long center; ++ center = ((long long)left + (long long)right) / 2; + + if (v[iv[left]] > v[iv[center]]) + ex_swap(iv, left, center); +diff --git a/contrib/netcdf/netcdf-c-4.6.2/config.h.in b/contrib/netcdf/netcdf-c-4.6.2/config.h.in +index 3084e7b25..f350e9bc2 100644 +--- a/contrib/netcdf/netcdf-c-4.6.2/config.h.in ++++ b/contrib/netcdf/netcdf-c-4.6.2/config.h.in +@@ -535,7 +535,9 @@ + /* Define strcasecmp, snprintf on Win32 systems. */ + #ifdef _WIN32 + #define strcasecmp _stricmp ++#if defined(__MSC__) && (_MSC_VER < 1900) + #define snprintf _snprintf + #endif ++#endif + + #include "ncconfigure.h" +--- a/contrib/netcdf/netcdf-c-4.6.2/libdispatch/dv2i.c 2019-10-08 23:55:38.000000000 +0700 ++++ b/contrib/netcdf/netcdf-c-4.6.2/libdispatch/dv2i.c 2022-01-20 23:08:31.806249700 +0700 +@@ -13,6 +13,7 @@ + #include + #include "netcdf.h" + #include ++#include + + /** \defgroup v2_api The Version 2 API + +--- a/contrib/netcdf/netcdf-c-4.6.2/configure 2019-10-08 23:55:38.000000000 +0700 ++++ b/contrib/netcdf/netcdf-c-4.6.2/configure 2022-01-20 22:55:54.772783900 +0700 +@@ -18818,7 +18818,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5 + $as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; } + case "`uname`" in +- CYGWIN*|MINGW*|AIX*) ++ CYGWIN*|MINGW*|MSYS*|AIX*) + ## Add in the -no-undefined flag to LDFLAGS for libtool. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +--- a/contrib/netcdf/netcdf-c-4.6.2/liblib/Makefile.in 2022-01-21 01:16:06.986465400 +0700 ++++ b/contrib/netcdf/netcdf-c-4.6.2/liblib/Makefile.in 2022-01-21 01:15:45.814160900 +0700 +@@ -325,7 +325,7 @@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + ISCMAKE = @ISCMAKE@ + LD = @LD@ +-LDFLAGS = @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ $(NOUNDEFINED) + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LIBTOOL = @LIBTOOL@ +diff --git a/contrib/netcdf/netcdf-c-4.6.2/ncgen/ncgen.h b/contrib/netcdf/netcdf-c-4.6.2/ncgen/ncgen.h +index 739cd60db..01f563ad5 100644 +--- a/contrib/netcdf/netcdf-c-4.6.2/ncgen/ncgen.h ++++ b/contrib/netcdf/netcdf-c-4.6.2/ncgen/ncgen.h +@@ -10,6 +10,7 @@ + #include + #include "../ncdump/isnan.h" + #define strcasecmp _stricmp ++#define YY_NO_UNISTD_H + #endif + + #ifdef USE_NETCDF4 +diff --git a/contrib/netcdf/netcdf-c-4.6.2/ncgen3/genlib.h b/contrib/netcdf/netcdf-c-4.6.2/ncgen3/genlib.h +index 45f139a68..488b0db78 100644 +--- a/contrib/netcdf/netcdf-c-4.6.2/ncgen3/genlib.h ++++ b/contrib/netcdf/netcdf-c-4.6.2/ncgen3/genlib.h +@@ -9,6 +9,10 @@ + #include + #include + ++#ifndef HAVE_UNISTD_H ++#define YY_NO_UNISTD_H ++#endif ++ + extern const char *progname; /* for error messages */ + extern const char *cdlname; /* for error messages */ + +diff --git a/contrib/metis/GKlib/gk_arch.h b/contrib/metis/GKlib/gk_arch.h +index 2cb80ccf2..c3ce21377 100644 +--- a/contrib/metis/GKlib/gk_arch.h ++++ b/contrib/metis/GKlib/gk_arch.h +@@ -59,6 +59,7 @@ typedef ptrdiff_t ssize_t; + #endif + + #ifdef __MSC__ ++#if _MSC_VER < 1900 + /* MSC does not have rint() function */ + #define rint(x) ((int)((x)+0.5)) + +@@ -68,4 +69,7 @@ typedef ptrdiff_t ssize_t; + #endif + #endif + ++#define USE_GKREGEX ++#endif ++ + #endif +diff --git a/contrib/metis/GKlib/gkregex.c b/contrib/metis/GKlib/gkregex.c +index 8a09caab7..04f148555 100644 +--- a/contrib/metis/GKlib/gkregex.c ++++ b/contrib/metis/GKlib/gkregex.c +@@ -21,6 +21,15 @@ + /* this is for removing a compiler warning */ + void gkfooo() { return; } + ++#if defined(_MSC_VER) ++#define __MSC__ ++#endif ++#if defined(__ICC) ++#define __ICC__ ++#endif ++ ++#include "gk_arch.h" ++ + #ifdef USE_GKREGEX + + #ifdef HAVE_CONFIG_H diff --git a/ports/libmesh/0003-libmesh-export.patch b/ports/libmesh/0003-libmesh-export.patch new file mode 100644 index 00000000000000..af30e35a2cb43d --- /dev/null +++ b/ports/libmesh/0003-libmesh-export.patch @@ -0,0 +1,2039 @@ +diff --git a/include/base/libmesh_common.h b/include/base/libmesh_common.h +index b85fb4d..a12d51d 100644 +--- a/include/base/libmesh_common.h ++++ b/include/base/libmesh_common.h +@@ -651,4 +651,11 @@ inline int gettimeofday(struct timeval * tp, struct timezone * tzp) + #endif + + ++#ifdef _MSC_VER ++#define LIBMESH_EXPORT __declspec(dllexport) ++#else ++#define LIBMESH_EXPORT ++#endif ++ ++ + #endif // LIBMESH_LIBMESH_COMMON_H +diff --git a/include/fe/fe_macro.h b/include/fe/fe_macro.h +index 336d8c5..c03509a 100644 +--- a/include/fe/fe_macro.h ++++ b/include/fe/fe_macro.h +@@ -26,57 +26,58 @@ + // of the \p FE class. Simply include this file, and + // instantiate at the end for the desired dimension(s). + #define INSTANTIATE_MAPS(_dim,_type) \ +- template Point FE<_dim, _type>::map(const Elem *, const Point &); \ +- template Point FE<_dim, _type>::map_xi(const Elem *, const Point &); \ +- template Point FE<_dim, _type>::map_eta(const Elem *, const Point &); \ +- template Point FE<_dim, _type>::map_zeta(const Elem *, const Point &); \ +- template void FE<_dim, _type>::inverse_map(const Elem *, const std::vector &, std::vector &, Real, bool); \ +- template Point FE<_dim, _type>::inverse_map(const Elem *, const Point &, Real, bool) ++ template LIBMESH_EXPORT Point FE<_dim, _type>::map(const Elem *, const Point &); \ ++ template LIBMESH_EXPORT Point FE<_dim, _type>::map_xi(const Elem *, const Point &); \ ++ template LIBMESH_EXPORT Point FE<_dim, _type>::map_eta(const Elem *, const Point &); \ ++ template LIBMESH_EXPORT Point FE<_dim, _type>::map_zeta(const Elem *, const Point &); \ ++ template LIBMESH_EXPORT void FE<_dim, _type>::inverse_map(const Elem *, const std::vector &, std::vector &, Real, bool); \ ++ template LIBMESH_EXPORT Point FE<_dim, _type>::inverse_map(const Elem *, const Point &, Real, bool) + + #define INSTANTIATE_SUBDIVISION_MAPS \ +- template Point FE<2, SUBDIVISION>::map(const Elem *, const Point &); \ +- template Point FE<2, SUBDIVISION>::map_xi(const Elem *, const Point &); \ +- template Point FE<2, SUBDIVISION>::map_eta(const Elem *, const Point &); \ +- template Point FE<2, SUBDIVISION>::map_zeta(const Elem *, const Point &) ++ template LIBMESH_EXPORT Point FE<2, SUBDIVISION>::map(const Elem *, const Point &); \ ++ template LIBMESH_EXPORT Point FE<2, SUBDIVISION>::map_xi(const Elem *, const Point &); \ ++ template LIBMESH_EXPORT Point FE<2, SUBDIVISION>::map_eta(const Elem *, const Point &); \ ++ template LIBMESH_EXPORT Point FE<2, SUBDIVISION>::map_zeta(const Elem *, const Point &) + + #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS + + #define INSTANTIATE_SUBDIVISION_FE \ +- template FE<2,SUBDIVISION>::FE(const FEType & fet); \ +- template unsigned int FE<2,SUBDIVISION>::n_shape_functions () const; \ +- template void FE<2,SUBDIVISION>::attach_quadrature_rule (QBase *); \ +- template unsigned int FE<2,SUBDIVISION>::n_quadrature_points () const; \ +- template void FE<2,SUBDIVISION>::reinit(const Elem *,const std::vector * const,const std::vector * const); \ +- template void FE<2,SUBDIVISION>::init_base_shape_functions(const std::vector &, const Elem *); \ +- template void FE<2,SUBDIVISION>::init_shape_functions(const std::vector &, const Elem *) ++ template LIBMESH_EXPORT FE<2,SUBDIVISION>::FE(const FEType & fet); \ ++ template LIBMESH_EXPORT unsigned int FE<2,SUBDIVISION>::n_shape_functions () const; \ ++ template LIBMESH_EXPORT void FE<2,SUBDIVISION>::attach_quadrature_rule (QBase *); \ ++ template LIBMESH_EXPORT unsigned int FE<2,SUBDIVISION>::n_quadrature_points () const; \ ++ template LIBMESH_EXPORT void FE<2,SUBDIVISION>::reinit(const Elem *,const std::vector * const,const std::vector * const); \ ++ template LIBMESH_EXPORT void FE<2,SUBDIVISION>::init_base_shape_functions(const std::vector &, const Elem *); \ ++ template LIBMESH_EXPORT void FE<2,SUBDIVISION>::init_shape_functions(const std::vector &, const Elem *) + + #else // LIBMESH_ENABLE_INFINITE_ELEMENTS + + #define INSTANTIATE_SUBDIVISION_FE \ +- template FE<2,SUBDIVISION>::FE(const FEType & fet); \ +- template unsigned int FE<2,SUBDIVISION>::n_shape_functions () const; \ +- template void FE<2,SUBDIVISION>::attach_quadrature_rule (QBase *); \ +- template unsigned int FE<2,SUBDIVISION>::n_quadrature_points () const; \ +- template void FE<2,SUBDIVISION>::reinit(const Elem *,const std::vector * const,const std::vector * const); \ +- template void FE<2,SUBDIVISION>::init_shape_functions(const std::vector &, const Elem *) ++ template LIBMESH_EXPORT FE<2,SUBDIVISION>::FE(const FEType & fet); \ ++ template LIBMESH_EXPORT unsigned int FE<2,SUBDIVISION>::n_shape_functions () const; \ ++ template LIBMESH_EXPORT void FE<2,SUBDIVISION>::attach_quadrature_rule (QBase *); \ ++ template LIBMESH_EXPORT unsigned int FE<2,SUBDIVISION>::n_quadrature_points () const; \ ++ template LIBMESH_EXPORT void FE<2,SUBDIVISION>::reinit(const Elem *,const std::vector * const,const std::vector * const); \ ++ template LIBMESH_EXPORT void FE<2,SUBDIVISION>::init_shape_functions(const std::vector &, const Elem *) + + #endif // LIBMESH_ENABLE_INFINITE_ELEMENTS + + + #ifndef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES + +-#define INSTANTIATE_FE(_dim) template class FE< (_dim), CLOUGH>; \ +- template class FE< (_dim), HERMITE>; \ +- template class FE< (_dim), HIERARCHIC>; \ +- template class FE< (_dim), L2_HIERARCHIC>; \ +- template class FE< (_dim), LAGRANGE>; \ +- template class FE< (_dim), LAGRANGE_VEC>; \ +- template class FE< (_dim), L2_LAGRANGE>; \ +- template class FE< (_dim), MONOMIAL>; \ +- template class FE< (_dim), SCALAR>; \ +- template class FE< (_dim), XYZ>; \ +- template class FE< (_dim), NEDELEC_ONE>; \ +- template class FE< (_dim), MONOMIAL_VEC> ++#define INSTANTIATE_FE(_dim) \ ++ template class LIBMESH_EXPORT FE< (_dim), CLOUGH>; \ ++ template class LIBMESH_EXPORT FE< (_dim), HERMITE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), HIERARCHIC>; \ ++ template class LIBMESH_EXPORT FE< (_dim), L2_HIERARCHIC>; \ ++ template class LIBMESH_EXPORT FE< (_dim), LAGRANGE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), LAGRANGE_VEC>; \ ++ template class LIBMESH_EXPORT FE< (_dim), L2_LAGRANGE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), MONOMIAL>; \ ++ template class LIBMESH_EXPORT FE< (_dim), SCALAR>; \ ++ template class LIBMESH_EXPORT FE< (_dim), XYZ>; \ ++ template class LIBMESH_EXPORT FE< (_dim), NEDELEC_ONE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), MONOMIAL_VEC> + + #define INSTANTIATE_ALL_MAPS(_dim) \ + INSTANTIATE_MAPS(_dim,CLOUGH); \ +@@ -94,21 +95,22 @@ + + #else //LIBMESH_ENABLE_HIGHER_ORDER_SHAPES + +-#define INSTANTIATE_FE(_dim) template class FE< (_dim), CLOUGH>; \ +- template class FE< (_dim), HERMITE>; \ +- template class FE< (_dim), HIERARCHIC>; \ +- template class FE< (_dim), L2_HIERARCHIC>; \ +- template class FE< (_dim), LAGRANGE>; \ +- template class FE< (_dim), LAGRANGE_VEC>; \ +- template class FE< (_dim), L2_LAGRANGE>; \ +- template class FE< (_dim), MONOMIAL>; \ +- template class FE< (_dim), SCALAR>; \ +- template class FE< (_dim), BERNSTEIN>; \ +- template class FE< (_dim), SZABAB>; \ +- template class FE< (_dim), XYZ>; \ +- template class FE< (_dim), RATIONAL_BERNSTEIN>; \ +- template class FE< (_dim), NEDELEC_ONE>; \ +- template class FE< (_dim), MONOMIAL_VEC> ++#define INSTANTIATE_FE(_dim) \ ++ template class LIBMESH_EXPORT FE< (_dim), CLOUGH>; \ ++ template class LIBMESH_EXPORT FE< (_dim), HERMITE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), HIERARCHIC>; \ ++ template class LIBMESH_EXPORT FE< (_dim), L2_HIERARCHIC>; \ ++ template class LIBMESH_EXPORT FE< (_dim), LAGRANGE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), LAGRANGE_VEC>; \ ++ template class LIBMESH_EXPORT FE< (_dim), L2_LAGRANGE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), MONOMIAL>; \ ++ template class LIBMESH_EXPORT FE< (_dim), SCALAR>; \ ++ template class LIBMESH_EXPORT FE< (_dim), BERNSTEIN>; \ ++ template class LIBMESH_EXPORT FE< (_dim), SZABAB>; \ ++ template class LIBMESH_EXPORT FE< (_dim), XYZ>; \ ++ template class LIBMESH_EXPORT FE< (_dim), RATIONAL_BERNSTEIN>; \ ++ template class LIBMESH_EXPORT FE< (_dim), NEDELEC_ONE>; \ ++ template class LIBMESH_EXPORT FE< (_dim), MONOMIAL_VEC> + + #define INSTANTIATE_ALL_MAPS(_dim) \ + INSTANTIATE_MAPS(_dim,CLOUGH); \ +diff --git a/include/fe/inf_fe_macro.h b/include/fe/inf_fe_macro.h +index 61f5584..abf1f1b 100644 +--- a/include/fe/inf_fe_macro.h ++++ b/include/fe/inf_fe_macro.h +@@ -34,18 +34,19 @@ + * file(s) \p inf_fe_instantiate_1D.h, \p inf_fe_instantiate_2D.h, + * and \p inf_fe_instantiate_3D.h for 1D, 2D and 3D, respectively. + */ +-#define INSTANTIATE_INF_FE(_dim,_map_type) template class InfFE< _dim, INFINITE_MAP, _map_type >; \ +- template class InfFE< _dim, JACOBI_20_00, _map_type >; \ +- template class InfFE< _dim, JACOBI_30_00, _map_type >; \ +- template class InfFE< _dim, LEGENDRE, _map_type >; \ +- template class InfFE< _dim, LAGRANGE, _map_type > +- +-#define INSTANTIATE_INF_FE_MBRF(_dim,_map_type,_return,_function) \ +- template _return InfFE< _dim,INFINITE_MAP,_map_type>::_function; \ +- template _return InfFE< _dim,JACOBI_20_00,_map_type>::_function; \ +- template _return InfFE< _dim,JACOBI_30_00,_map_type>::_function; \ +- template _return InfFE< _dim,LEGENDRE,_map_type>::_function; \ +- template _return InfFE< _dim,LAGRANGE,_map_type>::_function ++#define INSTANTIATE_INF_FE(_dim,_map_type) \ ++ template class LIBMESH_EXPORT InfFE< _dim, INFINITE_MAP, _map_type >; \ ++ template class LIBMESH_EXPORT InfFE< _dim, JACOBI_20_00, _map_type >; \ ++ template class LIBMESH_EXPORT InfFE< _dim, JACOBI_30_00, _map_type >; \ ++ template class LIBMESH_EXPORT InfFE< _dim, LEGENDRE, _map_type >; \ ++ template class LIBMESH_EXPORT InfFE< _dim, LAGRANGE, _map_type > ++ ++#define INSTANTIATE_INF_FE_MBRF(_dim,_map_type,_return,_function) \ ++ template _return LIBMESH_EXPORT InfFE< _dim,INFINITE_MAP,_map_type>::_function; \ ++ template _return LIBMESH_EXPORT InfFE< _dim,JACOBI_20_00,_map_type>::_function; \ ++ template _return LIBMESH_EXPORT InfFE< _dim,JACOBI_30_00,_map_type>::_function; \ ++ template _return LIBMESH_EXPORT InfFE< _dim,LEGENDRE,_map_type>::_function; \ ++ template _return LIBMESH_EXPORT InfFE< _dim,LAGRANGE,_map_type>::_function + + #else + +diff --git a/src/base/dof_map.C b/src/base/dof_map.C +index 7b90126..4a1e8ff 100644 +--- a/src/base/dof_map.C ++++ b/src/base/dof_map.C +@@ -2987,7 +2987,7 @@ std::string DofMap::get_info() const + } + + +-template bool DofMap::is_evaluable(const Elem &, unsigned int) const; +-template bool DofMap::is_evaluable(const Node &, unsigned int) const; ++template LIBMESH_EXPORT bool DofMap::is_evaluable(const Elem &, unsigned int) const; ++template LIBMESH_EXPORT bool DofMap::is_evaluable(const Node &, unsigned int) const; + + } // namespace libMesh +diff --git a/src/base/libmesh.C b/src/base/libmesh.C +index 7452b30..8cb12c9 100644 +--- a/src/base/libmesh.C ++++ b/src/base/libmesh.C +@@ -1039,46 +1039,46 @@ SolverPackage default_solver_package () + + + //------------------------------------------------------------------------------- +-template unsigned short command_line_value (const std::string &, unsigned short); +-template unsigned int command_line_value (const std::string &, unsigned int); +-template short command_line_value (const std::string &, short); +-template int command_line_value (const std::string &, int); +-template float command_line_value (const std::string &, float); +-template double command_line_value (const std::string &, double); +-template long double command_line_value (const std::string &, long double); +-template std::string command_line_value (const std::string &, std::string); +- +-template unsigned short command_line_value (const std::vector &, unsigned short); +-template unsigned int command_line_value (const std::vector &, unsigned int); +-template short command_line_value (const std::vector &, short); +-template int command_line_value (const std::vector &, int); +-template float command_line_value (const std::vector &, float); +-template double command_line_value (const std::vector &, double); +-template long double command_line_value (const std::vector &, long double); +-template std::string command_line_value (const std::vector &, std::string); +- +-template unsigned short command_line_next (std::string, unsigned short); +-template unsigned int command_line_next (std::string, unsigned int); +-template short command_line_next (std::string, short); +-template int command_line_next (std::string, int); +-template float command_line_next (std::string, float); +-template double command_line_next (std::string, double); +-template long double command_line_next (std::string, long double); +-template std::string command_line_next (std::string, std::string); +- +-template void command_line_vector(const std::string &, std::vector &); +-template void command_line_vector (const std::string &, std::vector &); +-template void command_line_vector (const std::string &, std::vector &); +-template void command_line_vector (const std::string &, std::vector &); +-template void command_line_vector (const std::string &, std::vector &); +-template void command_line_vector (const std::string &, std::vector &); +-template void command_line_vector (const std::string &, std::vector &); ++template LIBMESH_EXPORT unsigned short command_line_value (const std::string &, unsigned short); ++template LIBMESH_EXPORT unsigned int command_line_value (const std::string &, unsigned int); ++template LIBMESH_EXPORT short command_line_value (const std::string &, short); ++template LIBMESH_EXPORT int command_line_value (const std::string &, int); ++template LIBMESH_EXPORT float command_line_value (const std::string &, float); ++template LIBMESH_EXPORT double command_line_value (const std::string &, double); ++template LIBMESH_EXPORT long double command_line_value (const std::string &, long double); ++template LIBMESH_EXPORT std::string command_line_value (const std::string &, std::string); ++ ++template LIBMESH_EXPORT unsigned short command_line_value (const std::vector &, unsigned short); ++template LIBMESH_EXPORT unsigned int command_line_value (const std::vector &, unsigned int); ++template LIBMESH_EXPORT short command_line_value (const std::vector &, short); ++template LIBMESH_EXPORT int command_line_value (const std::vector &, int); ++template LIBMESH_EXPORT float command_line_value (const std::vector &, float); ++template LIBMESH_EXPORT double command_line_value (const std::vector &, double); ++template LIBMESH_EXPORT long double command_line_value (const std::vector &, long double); ++template LIBMESH_EXPORT std::string command_line_value (const std::vector &, std::string); ++ ++template LIBMESH_EXPORT unsigned short command_line_next (std::string, unsigned short); ++template LIBMESH_EXPORT unsigned int command_line_next (std::string, unsigned int); ++template LIBMESH_EXPORT short command_line_next (std::string, short); ++template LIBMESH_EXPORT int command_line_next (std::string, int); ++template LIBMESH_EXPORT float command_line_next (std::string, float); ++template LIBMESH_EXPORT double command_line_next (std::string, double); ++template LIBMESH_EXPORT long double command_line_next (std::string, long double); ++template LIBMESH_EXPORT std::string command_line_next (std::string, std::string); ++ ++template LIBMESH_EXPORT void command_line_vector(const std::string &, std::vector &); ++template LIBMESH_EXPORT void command_line_vector (const std::string &, std::vector &); ++template LIBMESH_EXPORT void command_line_vector (const std::string &, std::vector &); ++template LIBMESH_EXPORT void command_line_vector (const std::string &, std::vector &); ++template LIBMESH_EXPORT void command_line_vector (const std::string &, std::vector &); ++template LIBMESH_EXPORT void command_line_vector (const std::string &, std::vector &); ++template LIBMESH_EXPORT void command_line_vector (const std::string &, std::vector &); + + #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION +-template Real command_line_value (const std::string &, Real); +-template Real command_line_value (const std::vector &, Real); +-template Real command_line_next (std::string, Real); +-template void command_line_vector (const std::string &, std::vector &); ++template LIBMESH_EXPORT Real command_line_value (const std::string &, Real); ++template LIBMESH_EXPORT Real command_line_value (const std::vector &, Real); ++template LIBMESH_EXPORT Real command_line_next (std::string, Real); ++template LIBMESH_EXPORT void command_line_vector (const std::string &, std::vector &); + #endif + + } // namespace libMesh +diff --git a/src/base/single_predicates.C b/src/base/single_predicates.C +index 41a1c72..19daa14 100644 +--- a/src/base/single_predicates.C ++++ b/src/base/single_predicates.C +@@ -54,13 +54,13 @@ evaluable::operator()(const T & it) const + + + // Instantiate with the useful values of T +-#define INSTANTIATE_NODAL_PREDICATES(IterType) \ +- template bool bid::operator()(const IterType &) const; \ +- template bool bnd::operator()(const IterType &) const; \ +- template bool evaluable::operator()(const IterType &) const ++#define INSTANTIATE_NODAL_PREDICATES(IterType) \ ++ template LIBMESH_EXPORT bool bid::operator()(const IterType &) const; \ ++ template LIBMESH_EXPORT bool bnd::operator()(const IterType &) const; \ ++ template LIBMESH_EXPORT bool evaluable::operator()(const IterType &) const + +-#define INSTANTIATE_ELEM_PREDICATES(IterType) \ +- template bool evaluable::operator()(const IterType &) const ++#define INSTANTIATE_ELEM_PREDICATES(IterType) \ ++ template LIBMESH_EXPORT bool evaluable::operator()(const IterType &) const + + // Handle commas in macro arguments + #define LIBMESH_COMMA , +diff --git a/src/error_estimation/exact_solution.C b/src/error_estimation/exact_solution.C +index f1a1033..c08a512 100644 +--- a/src/error_estimation/exact_solution.C ++++ b/src/error_estimation/exact_solution.C +@@ -819,7 +819,7 @@ void ExactSolution::_compute_error(const std::string & sys_name, + } + + // Explicit instantiations of templated member functions +-template void ExactSolution::_compute_error(const std::string &, const std::string &, std::vector &); +-template void ExactSolution::_compute_error(const std::string &, const std::string &, std::vector &); ++template LIBMESH_EXPORT void ExactSolution::_compute_error(const std::string &, const std::string &, std::vector &); ++template LIBMESH_EXPORT void ExactSolution::_compute_error(const std::string &, const std::string &, std::vector &); + + } // namespace libMesh +diff --git a/src/fe/fe_base.C b/src/fe/fe_base.C +index ad55e8c..c53a721 100644 +--- a/src/fe/fe_base.C ++++ b/src/fe/fe_base.C +@@ -2432,7 +2432,7 @@ compute_periodic_constraints (DofConstraints & constraints, + + // ------------------------------------------------------------ + // Explicit instantiations +-template class FEGenericBase; +-template class FEGenericBase; ++template class LIBMESH_EXPORT FEGenericBase; ++template class LIBMESH_EXPORT FEGenericBase; + + } // namespace libMesh +diff --git a/src/fe/fe_boundary.C b/src/fe/fe_boundary.C +index 0e2ae56..54721b5 100644 +--- a/src/fe/fe_boundary.C ++++ b/src/fe/fe_boundary.C +@@ -37,7 +37,7 @@ namespace libMesh + //------------------------------------------------------- + // Full specializations for useless methods in 0D, 1D + #define REINIT_ERROR(_dim, _type, _func) \ +- template <> \ ++ template <> \ + void FE<_dim,_type>::_func(const Elem *, \ + const unsigned int, \ + const Real, \ +@@ -45,7 +45,7 @@ namespace libMesh + const std::vector * const) + + #define SIDEMAP_ERROR(_dim, _type, _func) \ +- template <> \ ++ template <> \ + void FE<_dim,_type>::_func(const Elem *, \ + const Elem *, \ + const unsigned int, \ +@@ -53,7 +53,7 @@ namespace libMesh + std::vector &) + + #define FACE_EDGE_SHAPE_ERROR(_dim, _func) \ +- template <> \ ++ template <> \ + void FEMap::_func<_dim>(const std::vector &, \ + const Elem *) \ + { \ +@@ -1072,149 +1072,149 @@ void FEMap::compute_edge_map(int dim, + + // Explicit FEMap Instantiations + FACE_EDGE_SHAPE_ERROR(0,init_face_shape_functions) +-template void FEMap::init_face_shape_functions<1>(const std::vector &, const Elem *); +-template void FEMap::init_face_shape_functions<2>(const std::vector &, const Elem *); +-template void FEMap::init_face_shape_functions<3>(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_face_shape_functions<1>(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_face_shape_functions<2>(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_face_shape_functions<3>(const std::vector &, const Elem *); + + FACE_EDGE_SHAPE_ERROR(0,init_edge_shape_functions) +-template void FEMap::init_edge_shape_functions<1>(const std::vector &, const Elem *); +-template void FEMap::init_edge_shape_functions<2>(const std::vector &, const Elem *); +-template void FEMap::init_edge_shape_functions<3>(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_edge_shape_functions<1>(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_edge_shape_functions<2>(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_edge_shape_functions<3>(const std::vector &, const Elem *); + + //-------------------------------------------------------------- + // Explicit FE instantiations +-template void FE<1,LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,LAGRANGE_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,LAGRANGE_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,L2_LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,L2_LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,L2_HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,L2_HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,CLOUGH>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,CLOUGH>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,HERMITE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,HERMITE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,MONOMIAL>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,MONOMIAL>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,MONOMIAL_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,MONOMIAL_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,SCALAR>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,SCALAR>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,LAGRANGE_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,LAGRANGE_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,L2_LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,L2_LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,L2_HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,L2_HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,CLOUGH>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,CLOUGH>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,HERMITE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,HERMITE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,MONOMIAL>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,MONOMIAL>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,MONOMIAL_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,MONOMIAL_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,SCALAR>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,SCALAR>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); + #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES +-template void FE<1,BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,SZABAB>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,SZABAB>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<1,RATIONAL_BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,RATIONAL_BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,SZABAB>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,SZABAB>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<1,RATIONAL_BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,RATIONAL_BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); + #endif +-template void FE<1,XYZ>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<1,XYZ>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +- +-template void FE<2,LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,LAGRANGE_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,LAGRANGE_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,LAGRANGE_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,L2_LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,L2_LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,L2_LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,L2_HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,L2_HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,L2_HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,CLOUGH>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,CLOUGH>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,CLOUGH>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,HERMITE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,HERMITE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,HERMITE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,MONOMIAL>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,MONOMIAL>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,MONOMIAL>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,MONOMIAL_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,MONOMIAL_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,MONOMIAL_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,SCALAR>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,SCALAR>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,SCALAR>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,XYZ>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<1,XYZ>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++ ++template LIBMESH_EXPORT void FE<2,LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,LAGRANGE_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,LAGRANGE_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,LAGRANGE_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,L2_LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,L2_LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,L2_LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,L2_HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,L2_HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,L2_HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,CLOUGH>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,CLOUGH>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,CLOUGH>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,HERMITE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,HERMITE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,HERMITE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,MONOMIAL>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,MONOMIAL>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,MONOMIAL>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,MONOMIAL_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,MONOMIAL_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,MONOMIAL_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,SCALAR>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,SCALAR>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,SCALAR>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); + #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES +-template void FE<2,BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,SZABAB>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,SZABAB>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,SZABAB>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,RATIONAL_BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,RATIONAL_BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,RATIONAL_BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,SZABAB>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,SZABAB>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,SZABAB>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,RATIONAL_BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,RATIONAL_BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,RATIONAL_BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); + #endif +-template void FE<2,SUBDIVISION>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,XYZ>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,XYZ>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,XYZ>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,NEDELEC_ONE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<2,NEDELEC_ONE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<2,NEDELEC_ONE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,SUBDIVISION>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,XYZ>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,XYZ>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,XYZ>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,NEDELEC_ONE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<2,NEDELEC_ONE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<2,NEDELEC_ONE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); + + // Intel 9.1 complained it needed this in devel mode. +-//template void FE<2,XYZ>::init_face_shape_functions(const std::vector &, const Elem *); +- +-template void FE<3,LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,LAGRANGE_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,LAGRANGE_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,LAGRANGE_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,L2_LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,L2_LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,L2_LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,L2_HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,L2_HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,L2_HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,CLOUGH>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,CLOUGH>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,CLOUGH>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,HERMITE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,HERMITE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,HERMITE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,MONOMIAL>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,MONOMIAL>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,MONOMIAL>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,MONOMIAL_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,MONOMIAL_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,MONOMIAL_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,SCALAR>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,SCALAR>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,SCALAR>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++//template LIBMESH_EXPORT void FE<2,XYZ>::init_face_shape_functions(const std::vector &, const Elem *); ++ ++template LIBMESH_EXPORT void FE<3,LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,LAGRANGE_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,LAGRANGE_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,LAGRANGE_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,L2_LAGRANGE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,L2_LAGRANGE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,L2_LAGRANGE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,L2_HIERARCHIC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,L2_HIERARCHIC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,L2_HIERARCHIC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,CLOUGH>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,CLOUGH>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,CLOUGH>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,HERMITE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,HERMITE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,HERMITE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,MONOMIAL>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,MONOMIAL>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,MONOMIAL>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,MONOMIAL_VEC>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,MONOMIAL_VEC>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,MONOMIAL_VEC>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,SCALAR>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,SCALAR>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,SCALAR>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); + #ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES +-template void FE<3,BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,SZABAB>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,SZABAB>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,SZABAB>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,RATIONAL_BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,RATIONAL_BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,RATIONAL_BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,SZABAB>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,SZABAB>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,SZABAB>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,RATIONAL_BERNSTEIN>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,RATIONAL_BERNSTEIN>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,RATIONAL_BERNSTEIN>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); + #endif +-template void FE<3,XYZ>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,XYZ>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,XYZ>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,NEDELEC_ONE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); +-template void FE<3,NEDELEC_ONE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); +-template void FE<3,NEDELEC_ONE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,XYZ>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,XYZ>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,XYZ>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,NEDELEC_ONE>::reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); ++template LIBMESH_EXPORT void FE<3,NEDELEC_ONE>::side_map(Elem const *, Elem const *, const unsigned int, const std::vector &, std::vector &); ++template LIBMESH_EXPORT void FE<3,NEDELEC_ONE>::edge_reinit(Elem const *, unsigned int, Real, const std::vector * const, const std::vector * const); + + // Intel 9.1 complained it needed this in devel mode. +-//template void FE<3,XYZ>::init_face_shape_functions(const std::vector &, const Elem *); ++//template LIBMESH_EXPORT void FE<3,XYZ>::init_face_shape_functions(const std::vector &, const Elem *); + + } // namespace libMesh +diff --git a/src/fe/fe_map.C b/src/fe/fe_map.C +index d3df939..ea1d405 100644 +--- a/src/fe/fe_map.C ++++ b/src/fe/fe_map.C +@@ -2109,10 +2109,10 @@ Point FE::map_zeta (const Elem * elem, + + + // Explicit instantiation of FEMap member functions +-template void FEMap::init_reference_to_physical_map<0>( const std::vector &, const Elem *); +-template void FEMap::init_reference_to_physical_map<1>( const std::vector &, const Elem *); +-template void FEMap::init_reference_to_physical_map<2>( const std::vector &, const Elem *); +-template void FEMap::init_reference_to_physical_map<3>( const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_reference_to_physical_map<0>( const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_reference_to_physical_map<1>( const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_reference_to_physical_map<2>( const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEMap::init_reference_to_physical_map<3>( const std::vector &, const Elem *); + + //-------------------------------------------------------------- + // Explicit instantiations using the macro from fe_macro.h +diff --git a/src/fe/fe_transformation_base.C b/src/fe/fe_transformation_base.C +index bb5e8be..67fd05b 100644 +--- a/src/fe/fe_transformation_base.C ++++ b/src/fe/fe_transformation_base.C +@@ -65,7 +65,7 @@ std::unique_ptr> FETransformationBase; +-template class FETransformationBase; ++template class LIBMESH_EXPORT FETransformationBase; ++template class LIBMESH_EXPORT FETransformationBase; + + } // namespace libMesh +diff --git a/src/fe/fe_xyz.C b/src/fe/fe_xyz.C +index ca42958..44d4da6 100644 +--- a/src/fe/fe_xyz.C ++++ b/src/fe/fe_xyz.C +@@ -963,14 +963,14 @@ template <> bool FE<3,XYZ>::shapes_need_reinit() const { return true; } + // 2.) There is (IMHO) less chance of the linker calling the + // wrong version of one of these member functions, since there is + // only one FEXYZ. +-template void FEXYZ<0>::init_shape_functions(const std::vector &, const Elem *); +-template void FEXYZ<1>::init_shape_functions(const std::vector &, const Elem *); +-template void FEXYZ<2>::init_shape_functions(const std::vector &, const Elem *); +-template void FEXYZ<3>::init_shape_functions(const std::vector &, const Elem *); +- +-template void FEXYZ<0>::compute_shape_functions(const Elem *,const std::vector &); +-template void FEXYZ<1>::compute_shape_functions(const Elem *,const std::vector &); +-template void FEXYZ<2>::compute_shape_functions(const Elem *,const std::vector &); +-template void FEXYZ<3>::compute_shape_functions(const Elem *,const std::vector &); ++template LIBMESH_EXPORT void FEXYZ<0>::init_shape_functions(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEXYZ<1>::init_shape_functions(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEXYZ<2>::init_shape_functions(const std::vector &, const Elem *); ++template LIBMESH_EXPORT void FEXYZ<3>::init_shape_functions(const std::vector &, const Elem *); ++ ++template LIBMESH_EXPORT void FEXYZ<0>::compute_shape_functions(const Elem *,const std::vector &); ++template LIBMESH_EXPORT void FEXYZ<1>::compute_shape_functions(const Elem *,const std::vector &); ++template LIBMESH_EXPORT void FEXYZ<2>::compute_shape_functions(const Elem *,const std::vector &); ++template LIBMESH_EXPORT void FEXYZ<3>::compute_shape_functions(const Elem *,const std::vector &); + + } // namespace libMesh +diff --git a/src/fe/fe_xyz_boundary.C b/src/fe/fe_xyz_boundary.C +index e340a32..185b2d5 100644 +--- a/src/fe/fe_xyz_boundary.C ++++ b/src/fe/fe_xyz_boundary.C +@@ -226,8 +226,8 @@ void FEXYZ::compute_face_values(const Elem * elem, + //-------------------------------------------------------------- + // Explicit instantiations (doesn't make sense in 1D!) using fe_macro.h's macro + +-template class FEXYZ<2>; +-template class FEXYZ<3>; ++template class LIBMESH_EXPORT FEXYZ<2>; ++template class LIBMESH_EXPORT FEXYZ<3>; + + + } // namespace libMesh +diff --git a/src/fe/h1_fe_transformation.C b/src/fe/h1_fe_transformation.C +index dafbcf5..9379b75 100644 +--- a/src/fe/h1_fe_transformation.C ++++ b/src/fe/h1_fe_transformation.C +@@ -749,7 +749,7 @@ void H1FETransformation::map_div(const unsigned int dim, + } + + // Explicit Instantiations +-template class H1FETransformation; +-template class H1FETransformation; ++template class LIBMESH_EXPORT H1FETransformation; ++template class LIBMESH_EXPORT H1FETransformation; + + } //namespace libMesh +diff --git a/src/fe/hcurl_fe_transformation.C b/src/fe/hcurl_fe_transformation.C +index 4a2a8cf..c59105c 100644 +--- a/src/fe/hcurl_fe_transformation.C ++++ b/src/fe/hcurl_fe_transformation.C +@@ -249,7 +249,7 @@ void HCurlFETransformation::map_curl(const unsigned int dim, + } // switch(dim) + } + +-template class HCurlFETransformation; ++template class LIBMESH_EXPORT HCurlFETransformation; + + template<> + void HCurlFETransformation::init_map_phi(const FEGenericBase & ) const +diff --git a/src/mesh/mesh_communication_global_indices.C b/src/mesh/mesh_communication_global_indices.C +index 5366a35..e0db3f1 100644 +--- a/src/mesh/mesh_communication_global_indices.C ++++ b/src/mesh/mesh_communication_global_indices.C +@@ -986,29 +986,29 @@ void MeshCommunication::find_global_indices (const Parallel::Communicator &, + + + //------------------------------------------------------------------ +-template void MeshCommunication::find_global_indices (const Parallel::Communicator &, ++template LIBMESH_EXPORT void MeshCommunication::find_global_indices (const Parallel::Communicator &, + const libMesh::BoundingBox &, + const MeshBase::const_node_iterator &, + const MeshBase::const_node_iterator &, + std::vector &) const; + +-template void MeshCommunication::find_global_indices (const Parallel::Communicator &, ++template LIBMESH_EXPORT void MeshCommunication::find_global_indices (const Parallel::Communicator &, + const libMesh::BoundingBox &, + const MeshBase::const_element_iterator &, + const MeshBase::const_element_iterator &, + std::vector &) const; +-template void MeshCommunication::find_global_indices (const Parallel::Communicator &, ++template LIBMESH_EXPORT void MeshCommunication::find_global_indices (const Parallel::Communicator &, + const libMesh::BoundingBox &, + const MeshBase::node_iterator &, + const MeshBase::node_iterator &, + std::vector &) const; + +-template void MeshCommunication::find_global_indices (const Parallel::Communicator &, ++template LIBMESH_EXPORT void MeshCommunication::find_global_indices (const Parallel::Communicator &, + const libMesh::BoundingBox &, + const MeshBase::element_iterator &, + const MeshBase::element_iterator &, + std::vector &) const; +-template void MeshCommunication::find_local_indices (const libMesh::BoundingBox &, ++template LIBMESH_EXPORT void MeshCommunication::find_local_indices (const libMesh::BoundingBox &, + const MeshBase::const_element_iterator &, + const MeshBase::const_element_iterator &, + std::unordered_map &) const; +diff --git a/src/mesh/mesh_output.C b/src/mesh/mesh_output.C +index 65ec2f6..636d989 100644 +--- a/src/mesh/mesh_output.C ++++ b/src/mesh/mesh_output.C +@@ -162,8 +162,8 @@ void MeshOutput::write_nodal_data (const std::string & fname, + + // Instantiate for our Mesh types. If this becomes too cumbersome later, + // move any functions in this file to the header file instead. +-template class MeshOutput; +-template class MeshOutput; +-template class MeshOutput; ++template class LIBMESH_EXPORT MeshOutput; ++template class LIBMESH_EXPORT MeshOutput; ++template class LIBMESH_EXPORT MeshOutput; + + } // namespace libMesh +diff --git a/src/numerics/dense_matrix.C b/src/numerics/dense_matrix.C +index 7839e8e..53e4c5d 100644 +--- a/src/numerics/dense_matrix.C ++++ b/src/numerics/dense_matrix.C +@@ -25,18 +25,18 @@ namespace libMesh + //-------------------------------------------------------------- + // Explicit instantiations + #define LIBMESH_VMA_INSTANTIATE(T1,T2,T3) \ +- template void DenseMatrix::vector_mult_add \ ++ template LIBMESH_EXPORT void DenseMatrix::vector_mult_add \ + (DenseVector< \ + CompareTypes::supertype>::supertype> & dest, \ + const T2 factor, \ + const DenseVector & arg) const + +-template class DenseMatrix; +-template void DenseMatrix::cholesky_solve(const DenseVector &, DenseVector &); +-template void DenseMatrix::_cholesky_back_substitute(const DenseVector &, DenseVector &) const; +-template void DenseMatrix::cholesky_solve(const DenseVector &, DenseVector &); +-template void DenseMatrix::_cholesky_back_substitute(const DenseVector &, DenseVector &) const; ++template class LIBMESH_EXPORT DenseMatrix; ++template LIBMESH_EXPORT void DenseMatrix::cholesky_solve(const DenseVector &, DenseVector &); ++template LIBMESH_EXPORT void DenseMatrix::_cholesky_back_substitute(const DenseVector &, DenseVector &) const; ++template LIBMESH_EXPORT void DenseMatrix::cholesky_solve(const DenseVector &, DenseVector &); ++template LIBMESH_EXPORT void DenseMatrix::_cholesky_back_substitute(const DenseVector &, DenseVector &) const; + LIBMESH_VMA_INSTANTIATE(Real,int,Real); + #ifndef LIBMESH_DEFAULT_SINGLE_PRECISION + LIBMESH_VMA_INSTANTIATE(Real,float,Real); +@@ -46,12 +46,12 @@ LIBMESH_VMA_INSTANTIATE(Real,double,Real); + #endif + + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class DenseMatrix; +-template void DenseMatrix::cholesky_solve(const DenseVector &,DenseVector &); +-template void DenseMatrix::_cholesky_back_substitute(const DenseVector &, DenseVector &) const; +-template void DenseMatrix::vector_mult (DenseVector::supertype> & dest, ++template class LIBMESH_EXPORT DenseMatrix; ++template LIBMESH_EXPORT void DenseMatrix::cholesky_solve(const DenseVector &,DenseVector &); ++template LIBMESH_EXPORT void DenseMatrix::_cholesky_back_substitute(const DenseVector &, DenseVector &) const; ++template LIBMESH_EXPORT void DenseMatrix::vector_mult (DenseVector::supertype> & dest, + const DenseVector & arg) const; +-template void DenseMatrix::vector_mult_transpose (DenseVector::supertype> & dest, ++template LIBMESH_EXPORT void DenseMatrix::vector_mult_transpose (DenseVector::supertype> & dest, + const DenseVector & arg) const; + LIBMESH_VMA_INSTANTIATE(Real,int,Complex); + LIBMESH_VMA_INSTANTIATE(Complex,int,Complex); +diff --git a/src/numerics/dense_matrix_base.C b/src/numerics/dense_matrix_base.C +index ec4d10f..302e1ce 100644 +--- a/src/numerics/dense_matrix_base.C ++++ b/src/numerics/dense_matrix_base.C +@@ -23,10 +23,10 @@ namespace libMesh + + //-------------------------------------------------------------- + // Explicit instantiations +-template class DenseMatrixBase; ++template class LIBMESH_EXPORT DenseMatrixBase; + + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class DenseMatrixBase; ++template class LIBMESH_EXPORT DenseMatrixBase; + #endif + + } // namespace libMesh +diff --git a/src/numerics/dense_matrix_blas_lapack.C b/src/numerics/dense_matrix_blas_lapack.C +index cf23a5e..45952f1 100644 +--- a/src/numerics/dense_matrix_blas_lapack.C ++++ b/src/numerics/dense_matrix_blas_lapack.C +@@ -1132,51 +1132,51 @@ void DenseMatrix::_matvec_blas(T, + + //-------------------------------------------------------------- + // Explicit instantiations +-template void DenseMatrix::_multiply_blas(const DenseMatrixBase &, _BLAS_Multiply_Flag); +-template void DenseMatrix::_lu_decompose_lapack(); +-template void DenseMatrix::_lu_back_substitute_lapack(const DenseVector &, ++template LIBMESH_EXPORT void DenseMatrix::_multiply_blas(const DenseMatrixBase &, _BLAS_Multiply_Flag); ++template LIBMESH_EXPORT void DenseMatrix::_lu_decompose_lapack(); ++template LIBMESH_EXPORT void DenseMatrix::_lu_back_substitute_lapack(const DenseVector &, + DenseVector &); +-template void DenseMatrix::_matvec_blas(Real, ++template LIBMESH_EXPORT void DenseMatrix::_matvec_blas(Real, + Real, + DenseVector &, + const DenseVector &, + bool) const; +-template void DenseMatrix::_svd_lapack(DenseVector &); +-template void DenseMatrix::_svd_lapack(DenseVector &, ++template LIBMESH_EXPORT void DenseMatrix::_svd_lapack(DenseVector &); ++template LIBMESH_EXPORT void DenseMatrix::_svd_lapack(DenseVector &, + DenseMatrix &, + DenseMatrix &); +-template void DenseMatrix::_svd_helper (char, ++template LIBMESH_EXPORT void DenseMatrix::_svd_helper (char, + char, + std::vector &, + std::vector &, + std::vector &); +-template void DenseMatrix::_svd_solve_lapack (const DenseVector &, DenseVector &, Real) const; +-template void DenseMatrix::_evd_lapack(DenseVector &, ++template LIBMESH_EXPORT void DenseMatrix::_svd_solve_lapack (const DenseVector &, DenseVector &, Real) const; ++template LIBMESH_EXPORT void DenseMatrix::_evd_lapack(DenseVector &, + DenseVector &, + DenseMatrix *, + DenseMatrix *); + + #if !(LIBMESH_USE_REAL_NUMBERS) +-template void DenseMatrix::_multiply_blas(const DenseMatrixBase &, _BLAS_Multiply_Flag); +-template void DenseMatrix::_lu_decompose_lapack(); +-template void DenseMatrix::_lu_back_substitute_lapack(const DenseVector &, ++template LIBMESH_EXPORT void DenseMatrix::_multiply_blas(const DenseMatrixBase &, _BLAS_Multiply_Flag); ++template LIBMESH_EXPORT void DenseMatrix::_lu_decompose_lapack(); ++template LIBMESH_EXPORT void DenseMatrix::_lu_back_substitute_lapack(const DenseVector &, + DenseVector &); +-template void DenseMatrix::_matvec_blas(Number, ++template LIBMESH_EXPORT void DenseMatrix::_matvec_blas(Number, + Number, + DenseVector &, + const DenseVector &, + bool) const; +-template void DenseMatrix::_svd_lapack(DenseVector &); +-template void DenseMatrix::_svd_lapack(DenseVector &, ++template LIBMESH_EXPORT void DenseMatrix::_svd_lapack(DenseVector &); ++template LIBMESH_EXPORT void DenseMatrix::_svd_lapack(DenseVector &, + DenseMatrix &, + DenseMatrix &); +-template void DenseMatrix::_svd_helper (char, ++template LIBMESH_EXPORT void DenseMatrix::_svd_helper (char, + char, + std::vector &, + std::vector &, + std::vector &); +-template void DenseMatrix::_svd_solve_lapack (const DenseVector &, DenseVector &, Real) const; +-template void DenseMatrix::_evd_lapack(DenseVector &, ++template LIBMESH_EXPORT void DenseMatrix::_svd_solve_lapack (const DenseVector &, DenseVector &, Real) const; ++template LIBMESH_EXPORT void DenseMatrix::_evd_lapack(DenseVector &, + DenseVector &, + DenseMatrix *, + DenseMatrix *); +diff --git a/src/numerics/dense_submatrix.C b/src/numerics/dense_submatrix.C +index 1d7c64f..0821687 100644 +--- a/src/numerics/dense_submatrix.C ++++ b/src/numerics/dense_submatrix.C +@@ -65,10 +65,10 @@ void DenseSubMatrix::right_multiply (const DenseMatrixBase & M3) + + //-------------------------------------------------------------- + // Explicit instantiations +-template class DenseSubMatrix; ++template class LIBMESH_EXPORT DenseSubMatrix; + + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class DenseSubMatrix; ++template class LIBMESH_EXPORT DenseSubMatrix; + #endif + + } // namespace libMesh +diff --git a/src/numerics/dense_subvector.C b/src/numerics/dense_subvector.C +index cf63187..a58e901 100644 +--- a/src/numerics/dense_subvector.C ++++ b/src/numerics/dense_subvector.C +@@ -24,10 +24,10 @@ namespace libMesh + + //-------------------------------------------------------------- + // Explicit instantiations +-template class DenseSubVector; ++template class LIBMESH_EXPORT DenseSubVector; + + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class DenseSubVector; ++template class LIBMESH_EXPORT DenseSubVector; + #endif + + } // namespace libMesh +diff --git a/src/numerics/dense_vector.C b/src/numerics/dense_vector.C +index cc54205..8fc8fb5 100644 +--- a/src/numerics/dense_vector.C ++++ b/src/numerics/dense_vector.C +@@ -26,10 +26,10 @@ namespace libMesh + + //-------------------------------------------------------------- + // Explicit instantiations +-template class DenseVector; ++template class LIBMESH_EXPORT DenseVector; + + //#ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class DenseVector; ++template class LIBMESH_EXPORT DenseVector; + //#endif + + } // namespace libMesh +diff --git a/src/numerics/dense_vector_base.C b/src/numerics/dense_vector_base.C +index 2dedb66..3e50dc4 100644 +--- a/src/numerics/dense_vector_base.C ++++ b/src/numerics/dense_vector_base.C +@@ -59,10 +59,10 @@ void DenseVectorBase::print (std::ostream & os) const + + //-------------------------------------------------------------- + // Explicit instantiations +-template class DenseVectorBase; ++template class LIBMESH_EXPORT DenseVectorBase; + + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class DenseVectorBase; ++template class LIBMESH_EXPORT DenseVectorBase; + #endif + + } // namespace libMesh +diff --git a/src/numerics/distributed_vector.C b/src/numerics/distributed_vector.C +index 1d39e5e..e553afb 100644 +--- a/src/numerics/distributed_vector.C ++++ b/src/numerics/distributed_vector.C +@@ -620,6 +620,6 @@ void DistributedVector::pointwise_mult (const NumericVector &, + + //-------------------------------------------------------------- + // Explicit instantiations +-template class DistributedVector; ++template class LIBMESH_EXPORT DistributedVector; + + } // namespace libMesh +diff --git a/src/numerics/eigen_preconditioner.C b/src/numerics/eigen_preconditioner.C +index ba864bd..a5121a4 100644 +--- a/src/numerics/eigen_preconditioner.C ++++ b/src/numerics/eigen_preconditioner.C +@@ -49,7 +49,7 @@ void EigenPreconditioner::init () + + //------------------------------------------------------------------ + // Explicit instantiations +-template class EigenPreconditioner; ++template class LIBMESH_EXPORT EigenPreconditioner; + + } // namespace libMesh + +diff --git a/src/numerics/eigen_sparse_matrix.C b/src/numerics/eigen_sparse_matrix.C +index 30720b9..b3b4c0e 100644 +--- a/src/numerics/eigen_sparse_matrix.C ++++ b/src/numerics/eigen_sparse_matrix.C +@@ -333,7 +333,7 @@ Real EigenSparseMatrix::linfty_norm () const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class EigenSparseMatrix; ++template class LIBMESH_EXPORT EigenSparseMatrix; + + } // namespace libMesh + +diff --git a/src/numerics/eigen_sparse_vector.C b/src/numerics/eigen_sparse_vector.C +index 52142b0..cf89a0d 100644 +--- a/src/numerics/eigen_sparse_vector.C ++++ b/src/numerics/eigen_sparse_vector.C +@@ -475,7 +475,7 @@ Real EigenSparseVector::min () const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class EigenSparseVector; ++template class LIBMESH_EXPORT EigenSparseVector; + + } // namespace libMesh + +diff --git a/src/numerics/laspack_matrix.C b/src/numerics/laspack_matrix.C +index 99387f5..b5fbf88 100644 +--- a/src/numerics/laspack_matrix.C ++++ b/src/numerics/laspack_matrix.C +@@ -482,7 +482,7 @@ void LaspackMatrix::close() + + //------------------------------------------------------------------ + // Explicit instantiations +-template class LaspackMatrix; ++template class LIBMESH_EXPORT LaspackMatrix; + + } // namespace libMesh + +diff --git a/src/numerics/laspack_vector.C b/src/numerics/laspack_vector.C +index 04499b9..687d847 100644 +--- a/src/numerics/laspack_vector.C ++++ b/src/numerics/laspack_vector.C +@@ -477,7 +477,7 @@ Real LaspackVector::min () const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class LaspackVector; ++template class LIBMESH_EXPORT LaspackVector; + + } // namespace libMesh + +diff --git a/src/numerics/numeric_vector.C b/src/numerics/numeric_vector.C +index af7a918..83eeb3a 100644 +--- a/src/numerics/numeric_vector.C ++++ b/src/numerics/numeric_vector.C +@@ -392,6 +392,6 @@ void NumericVector::add_vector (const NumericVector & v, + + //------------------------------------------------------------------ + // Explicit instantiations +-template class NumericVector; ++template class LIBMESH_EXPORT NumericVector; + + } // namespace libMesh +diff --git a/src/numerics/petsc_matrix.C b/src/numerics/petsc_matrix.C +index f891cef..6bc5cdc 100644 +--- a/src/numerics/petsc_matrix.C ++++ b/src/numerics/petsc_matrix.C +@@ -1293,7 +1293,7 @@ void PetscMatrix::swap(PetscMatrix & m_in) + + //------------------------------------------------------------------ + // Explicit instantiations +-template class PetscMatrix; ++template class LIBMESH_EXPORT PetscMatrix; + + } // namespace libMesh + +diff --git a/src/numerics/petsc_preconditioner.C b/src/numerics/petsc_preconditioner.C +index 3d23cba..15fcae2 100644 +--- a/src/numerics/petsc_preconditioner.C ++++ b/src/numerics/petsc_preconditioner.C +@@ -310,7 +310,7 @@ void PetscPreconditioner::set_petsc_subpreconditioner_type(PCTYPE_CV_QUALIFIE + + //------------------------------------------------------------------ + // Explicit instantiations +-template class PetscPreconditioner; ++template class LIBMESH_EXPORT PetscPreconditioner; + + } // namespace libMesh + +diff --git a/src/numerics/petsc_vector.C b/src/numerics/petsc_vector.C +index 0e5797a..736104b 100644 +--- a/src/numerics/petsc_vector.C ++++ b/src/numerics/petsc_vector.C +@@ -1542,7 +1542,7 @@ void PetscVector::_restore_array() const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class PetscVector; ++template class LIBMESH_EXPORT PetscVector; + + } // namespace libMesh + +diff --git a/src/numerics/preconditioner.C b/src/numerics/preconditioner.C +index 28bcf1c..b57027a 100644 +--- a/src/numerics/preconditioner.C ++++ b/src/numerics/preconditioner.C +@@ -100,6 +100,6 @@ Preconditioner::build(const libMesh::Parallel::Communicator & comm, + + //------------------------------------------------------------------ + // Explicit instantiations +-template class Preconditioner; ++template class LIBMESH_EXPORT Preconditioner; + + } // namespace libMesh +diff --git a/src/numerics/sparse_matrix.C b/src/numerics/sparse_matrix.C +index ce8db30..806d7f6 100644 +--- a/src/numerics/sparse_matrix.C ++++ b/src/numerics/sparse_matrix.C +@@ -324,6 +324,6 @@ void SparseMatrix::print(std::ostream & os, const bool sparse) const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class SparseMatrix; ++template class LIBMESH_EXPORT SparseMatrix; + + } // namespace libMesh +diff --git a/src/numerics/sparse_shell_matrix.C b/src/numerics/sparse_shell_matrix.C +index af4a1d4..e40aaf3 100644 +--- a/src/numerics/sparse_shell_matrix.C ++++ b/src/numerics/sparse_shell_matrix.C +@@ -43,6 +43,6 @@ void SparseShellMatrix::vector_mult_add (NumericVector & dest, + + //------------------------------------------------------------------ + // Explicit instantiations +-template class SparseShellMatrix; ++template class LIBMESH_EXPORT SparseShellMatrix; + + } // namespace libMesh +diff --git a/src/numerics/sum_shell_matrix.C b/src/numerics/sum_shell_matrix.C +index 35dfbd5..9a2dd61 100644 +--- a/src/numerics/sum_shell_matrix.C ++++ b/src/numerics/sum_shell_matrix.C +@@ -88,6 +88,6 @@ void SumShellMatrix::get_diagonal (NumericVector & dest) const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class SumShellMatrix; ++template class LIBMESH_EXPORT SumShellMatrix; + + } // namespace libMesh +diff --git a/src/numerics/tensor_shell_matrix.C b/src/numerics/tensor_shell_matrix.C +index 19a100c..a52240b 100644 +--- a/src/numerics/tensor_shell_matrix.C ++++ b/src/numerics/tensor_shell_matrix.C +@@ -52,6 +52,6 @@ void TensorShellMatrix::get_diagonal (NumericVector & dest) const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class TensorShellMatrix; ++template class LIBMESH_EXPORT TensorShellMatrix; + + } // namespace libMesh +diff --git a/src/numerics/trilinos_epetra_matrix.C b/src/numerics/trilinos_epetra_matrix.C +index 83815a1..a36b432 100644 +--- a/src/numerics/trilinos_epetra_matrix.C ++++ b/src/numerics/trilinos_epetra_matrix.C +@@ -518,7 +518,7 @@ void EpetraMatrix::print_personal(std::ostream & os) const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class EpetraMatrix; ++template class LIBMESH_EXPORT EpetraMatrix; + + } // namespace libMesh + +diff --git a/src/numerics/trilinos_epetra_vector.C b/src/numerics/trilinos_epetra_vector.C +index 6e4d362..a9a7f11 100644 +--- a/src/numerics/trilinos_epetra_vector.C ++++ b/src/numerics/trilinos_epetra_vector.C +@@ -926,7 +926,7 @@ void EpetraVector::destroyNonlocalData() + + //------------------------------------------------------------------ + // Explicit instantiations +-template class EpetraVector; ++template class LIBMESH_EXPORT EpetraVector; + + } // namespace libMesh + +diff --git a/src/numerics/trilinos_preconditioner.C b/src/numerics/trilinos_preconditioner.C +index 5e1eabd..035a479 100644 +--- a/src/numerics/trilinos_preconditioner.C ++++ b/src/numerics/trilinos_preconditioner.C +@@ -258,7 +258,7 @@ TrilinosPreconditioner::OperatorRangeMap() const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class TrilinosPreconditioner; ++template class LIBMESH_EXPORT TrilinosPreconditioner; + + } // namespace libMesh + +diff --git a/src/numerics/type_tensor.C b/src/numerics/type_tensor.C +index c571439..622644b 100644 +--- a/src/numerics/type_tensor.C ++++ b/src/numerics/type_tensor.C +@@ -188,10 +188,10 @@ bool TypeTensor::operator > (const TypeTensor & rhs) const + + // ------------------------------------------------------------ + // Explicit instantiations +-template class TypeTensor; ++template class LIBMESH_EXPORT TypeTensor; + + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class TypeTensor; ++template class LIBMESH_EXPORT TypeTensor; + #endif + + } // namespace libMesh +diff --git a/src/numerics/type_vector.C b/src/numerics/type_vector.C +index d6c636f..2483730 100644 +--- a/src/numerics/type_vector.C ++++ b/src/numerics/type_vector.C +@@ -216,10 +216,10 @@ bool TypeVector::operator >= (const TypeVector & rhs) const + + // ------------------------------------------------------------ + // Explicit instantiations +-template class TypeVector; ++template class LIBMESH_EXPORT TypeVector; + + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template class TypeVector; ++template class LIBMESH_EXPORT TypeVector; + #endif + + } // namespace libMesh +diff --git a/src/parallel/parallel_bin_sorter.C b/src/parallel/parallel_bin_sorter.C +index 143d2be..9e296d9 100644 +--- a/src/parallel/parallel_bin_sorter.C ++++ b/src/parallel/parallel_bin_sorter.C +@@ -141,10 +141,10 @@ void BinSorter::binsort (const IdxType nbins, + + + // Explicitly instantiate for int, double +-template class Parallel::BinSorter; +-template class Parallel::BinSorter; ++template class LIBMESH_EXPORT Parallel::BinSorter; ++template class LIBMESH_EXPORT Parallel::BinSorter; + #ifdef LIBMESH_HAVE_LIBHILBERT +-template class Parallel::BinSorter; ++template class LIBMESH_EXPORT Parallel::BinSorter; + #endif + + } // namespace libMesh +diff --git a/src/parallel/parallel_histogram.C b/src/parallel/parallel_histogram.C +index d27299e..4456f8f 100644 +--- a/src/parallel/parallel_histogram.C ++++ b/src/parallel/parallel_histogram.C +@@ -107,10 +107,10 @@ void Histogram::build_histogram () + + + // Explicitly instantiate for int, double +-template class Parallel::Histogram; +-template class Parallel::Histogram; ++template class LIBMESH_EXPORT Parallel::Histogram; ++template class LIBMESH_EXPORT Parallel::Histogram; + #ifdef LIBMESH_HAVE_LIBHILBERT +-template class Parallel::Histogram; ++template class LIBMESH_EXPORT Parallel::Histogram; + #endif + + } // namespace libMesh +diff --git a/src/parallel/parallel_sort.C b/src/parallel/parallel_sort.C +index 1a57003..1e262ae 100644 +--- a/src/parallel/parallel_sort.C ++++ b/src/parallel/parallel_sort.C +@@ -272,10 +272,10 @@ const std::vector & Sort::bin() + + + // Explicitly instantiate for int, double +-template class Parallel::Sort; +-template class Parallel::Sort; ++template class LIBMESH_EXPORT Parallel::Sort; ++template class LIBMESH_EXPORT Parallel::Sort; + #if defined(LIBMESH_HAVE_LIBHILBERT) && defined(LIBMESH_HAVE_MPI) +-template class Parallel::Sort; ++template class LIBMESH_EXPORT Parallel::Sort; + #endif + + } // namespace libMesh +diff --git a/src/quadrature/quadrature_composite.C b/src/quadrature/quadrature_composite.C +index e155bff..9290ee0 100644 +--- a/src/quadrature/quadrature_composite.C ++++ b/src/quadrature/quadrature_composite.C +@@ -156,9 +156,9 @@ void QComposite::add_subelem_values (const std::vector & + + //-------------------------------------------------------------- + // Explicit instantiations +-template class QComposite; +-template class QComposite; +-template class QComposite; ++template class LIBMESH_EXPORT QComposite; ++template class LIBMESH_EXPORT QComposite; ++template class LIBMESH_EXPORT QComposite; + + } // namespace libMesh + +diff --git a/src/reduced_basis/rb_construction_base.C b/src/reduced_basis/rb_construction_base.C +index a484724..1ccd8e0 100644 +--- a/src/reduced_basis/rb_construction_base.C ++++ b/src/reduced_basis/rb_construction_base.C +@@ -636,9 +636,9 @@ void RBConstructionBase::set_training_random_seed(unsigned int seed) + + // EigenSystem is only defined if we have SLEPc + #if defined(LIBMESH_HAVE_SLEPC) +-template class RBConstructionBase; ++template class LIBMESH_EXPORT RBConstructionBase; + #endif + +-template class RBConstructionBase; ++template class LIBMESH_EXPORT RBConstructionBase; + + } // namespace libMesh +diff --git a/src/solution_transfer/meshfree_interpolation.C b/src/solution_transfer/meshfree_interpolation.C +index e5bed0b..17ca23b 100644 +--- a/src/solution_transfer/meshfree_interpolation.C ++++ b/src/solution_transfer/meshfree_interpolation.C +@@ -325,8 +325,8 @@ void InverseDistanceInterpolation::interpolate (const Point + + // ------------------------------------------------------------ + // Explicit Instantiations +-template class InverseDistanceInterpolation<1>; +-template class InverseDistanceInterpolation<2>; +-template class InverseDistanceInterpolation<3>; ++template class LIBMESH_EXPORT InverseDistanceInterpolation<1>; ++template class LIBMESH_EXPORT InverseDistanceInterpolation<2>; ++template class LIBMESH_EXPORT InverseDistanceInterpolation<3>; + + } // namespace libMesh +diff --git a/src/solution_transfer/radial_basis_interpolation.C b/src/solution_transfer/radial_basis_interpolation.C +index 7c7942d..c181edb 100644 +--- a/src/solution_transfer/radial_basis_interpolation.C ++++ b/src/solution_transfer/radial_basis_interpolation.C +@@ -204,9 +204,9 @@ void RadialBasisInterpolation::interpolate_field_data (const std::vec + + // ------------------------------------------------------------ + // Explicit Instantiations +-template class RadialBasisInterpolation<3, WendlandRBF<3,0>>; +-template class RadialBasisInterpolation<3, WendlandRBF<3,2>>; +-template class RadialBasisInterpolation<3, WendlandRBF<3,4>>; +-template class RadialBasisInterpolation<3, WendlandRBF<3,8>>; ++template class LIBMESH_EXPORT RadialBasisInterpolation<3, WendlandRBF<3,0>>; ++template class LIBMESH_EXPORT RadialBasisInterpolation<3, WendlandRBF<3,2>>; ++template class LIBMESH_EXPORT RadialBasisInterpolation<3, WendlandRBF<3,4>>; ++template class LIBMESH_EXPORT RadialBasisInterpolation<3, WendlandRBF<3,8>>; + + } // namespace libMesh +diff --git a/src/solvers/eigen_solver.C b/src/solvers/eigen_solver.C +index fc61398..f96eb95 100644 +--- a/src/solvers/eigen_solver.C ++++ b/src/solvers/eigen_solver.C +@@ -104,7 +104,7 @@ void EigenSolver::set_position_of_spectrum (Real pos, PositionOfSpectrum targ + + //------------------------------------------------------------------ + // Explicit instantiations +-template class EigenSolver; ++template class LIBMESH_EXPORT EigenSolver; + + } // namespace libMesh + +diff --git a/src/solvers/eigen_sparse_linear_solver.C b/src/solvers/eigen_sparse_linear_solver.C +index de0e339..6f64483 100644 +--- a/src/solvers/eigen_sparse_linear_solver.C ++++ b/src/solvers/eigen_sparse_linear_solver.C +@@ -337,7 +337,7 @@ LinearConvergenceReason EigenSparseLinearSolver::get_converged_reason() const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class EigenSparseLinearSolver; ++template class LIBMESH_EXPORT EigenSparseLinearSolver; + + } // namespace libMesh + +diff --git a/src/solvers/laspack_linear_solver.C b/src/solvers/laspack_linear_solver.C +index 6dcb464..162e020 100644 +--- a/src/solvers/laspack_linear_solver.C ++++ b/src/solvers/laspack_linear_solver.C +@@ -543,7 +543,7 @@ LinearConvergenceReason LaspackLinearSolver::get_converged_reason() const + + //------------------------------------------------------------------ + // Explicit instantiations +-template class LaspackLinearSolver; ++template class LIBMESH_EXPORT LaspackLinearSolver; + + } // namespace libMesh + +diff --git a/src/solvers/linear_solver.C b/src/solvers/linear_solver.C +index 5692e47..ac180e6 100644 +--- a/src/solvers/linear_solver.C ++++ b/src/solvers/linear_solver.C +@@ -181,7 +181,7 @@ void LinearSolver::set_solver_configuration(SolverConfiguration & solver_conf + + //------------------------------------------------------------------ + // Explicit instantiations +-template class LinearSolver; ++template class LIBMESH_EXPORT LinearSolver; + + + +diff --git a/src/solvers/nlopt_optimization_solver.C b/src/solvers/nlopt_optimization_solver.C +index f85d273..d9d6b15 100644 +--- a/src/solvers/nlopt_optimization_solver.C ++++ b/src/solvers/nlopt_optimization_solver.C +@@ -458,7 +458,7 @@ int NloptOptimizationSolver::get_converged_reason() + + //------------------------------------------------------------------ + // Explicit instantiations +-template class NloptOptimizationSolver; ++template class LIBMESH_EXPORT NloptOptimizationSolver; + + } // namespace libMesh + +diff --git a/src/solvers/nonlinear_solver.C b/src/solvers/nonlinear_solver.C +index ac28996..036d818 100644 +--- a/src/solvers/nonlinear_solver.C ++++ b/src/solvers/nonlinear_solver.C +@@ -85,6 +85,6 @@ void NonlinearSolver::set_solver_configuration(SolverConfiguration & solver_c + + //------------------------------------------------------------------ + // Explicit instantiations +-template class NonlinearSolver; ++template class LIBMESH_EXPORT NonlinearSolver; + + } // namespace libMesh +diff --git a/src/solvers/optimization_solver.C b/src/solvers/optimization_solver.C +index d94ea62..21faa72 100644 +--- a/src/solvers/optimization_solver.C ++++ b/src/solvers/optimization_solver.C +@@ -86,6 +86,6 @@ OptimizationSolver::build(sys_type & s, const SolverPackage solver_package) + + //------------------------------------------------------------------ + // Explicit instantiations +-template class OptimizationSolver; ++template class LIBMESH_EXPORT OptimizationSolver; + + } // namespace libMesh +diff --git a/src/solvers/petsc_linear_solver.C b/src/solvers/petsc_linear_solver.C +index 574d9fc..6e821ce 100644 +--- a/src/solvers/petsc_linear_solver.C ++++ b/src/solvers/petsc_linear_solver.C +@@ -1808,7 +1808,7 @@ PetscErrorCode PetscLinearSolver::_petsc_shell_matrix_get_diagonal(Mat mat, V + + //------------------------------------------------------------------ + // Explicit instantiations +-template class PetscLinearSolver; ++template class LIBMESH_EXPORT PetscLinearSolver; + + } // namespace libMesh + +diff --git a/src/solvers/petsc_nonlinear_solver.C b/src/solvers/petsc_nonlinear_solver.C +index e944a69..ac1cfbf 100644 +--- a/src/solvers/petsc_nonlinear_solver.C ++++ b/src/solvers/petsc_nonlinear_solver.C +@@ -994,7 +994,7 @@ int PetscNonlinearSolver::get_total_linear_iterations() + + //------------------------------------------------------------------ + // Explicit instantiations +-template class PetscNonlinearSolver; ++template class LIBMESH_EXPORT PetscNonlinearSolver; + + } // namespace libMesh + +diff --git a/src/solvers/slepc_eigen_solver.C b/src/solvers/slepc_eigen_solver.C +index 97d4d57..8f30eb7 100644 +--- a/src/solvers/slepc_eigen_solver.C ++++ b/src/solvers/slepc_eigen_solver.C +@@ -923,7 +923,7 @@ PetscErrorCode SlepcEigenSolver::_petsc_shell_matrix_get_diagonal(Mat mat, Ve + + //------------------------------------------------------------------ + // Explicit instantiations +-template class SlepcEigenSolver; ++template class LIBMESH_EXPORT SlepcEigenSolver; + + } // namespace libMesh + +diff --git a/src/solvers/tao_optimization_solver.C b/src/solvers/tao_optimization_solver.C +index 627cb4c..1af76ed 100644 +--- a/src/solvers/tao_optimization_solver.C ++++ b/src/solvers/tao_optimization_solver.C +@@ -654,7 +654,7 @@ int TaoOptimizationSolver::get_converged_reason() + + //------------------------------------------------------------------ + // Explicit instantiations +-template class TaoOptimizationSolver; ++template class LIBMESH_EXPORT TaoOptimizationSolver; + + } // namespace libMesh + +diff --git a/src/solvers/trilinos_aztec_linear_solver.C b/src/solvers/trilinos_aztec_linear_solver.C +index 9c79c7d..3cd3279 100644 +--- a/src/solvers/trilinos_aztec_linear_solver.C ++++ b/src/solvers/trilinos_aztec_linear_solver.C +@@ -276,7 +276,7 @@ void AztecLinearSolver::set_solver_type() + + //------------------------------------------------------------------ + // Explicit instantiations +-template class AztecLinearSolver; ++template class LIBMESH_EXPORT AztecLinearSolver; + + } // namespace libMesh + +diff --git a/src/solvers/trilinos_nox_nonlinear_solver.C b/src/solvers/trilinos_nox_nonlinear_solver.C +index abb7cdb..19b1c5b 100644 +--- a/src/solvers/trilinos_nox_nonlinear_solver.C ++++ b/src/solvers/trilinos_nox_nonlinear_solver.C +@@ -436,7 +436,7 @@ NoxNonlinearSolver::get_total_linear_iterations() + + //------------------------------------------------------------------ + // Explicit instantiations +-template class NoxNonlinearSolver; ++template class LIBMESH_EXPORT NoxNonlinearSolver; + + } // namespace libMesh + +diff --git a/src/systems/equation_systems_io.C b/src/systems/equation_systems_io.C +index 4e9b937..513195c 100644 +--- a/src/systems/equation_systems_io.C ++++ b/src/systems/equation_systems_io.C +@@ -581,13 +581,13 @@ void EquationSystems::write(const std::string & name, + + // template specialization + +-template void EquationSystems::read (const std::string & name, const unsigned int read_flags, bool partition_agnostic); +-template void EquationSystems::read (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); +-template void EquationSystems::_read_impl (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); ++template LIBMESH_EXPORT void EquationSystems::read (const std::string & name, const unsigned int read_flags, bool partition_agnostic); ++template LIBMESH_EXPORT void EquationSystems::read (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); ++template LIBMESH_EXPORT void EquationSystems::_read_impl (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template void EquationSystems::read (const std::string & name, const unsigned int read_flags, bool partition_agnostic); +-template void EquationSystems::read (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); +-template void EquationSystems::_read_impl (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); ++template LIBMESH_EXPORT void EquationSystems::read (const std::string & name, const unsigned int read_flags, bool partition_agnostic); ++template LIBMESH_EXPORT void EquationSystems::read (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); ++template LIBMESH_EXPORT void EquationSystems::_read_impl (const std::string & name, const XdrMODE mode, const unsigned int read_flags, bool partition_agnostic); + #endif + + } // namespace libMesh +diff --git a/src/systems/fem_context.C b/src/systems/fem_context.C +index f5aeef6..21763af 100644 +--- a/src/systems/fem_context.C ++++ b/src/systems/fem_context.C +@@ -1925,131 +1925,131 @@ FEMContext::build_new_fe( const FEGenericBase* fe, + + + // Instantiate member function templates +-template void FEMContext::interior_value(unsigned int, unsigned int, Number &) const; +-template void FEMContext::interior_values(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::interior_value(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::interior_values(unsigned int, const NumericVector &, + std::vector &) const; +-template void FEMContext::interior_value(unsigned int, unsigned int, Gradient &) const; +-template void FEMContext::interior_values(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::interior_value(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::interior_values(unsigned int, const NumericVector &, + std::vector &) const; + +-template void FEMContext::interior_gradient(unsigned int, unsigned int, Gradient &) const; +-template void FEMContext::interior_gradients(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::interior_gradient(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::interior_gradients(unsigned int, const NumericVector &, + std::vector &) const; +-template void FEMContext::interior_gradient(unsigned int, unsigned int, Tensor &) const; +-template void FEMContext::interior_gradients(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::interior_gradient(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::interior_gradients(unsigned int, const NumericVector &, + std::vector &) const; + + #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES +-template void FEMContext::interior_hessian(unsigned int, unsigned int, Tensor &) const; +-template void FEMContext::interior_hessians(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::interior_hessian(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::interior_hessians(unsigned int, const NumericVector &, + std::vector &) const; + //FIXME: Not everything is implemented yet for second derivatives of RealGradients +-//template void FEMContext::interior_hessian(unsigned int, unsigned int, ??&) const; +-//template void FEMContext::interior_hessians(unsigned int, const NumericVector &, ++//template LIBMESH_EXPORT void FEMContext::interior_hessian(unsigned int, unsigned int, ??&) const; ++//template LIBMESH_EXPORT void FEMContext::interior_hessians(unsigned int, const NumericVector &, + // std::vector &) const; + #endif + +-template void FEMContext::interior_curl(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::interior_curl(unsigned int, unsigned int, Gradient &) const; + +-template void FEMContext::interior_div(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::interior_div(unsigned int, unsigned int, Number &) const; + +-template void FEMContext::side_value(unsigned int, unsigned int, Number &) const; +-template void FEMContext::side_value(unsigned int, unsigned int, Gradient &) const; +-template void FEMContext::side_values(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::side_value(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::side_value(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::side_values(unsigned int, const NumericVector &, + std::vector &) const; +-template void FEMContext::side_values(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::side_values(unsigned int, const NumericVector &, + std::vector &) const; + +-template void FEMContext::side_gradient(unsigned int, unsigned int, Gradient &) const; +-template void FEMContext::side_gradients(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::side_gradient(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::side_gradients(unsigned int, const NumericVector &, + std::vector &) const; +-template void FEMContext::side_gradient(unsigned int, unsigned int, Tensor &) const; +-template void FEMContext::side_gradients(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::side_gradient(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::side_gradients(unsigned int, const NumericVector &, + std::vector &) const; + + + #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES +-template void FEMContext::side_hessian(unsigned int, unsigned int, Tensor &) const; +-template void FEMContext::side_hessians(unsigned int, const NumericVector &, ++template LIBMESH_EXPORT void FEMContext::side_hessian(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::side_hessians(unsigned int, const NumericVector &, + std::vector &) const; + //FIXME: Not everything is implemented yet for second derivatives of RealGradients +-//template void FEMContext::side_hessian(unsigned int, unsigned int, ++//template LIBMESH_EXPORT void FEMContext::side_hessian(unsigned int, unsigned int, + // ??&) const; +-//template void FEMContext::side_hessians(unsigned int, const NumericVector &, ++//template LIBMESH_EXPORT void FEMContext::side_hessians(unsigned int, const NumericVector &, + // std::vector &) const; + #endif + +-template void FEMContext::point_value(unsigned int, const Point &, Number &, const Real) const; +-template void FEMContext::point_value(unsigned int, const Point &, Gradient &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::point_value(unsigned int, const Point &, Number &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::point_value(unsigned int, const Point &, Gradient &, const Real) const; + +-template void FEMContext::point_gradient(unsigned int, const Point &, Gradient &, const Real) const; +-template void FEMContext::point_gradient(unsigned int, const Point &, Tensor &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::point_gradient(unsigned int, const Point &, Gradient &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::point_gradient(unsigned int, const Point &, Tensor &, const Real) const; + + #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES +-template void FEMContext::point_hessian(unsigned int, const Point &, Tensor &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::point_hessian(unsigned int, const Point &, Tensor &, const Real) const; + //FIXME: Not everything is implemented yet for second derivatives of RealGradients +-//template void FEMContext::point_hessian(unsigned int, const Point &, ??&) const; ++//template LIBMESH_EXPORT void FEMContext::point_hessian(unsigned int, const Point &, ??&) const; + #endif + +-template void FEMContext::point_curl(unsigned int, const Point &, Gradient &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::point_curl(unsigned int, const Point &, Gradient &, const Real) const; + +-template void FEMContext::fixed_interior_value(unsigned int, unsigned int, Number &) const; +-template void FEMContext::fixed_interior_value(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_interior_value(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_interior_value(unsigned int, unsigned int, Gradient &) const; + +-template void FEMContext::fixed_interior_gradient(unsigned int, unsigned int, Gradient &) const; +-template void FEMContext::fixed_interior_gradient(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_interior_gradient(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_interior_gradient(unsigned int, unsigned int, Tensor &) const; + + #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES +-template void FEMContext::fixed_interior_hessian(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_interior_hessian(unsigned int, unsigned int, Tensor &) const; + //FIXME: Not everything is implemented yet for second derivatives of RealGradients +-//template void FEMContext::fixed_interior_hessian(unsigned int, unsigned int, ??&) const; ++//template LIBMESH_EXPORT void FEMContext::fixed_interior_hessian(unsigned int, unsigned int, ??&) const; + #endif + +-template void FEMContext::fixed_side_value(unsigned int, unsigned int, Number &) const; +-template void FEMContext::fixed_side_value(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_side_value(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_side_value(unsigned int, unsigned int, Gradient &) const; + +-template void FEMContext::fixed_side_gradient(unsigned int, unsigned int, Gradient &) const; +-template void FEMContext::fixed_side_gradient(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_side_gradient(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_side_gradient(unsigned int, unsigned int, Tensor &) const; + + #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES +-template void FEMContext::fixed_side_hessian(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::fixed_side_hessian(unsigned int, unsigned int, Tensor &) const; + //FIXME: Not everything is implemented yet for second derivatives of RealGradients +-//template void FEMContext::fixed_side_hessian(unsigned int, unsigned int, ??&) const; ++//template LIBMESH_EXPORT void FEMContext::fixed_side_hessian(unsigned int, unsigned int, ??&) const; + #endif + +-template void FEMContext::fixed_point_value(unsigned int, const Point &, Number &, const Real) const; +-template void FEMContext::fixed_point_value(unsigned int, const Point &, Gradient &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::fixed_point_value(unsigned int, const Point &, Number &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::fixed_point_value(unsigned int, const Point &, Gradient &, const Real) const; + +-template void FEMContext::fixed_point_gradient(unsigned int, const Point &, Gradient &, const Real) const; +-template void FEMContext::fixed_point_gradient(unsigned int, const Point &, Tensor &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::fixed_point_gradient(unsigned int, const Point &, Gradient &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::fixed_point_gradient(unsigned int, const Point &, Tensor &, const Real) const; + + #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES +-template void FEMContext::fixed_point_hessian(unsigned int, const Point &, Tensor &, const Real) const; ++template LIBMESH_EXPORT void FEMContext::fixed_point_hessian(unsigned int, const Point &, Tensor &, const Real) const; + //FIXME: Not everything is implemented yet for second derivatives of RealGradients +-//template void FEMContext::fixed_point_hessian(unsigned int, const Point &, ??&) const; ++//template LIBMESH_EXPORT void FEMContext::fixed_point_hessian(unsigned int, const Point &, ??&) const; + #endif + +-template void FEMContext::interior_rate(unsigned int, unsigned int, Number &) const; +-template void FEMContext::interior_rate(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::interior_rate(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::interior_rate(unsigned int, unsigned int, Gradient &) const; + +-template void FEMContext::interior_rate_gradient(unsigned int, unsigned int, Gradient &) const; +-template void FEMContext::interior_rate_gradient(unsigned int, unsigned int, Tensor &) const; ++template LIBMESH_EXPORT void FEMContext::interior_rate_gradient(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::interior_rate_gradient(unsigned int, unsigned int, Tensor &) const; + +-template void FEMContext::side_rate(unsigned int, unsigned int, Number &) const; +-template void FEMContext::side_rate(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::side_rate(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::side_rate(unsigned int, unsigned int, Gradient &) const; + +-template void FEMContext::interior_accel(unsigned int, unsigned int, Number &) const; +-template void FEMContext::interior_accel(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::interior_accel(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::interior_accel(unsigned int, unsigned int, Gradient &) const; + +-template void FEMContext::side_accel(unsigned int, unsigned int, Number &) const; +-template void FEMContext::side_accel(unsigned int, unsigned int, Gradient &) const; ++template LIBMESH_EXPORT void FEMContext::side_accel(unsigned int, unsigned int, Number &) const; ++template LIBMESH_EXPORT void FEMContext::side_accel(unsigned int, unsigned int, Gradient &) const; + +-template FEGenericBase * ++template LIBMESH_EXPORT FEGenericBase * + FEMContext::build_new_fe(const FEGenericBase*, + const Point &, + const Real) const; + +-template FEGenericBase * ++template LIBMESH_EXPORT FEGenericBase * + FEMContext::build_new_fe(const FEGenericBase*, + const Point &, + const Real) const; +diff --git a/src/systems/system_io.C b/src/systems/system_io.C +index a0ff2c2..e9de029 100644 +--- a/src/systems/system_io.C ++++ b/src/systems/system_io.C +@@ -2356,15 +2356,15 @@ std::size_t System::write_serialized_vectors (Xdr & io, + + + +-template void System::read_parallel_data (Xdr & io, const bool read_additional_data); +-template void System::read_serialized_data (Xdr & io, const bool read_additional_data); +-template numeric_index_type System::read_serialized_vector (Xdr & io, NumericVector * vec); +-template std::size_t System::read_serialized_vectors (Xdr & io, const std::vector *> & vectors) const; ++template LIBMESH_EXPORT void System::read_parallel_data (Xdr & io, const bool read_additional_data); ++template LIBMESH_EXPORT void System::read_serialized_data (Xdr & io, const bool read_additional_data); ++template LIBMESH_EXPORT numeric_index_type System::read_serialized_vector (Xdr & io, NumericVector * vec); ++template LIBMESH_EXPORT std::size_t System::read_serialized_vectors (Xdr & io, const std::vector *> & vectors) const; + #ifdef LIBMESH_USE_COMPLEX_NUMBERS +-template void System::read_parallel_data (Xdr & io, const bool read_additional_data); +-template void System::read_serialized_data (Xdr & io, const bool read_additional_data); +-template numeric_index_type System::read_serialized_vector (Xdr & io, NumericVector * vec); +-template std::size_t System::read_serialized_vectors (Xdr & io, const std::vector *> & vectors) const; ++template LIBMESH_EXPORT void System::read_parallel_data (Xdr & io, const bool read_additional_data); ++template LIBMESH_EXPORT void System::read_serialized_data (Xdr & io, const bool read_additional_data); ++template LIBMESH_EXPORT numeric_index_type System::read_serialized_vector (Xdr & io, NumericVector * vec); ++template LIBMESH_EXPORT std::size_t System::read_serialized_vectors (Xdr & io, const std::vector *> & vectors) const; + #endif + + } // namespace libMesh +diff --git a/src/systems/system_projection.C b/src/systems/system_projection.C +index a6ed127..45c40d7 100644 +--- a/src/systems/system_projection.C ++++ b/src/systems/system_projection.C +@@ -135,10 +135,10 @@ void convert_from_receive (SendT & received, + namespace libMesh { + typedef DynamicSparseNumberArray DSNAN; + +-template void ++template LIBMESH_EXPORT void + DenseMatrix::cholesky_solve(const DenseVector &, + DenseVector &); +-template void ++template LIBMESH_EXPORT void + DenseMatrix::_cholesky_back_substitute(const DenseVector &, + DenseVector &) const; + } +diff --git a/src/systems/transient_system.C b/src/systems/transient_system.C +index b7c581d..4a40d12 100644 +--- a/src/systems/transient_system.C ++++ b/src/systems/transient_system.C +@@ -164,13 +164,13 @@ void TransientSystem::add_old_vectors() + + // ------------------------------------------------------------ + // TransientSystem instantiations +-template class TransientSystem; +-template class TransientSystem; +-template class TransientSystem; +-template class TransientSystem; +-template class TransientSystem; ++template class LIBMESH_EXPORT TransientSystem; ++template class LIBMESH_EXPORT TransientSystem; ++template class LIBMESH_EXPORT TransientSystem; ++template class LIBMESH_EXPORT TransientSystem; ++template class LIBMESH_EXPORT TransientSystem; + #ifdef LIBMESH_HAVE_SLEPC +-template class TransientSystem; ++template class LIBMESH_EXPORT TransientSystem; + #endif + + } // namespace libMesh +diff --git a/src/utils/location_maps.C b/src/utils/location_maps.C +index 51a3091..3f04b22 100644 +--- a/src/utils/location_maps.C ++++ b/src/utils/location_maps.C +@@ -199,7 +199,7 @@ void LocationMap::fill(MeshBase & mesh) + + + +-template class LocationMap; +-template class LocationMap; ++template class LIBMESH_EXPORT LocationMap; ++template class LIBMESH_EXPORT LocationMap; + + } // namespace libMesh +diff --git a/src/utils/statistics.C b/src/utils/statistics.C +index 3186395..ee69e03 100644 +--- a/src/utils/statistics.C ++++ b/src/utils/statistics.C +@@ -367,15 +367,15 @@ std::vector StatisticsVector::cut_above(Real cut) const + + //------------------------------------------------------------ + // Explicit Instantiations +-template class StatisticsVector; +-template class StatisticsVector; ++template class LIBMESH_EXPORT StatisticsVector; ++template class LIBMESH_EXPORT StatisticsVector; + #ifdef LIBMESH_DEFAULT_TRIPLE_PRECISION +-template class StatisticsVector; ++template class LIBMESH_EXPORT StatisticsVector; + #endif + #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION +-template class StatisticsVector; ++template class LIBMESH_EXPORT StatisticsVector; + #endif +-template class StatisticsVector; +-template class StatisticsVector; ++template class LIBMESH_EXPORT StatisticsVector; ++template class LIBMESH_EXPORT StatisticsVector; + + } // namespace libMesh +diff --git a/src/utils/tree.C b/src/utils/tree.C +index 53e0ca6..15b4f30 100644 +--- a/src/utils/tree.C ++++ b/src/utils/tree.C +@@ -157,8 +157,8 @@ Tree::operator() (const Point & p, + + // ------------------------------------------------------------ + // Explicit Instantiations +-template class Tree<2>; +-template class Tree<4>; +-template class Tree<8>; ++template class LIBMESH_EXPORT Tree<2>; ++template class LIBMESH_EXPORT Tree<4>; ++template class LIBMESH_EXPORT Tree<8>; + + } // namespace libMesh +diff --git a/src/utils/tree_node.C b/src/utils/tree_node.C +index 2a3e034..e78ccef 100644 +--- a/src/utils/tree_node.C ++++ b/src/utils/tree_node.C +@@ -604,8 +604,8 @@ const Elem * TreeNode::find_element_in_children (const Point & p, + + // ------------------------------------------------------------ + // Explicit Instantiations +-template class TreeNode<2>; +-template class TreeNode<4>; +-template class TreeNode<8>; ++template class LIBMESH_EXPORT TreeNode<2>; ++template class LIBMESH_EXPORT TreeNode<4>; ++template class LIBMESH_EXPORT TreeNode<8>; + + } // namespace libMesh +diff --git a/src/utils/xdr_cxx.C b/src/utils/xdr_cxx.C +index 2f7bd1f..7817f46 100644 +--- a/src/utils/xdr_cxx.C ++++ b/src/utils/xdr_cxx.C +@@ -1700,56 +1700,56 @@ void Xdr::comment (std::string & comment_in) + + + // +-template void Xdr::data (int &, const char *); +-template void Xdr::data (unsigned int &, const char *); +-template void Xdr::data (unsigned short int &, const char *); +-template void Xdr::data (short int &, const char *); +-template void Xdr::data (unsigned long int &, const char *); +-template void Xdr::data (unsigned long long &, const char *); +-template void Xdr::data (long int &, const char *); +-template void Xdr::data (long long &, const char *); +-template void Xdr::data (char &, const char *); +-template void Xdr::data (signed char &, const char *); +-template void Xdr::data (unsigned char &, const char *); +-template void Xdr::data (float &, const char *); +-template void Xdr::data (double &, const char *); +-template void Xdr::data (long double &, const char *); +-template void Xdr::data> (std::complex &, const char *); +-template void Xdr::data> (std::complex &, const char *); +-template void Xdr::data> (std::complex &, const char *); +-template void Xdr::data (std::string &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data>> (std::vector> &, const char *); +-template void Xdr::data>> (std::vector> &, const char *); +-template void Xdr::data>> (std::vector> &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data_stream (unsigned char * val, const unsigned int len, const unsigned int line_break); +-template void Xdr::data_stream (short int * val, const unsigned int len, const unsigned int line_break); +-template void Xdr::data_stream (int * val, const unsigned int len, const unsigned int line_break); +-template void Xdr::data_stream (long long * val, const unsigned int len, const unsigned int line_break); +-template void Xdr::data_stream (unsigned short int * val, const unsigned int len, const unsigned int line_break); +-template void Xdr::data_stream (unsigned int * val, const unsigned int len, const unsigned int line_break); +-template void Xdr::data_stream (unsigned long int * val, const unsigned int len, const unsigned int line_break); +-template void Xdr::data_stream (unsigned long long * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data (int &, const char *); ++template LIBMESH_EXPORT void Xdr::data (unsigned int &, const char *); ++template LIBMESH_EXPORT void Xdr::data (unsigned short int &, const char *); ++template LIBMESH_EXPORT void Xdr::data (short int &, const char *); ++template LIBMESH_EXPORT void Xdr::data (unsigned long int &, const char *); ++template LIBMESH_EXPORT void Xdr::data (unsigned long long &, const char *); ++template LIBMESH_EXPORT void Xdr::data (long int &, const char *); ++template LIBMESH_EXPORT void Xdr::data (long long &, const char *); ++template LIBMESH_EXPORT void Xdr::data (char &, const char *); ++template LIBMESH_EXPORT void Xdr::data (signed char &, const char *); ++template LIBMESH_EXPORT void Xdr::data (unsigned char &, const char *); ++template LIBMESH_EXPORT void Xdr::data (float &, const char *); ++template LIBMESH_EXPORT void Xdr::data (double &, const char *); ++template LIBMESH_EXPORT void Xdr::data (long double &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::complex &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::complex &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::complex &, const char *); ++template LIBMESH_EXPORT void Xdr::data (std::string &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data>> (std::vector> &, const char *); ++template LIBMESH_EXPORT void Xdr::data>> (std::vector> &, const char *); ++template LIBMESH_EXPORT void Xdr::data>> (std::vector> &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data_stream (unsigned char * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data_stream (short int * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data_stream (int * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data_stream (long long * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data_stream (unsigned short int * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data_stream (unsigned int * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data_stream (unsigned long int * val, const unsigned int len, const unsigned int line_break); ++template LIBMESH_EXPORT void Xdr::data_stream (unsigned long long * val, const unsigned int len, const unsigned int line_break); + + #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION +-template void Xdr::data (Real &, const char *); +-template void Xdr::data> (std::complex &, const char *); +-template void Xdr::data> (std::vector &, const char *); +-template void Xdr::data>> (std::vector> &, const char *); ++template LIBMESH_EXPORT void Xdr::data (Real &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::complex &, const char *); ++template LIBMESH_EXPORT void Xdr::data> (std::vector &, const char *); ++template LIBMESH_EXPORT void Xdr::data>> (std::vector> &, const char *); + #endif + + } // namespace libMesh diff --git a/ports/libmesh/0004-netcdf-getopt.patch b/ports/libmesh/0004-netcdf-getopt.patch new file mode 100644 index 00000000000000..49bd0dfbd04c12 --- /dev/null +++ b/ports/libmesh/0004-netcdf-getopt.patch @@ -0,0 +1,51 @@ +--- a/contrib/netcdf/netcdf-c-4.6.2/ncdump/nccopy.c 2019-10-08 23:55:38.000000000 +0700 ++++ b/contrib/netcdf/netcdf-c-4.6.2/ncdump/nccopy.c 2022-01-25 04:43:00.340359700 +0700 +@@ -28,10 +28,7 @@ + #undef DEBUGFILTER + + #ifdef _MSC_VER +-#include "XGetopt.h" + #define snprintf _snprintf +-int opterr; +-int optind; + #endif + + /* default bytes of memory we are willing to allocate for variable +--- a/contrib/netcdf/netcdf-c-4.6.2/ncdump/ncdump.c 2019-10-08 23:55:38.000000000 +0700 ++++ b/contrib/netcdf/netcdf-c-4.6.2/ncdump/ncdump.c 2022-01-25 04:45:01.466989700 +0700 +@@ -20,9 +20,6 @@ + + #ifdef _MSC_VER + #define snprintf _snprintf +-#include "XGetopt.h" +-int opterr; +-int optind; + #endif + + #include +--- a/contrib/netcdf/netcdf-c-4.6.2/ncgen/main.c 2022-01-25 04:37:34.131754400 +0700 ++++ b/contrib/netcdf/netcdf-c-4.6.2/ncgen/main.c 2022-01-25 04:41:09.900845600 +0700 +@@ -13,10 +13,7 @@ + #endif + + #ifdef _MSC_VER +-#include "XGetopt.h" + #define snprintf _snprintf +-int opterr; +-int optind; + #endif + + /* Default is netcdf-3 mode 1 */ +--- a/contrib/netcdf/netcdf-c-4.6.2/ncgen3/main.c 2019-10-08 23:55:38.000000000 +0700 ++++ b/contrib/netcdf/netcdf-c-4.6.2/ncgen3/main.c 2022-01-25 04:41:28.854511000 +0700 +@@ -16,10 +16,7 @@ + #endif + + #ifdef _MSC_VER +-#include "XGetopt.h" + #define snprintf _snprintf +-int opterr; +-int optind; + #endif + + #ifdef __hpux diff --git a/ports/libmesh/portfile.cmake b/ports/libmesh/portfile.cmake index 9a16dbf98bf666..104b48d8ed703b 100644 --- a/ports/libmesh/portfile.cmake +++ b/ports/libmesh/portfile.cmake @@ -1,14 +1,37 @@ +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND PATCHES + 0001-windows-build.patch + 0002-windows-build-contrib.patch + 0003-libmesh-export.patch + 0004-netcdf-getopt.patch + ) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libMesh/libmesh REF 21f623c837b3865ed65ec9608b357bdb1935d428 #1.5.0 SHA512 53ad41ed0cd99cb5096ff338a3ff5d8a8ecbfb17dc1d7ee0d2b0cbffecbede7f7c11b7c3c2233cec9dde0988c8828ba0199247effd3442befc72230e641a185e HEAD_REF master + PATCHES ${PATCHES} ) if(VCPKG_TARGET_IS_WINDOWS) - set(OPTIONS --disable-qhull ) + set(OPTIONS + --disable-qhull + --disable-fparser + ax_cv_cxx_openmp=none + ac_cv_c_restrict=restrict + ac_cv_lib_m_floor=yes + LIBS=-lgetopt + ) +endif() + +set(RELEASE_METHODS "opt") +if("tests" IN_LIST FEATURES) + string(APPEND RELEASE_METHODS " devel") endif() + # There a lot of configure options in this port which are not yet correctly handled by VCPKG # To only mention two: # --enable-vtk-required Error if VTK is not detected by configure @@ -17,9 +40,24 @@ endif() # So this port can only be considered a Work In Progress vcpkg_configure_make( SOURCE_PATH ${SOURCE_PATH} + USE_WRAPPERS OPTIONS ${OPTIONS} + OPTIONS_DEBUG --with-methods=dbg + OPTIONS_RELEASE --with-methods=${RELEASE_METHODS} ) +if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(WRITE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/contrib/metis/config.h" "") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(WRITE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/contrib/metis/config.h" "") + endif() + + # use our version of "compile" wrapper for *.C compilation as C++ source + vcpkg_add_to_path(PREPEND "${SOURCE_PATH}/build-aux") +endif() + vcpkg_install_make() if (EXISTS ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool) diff --git a/ports/libmesh/vcpkg.json b/ports/libmesh/vcpkg.json index 7c4b273f1c3ce3..8f8f43daefad4a 100644 --- a/ports/libmesh/vcpkg.json +++ b/ports/libmesh/vcpkg.json @@ -1,7 +1,18 @@ { "name": "libmesh", "version-string": "1.5.0", - "port-version": 2, + "port-version": 3, "description": "The libMesh library provides a framework for the numerical simulation of partial differential equations using arbitrary unstructured discretizations on serial and parallel platforms. A major goal of the library is to provide support for adaptive mesh refinement (AMR) computations in parallel while allowing a research scientist to focus on the physics they are modeling.", - "homepage": "https://github.com/libMesh/libmesh" + "homepage": "https://github.com/libMesh/libmesh", + "dependencies": [ + { + "name": "getopt-win32", + "platform": "windows" + } + ], + "features": { + "tests": { + "description": "Build tests" + } + } } diff --git a/versions/baseline.json b/versions/baseline.json index fa6006e716da60..24a9128c2e7525 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3674,7 +3674,7 @@ }, "libmesh": { "baseline": "1.5.0", - "port-version": 2 + "port-version": 3 }, "libmicrohttpd": { "baseline": "0.9.75", diff --git a/versions/l-/libmesh.json b/versions/l-/libmesh.json index a8ebbf98af0841..35f8868355219f 100644 --- a/versions/l-/libmesh.json +++ b/versions/l-/libmesh.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "d74b61c39eb3c2a85a95d892f59d39c9031ac0ed", + "version-string": "1.5.0", + "port-version": 3 + }, { "git-tree": "99d2914d8591e790d8d9e16eeb572b2dfa6776d7", "version-string": "1.5.0",