Skip to content

Commit 03192f6

Browse files
dmarsico1vijaysmiulian787
authored
add bilinear weight generation (#112)
* The bilinear and generalized barycentric coordinate schemes that work for meshes with holes. Updated from a previous version in order to fix a merge conflict. * Minor updates to remove warnings when configuring with autotools 2.7+ * Disable exceptions for non-monotone bilinear maps * Reduce requirement to autoconf-2.69 * Uncomment the exception * Reduce tolerance for bilinear weight identification * simplify gnomonic projection use a simpler formula for projection on tangent plane (gnommonic projection) restore tolerance to 1.e-12 for points coincident to polygon vertices for bilinear maps * Revisions for the bilinear, non-integrated weight generation. * Quick bug fix in method to compute bilinear weights. --------- Co-authored-by: Vijay Mahadevan <[email protected]> Co-authored-by: Iulian Grindeanu <[email protected]>
1 parent 8c8b634 commit 03192f6

File tree

8 files changed

+1491
-527
lines changed

8 files changed

+1491
-527
lines changed

config/ax_blas.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
# special exception to the GPL to apply to your modified version as well.
6969

7070
AC_DEFUN([AX_BLAS], [
71-
AC_PREREQ(2.50)
71+
AC_PREREQ([2.69])
7272
ax_blas_ok=no
7373
7474
AC_ARG_WITH(blas,
75-
[AC_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])])
75+
[AS_HELP_STRING([--with-blas=<lib>],[use BLAS library <lib>])])
7676
case $with_blas in
7777
yes | "") ;;
7878
no) acx_blas_ok=disable ;;
@@ -115,7 +115,7 @@ fi
115115
# ax_blas_ok to yes, and execute ACTION-IF-FOUND. On failure, set ax_blas_ok
116116
# to no and execute ACTION-IF-NOT-FOUND.
117117
AC_DEFUN([_AX_BLAS], [
118-
AC_PREREQ(2.50)
118+
AC_PREREQ([2.69])
119119
ax_blas_ok=no
120120
121121
# Get fortran linker names of BLAS functions to check for.

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# Process this file with autoconf to produce a configure script.
33
# Usage: autoreconf -fi
44
#
5-
AC_PREREQ([2.68])
6-
AC_INIT([TempestRemap], [2.1.2], [[email protected]])
5+
AC_PREREQ([2.69])
6+
AC_INIT([TempestRemap],[2.1.2],[[email protected]])
77
AC_CONFIG_AUX_DIR([config])
88
AC_CONFIG_MACRO_DIR([config])
99
#AC_CONFIG_SRCDIR([test/optimtest.m])
1010
AC_CONFIG_HEADERS([src/TempestConfig.h])
1111

1212
AM_INIT_AUTOMAKE([foreign subdir-objects])
13-
AM_PROG_LIBTOOL
13+
LT_INIT
1414
AM_SILENT_RULES([yes])
1515

1616
LT_INIT([disable-shared])

src/CoordTransforms.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,26 @@ inline void GnomonicProjection(
356356

357357
}
358358

359+
// assume Tx, Tx, Tz is on unit sphere
360+
inline void SimpleGnomonicProjection(
361+
double x,
362+
double y,
363+
double z,
364+
double Tx,
365+
double Ty,
366+
double Tz,
367+
double & Gx,
368+
double & Gy,
369+
double & Gz
370+
)
371+
{
372+
double dotProduct = x*Tx + y*Ty + z*Tz;
373+
_ASSERT(dotProduct!=0);
374+
Gx = x/dotProduct;
375+
Gy = y/dotProduct;
376+
Gz = z/dotProduct;
377+
}
378+
359379
///////////////////////////////////////////////////////////////////////////////
360380

361381

0 commit comments

Comments
 (0)