Skip to content

Commit

Permalink
add bilinear weight generation (#112)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored May 15, 2023
1 parent 8c8b634 commit 03192f6
Show file tree
Hide file tree
Showing 8 changed files with 1,491 additions and 527 deletions.
6 changes: 3 additions & 3 deletions config/ax_blas.m4
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@
# special exception to the GPL to apply to your modified version as well.

AC_DEFUN([AX_BLAS], [
AC_PREREQ(2.50)
AC_PREREQ([2.69])
ax_blas_ok=no
AC_ARG_WITH(blas,
[AC_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])])
[AS_HELP_STRING([--with-blas=<lib>],[use BLAS library <lib>])])
case $with_blas in
yes | "") ;;
no) acx_blas_ok=disable ;;
Expand Down Expand Up @@ -115,7 +115,7 @@ fi
# ax_blas_ok to yes, and execute ACTION-IF-FOUND. On failure, set ax_blas_ok
# to no and execute ACTION-IF-NOT-FOUND.
AC_DEFUN([_AX_BLAS], [
AC_PREREQ(2.50)
AC_PREREQ([2.69])
ax_blas_ok=no
# Get fortran linker names of BLAS functions to check for.
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# Process this file with autoconf to produce a configure script.
# Usage: autoreconf -fi
#
AC_PREREQ([2.68])
AC_INIT([TempestRemap], [2.1.2], [[email protected]])
AC_PREREQ([2.69])
AC_INIT([TempestRemap],[2.1.2],[[email protected]])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([config])
#AC_CONFIG_SRCDIR([test/optimtest.m])
AC_CONFIG_HEADERS([src/TempestConfig.h])

AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_PROG_LIBTOOL
LT_INIT
AM_SILENT_RULES([yes])

LT_INIT([disable-shared])
Expand Down
20 changes: 20 additions & 0 deletions src/CoordTransforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,26 @@ inline void GnomonicProjection(

}

// assume Tx, Tx, Tz is on unit sphere
inline void SimpleGnomonicProjection(
double x,
double y,
double z,
double Tx,
double Ty,
double Tz,
double & Gx,
double & Gy,
double & Gz
)
{
double dotProduct = x*Tx + y*Ty + z*Tz;
_ASSERT(dotProduct!=0);
Gx = x/dotProduct;
Gy = y/dotProduct;
Gz = z/dotProduct;
}

///////////////////////////////////////////////////////////////////////////////


Expand Down
Loading

0 comments on commit 03192f6

Please sign in to comment.