330 #define APBS_TIMER_WALL_CLOCK 26
336 #define APBS_TIMER_SETUP 27
342 #define APBS_TIMER_SOLVER 28
348 #define APBS_TIMER_ENERGY 29
354 #define APBS_TIMER_FORCE 30
360 #define APBS_TIMER_TEMP1 31
366 #define APBS_TIMER_TEMP2 32
393 #define VREDFRAC 0.25
409 #define VAPBS_RIGHT 0
415 #define MAX_SPHERE_PTS 50000
421 #define VAPBS_FRONT 1
451 #define VPMGSMALL 1e-12
457 #define SINH_MIN -85.0
463 #define SINH_MAX 85.0
465 #define MAX_HASH_DIM 75
468 # if !defined(APBS_NOINLINE)
469 # define APBS_NOINLINE 1
473 #if !defined(APBS_NOINLINE)
478 # define VINLINE_VACC
483 # define VINLINE_VATOM
488 # define VINLINE_VCSM
493 # define VINLINE_VPBE
498 # define VINLINE_VPEE
503 # define VINLINE_VGREEN
508 # define VINLINE_VFETK
513 # define VINLINE_VPMG
522 #if defined(VF77_UPPERCASE)
523 # if defined(VF77_NOUNDERSCORE)
524 # define VF77_MANGLE(name,NAME) NAME
525 # elif defined(VF77_ONEUNDERSCORE)
526 # define VF77_MANGLE(name,NAME) NAME ## _
528 # define VF77_MANGLE(name,NAME) name
531 # if defined(VF77_NOUNDERSCORE)
532 # define VF77_MANGLE(name,NAME) name
533 # elif defined(VF77_ONEUNDERSCORE)
534 # define VF77_MANGLE(name,NAME) name ## _
539 # define VF77_MANGLE(name,NAME) name
544 #if defined(FLOAT_EPSILON)
545 # define VFLOOR(value) \
546 ((floor(value) != floor(value + FLOAT_EPSILON)) ? \
547 floor(value + FLOAT_EPSILON) : floor(value))
554 # define VFLOOR(value) floor(value)
558 #if defined(HAVE_EMBED)
563 # define VEMBED(rctag) \
564 VPRIVATE const char* rctag; \
565 static void* use_rcsid=(0 ? &use_rcsid : (void**)&rcsid);
571 # define VEMBED(rctag)
577 #if !defined(WIN32) || defined(__MINGW32__)
578 #define PRINT_FUNC __PRETTY_FUNCTION__
579 #define OS_SEP_STR "/"
580 #define OS_SEP_CHAR '/'
582 #define OS_SEP_STR "\\"
583 #define OS_SEP_CHAR '\\'
584 #define PRINT_FUNC __FUNCSIG__
585 #define snprintf sprintf_s
588 #ifdef VERGBOSE_DEBUG
589 #define ANNOUNCE_FUNCTION \
591 Vnm_prrint(2, "%s() [%s:%d]\n", \
592 PRINT_FUNC, __FILE__, __LINE__ ); \
595 #define WARN_UNTESTED \
597 Vnm_print(2, "%s() [%s:%d]: Untested Translation!\n", \
598 __FUNCTION__, __FILE__, __LINE__); \
601 #define WARN_PARTTESTED \
603 Vnm_print(2, "%s() [%s:%d]: Partially Tested Translation.\n", \
604 __FUNCTION__, __FILE__, __LINE__); \
607 #define ANNOUNCE_FUNCTION
608 #define WARN_UNTESTED
609 #define WARN_PARTTESTED
616 #define VCHANNELEDMESSAGE0(channel, msg) \
618 Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \
620 __FILE__, __LINE__, __FUNCTION__, msg); \
623 #define VCHANNELEDMESSAGE1(channel, msg, arg) \
626 snprintf( buff, 1000, msg, arg ); \
627 Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \
629 __FILE__, __LINE__, __FUNCTION__, buff); \
632 #define VCHANNELEDMESSAGE2(channel, msg, arg0, arg1) \
635 snprintf( buff, 1000, msg, arg0, arg1 ); \
636 Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \
638 __FILE__, __LINE__, __FUNCTION__, buff); \
641 #define VCHANNELEDMESSAGE3(channel, msg, arg0, arg1, arg2) \
644 snprintf(buff, 1000, msg, arg0, arg1, arg2); \
645 Vnm_print(channel, "%s:%d [%s()]: MESSAGE:\n" \
647 __FILE__, __LINE__, __FUNCTION__, buff); \
650 #define VMESSAGE0(msg) VCHANNELEDMESSAGE0(2, msg)
651 #define VMESSAGE1(msg, arg0) VCHANNELEDMESSAGE1(2, msg, arg0)
652 #define VMESSAGE2(msg, arg0, arg1) VCHANNELEDMESSAGE2(2, msg, arg0, arg1)
653 #define VMESSAGE3(msg, arg0, arg1, arg2) VCHANNELEDMESSAGE3(2, msg, arg0, arg1, arg2)
655 #define VERRMSG0(msg) VMESSAGE0(msg)
656 #define VERRMSG1(msg, arg0) VMESSAGE1(msg, arg0)
657 #define VERRMSG2(msg, arg0, arg1) VMESSAGE2(msg, arg0, arg1)
658 #define VERRMSG3(msg, arg0, arg1, arg2) VMESSAGE3(msg, arg0, arg1, arg2)
660 #define VCHANNELEDMESSAGE0(channel, msg) \
662 Vnm_print(channel, "%s: %s\n", __FUNCTION__, msg); \
665 #define VCHANNELEDMESSAGE1(channel, msg, arg0) \
668 snprintf( buff, 1000, msg, arg0 ); \
669 Vnm_print(channel, "%s: %s\n", __FUNCTION__, buff); \
672 #define VCHANNELEDMESSAGE2(channel, msg, arg0, arg1) \
675 snprintf( buff, 1000, msg, arg0, arg1 ); \
676 Vnm_print(channel, "%s: %s\n", __FUNCTION__, buff); \
679 #define VCHANNELEDMESSAGE3(channel, msg, arg0, arg1, arg2) \
682 snprintf(buff, 1000, msg, arg0, arg1, arg2); \
683 Vnm_print(channel, "%s: %s\n", __FUNCTION__, buff); \
686 #define VMESSAGE0(msg) VCHANNELEDMESSAGE0(0, msg)
687 #define VMESSAGE1(msg, arg0) VCHANNELEDMESSAGE1(0, msg, arg0)
688 #define VMESSAGE2(msg, arg0, arg1) VCHANNELEDMESSAGE2(0, msg, arg0, arg1)
689 #define VMESSAGE3(msg, arg0, arg1, arg2) VCHANNELEDMESSAGE3(0, msg, arg0, arg1, arg2)
691 #define VERRMSG0(msg) VCHANNELEDMESSAGE0(2, msg)
692 #define VERRMSG1(msg, arg0) VCHANNELEDMESSAGE1(2, msg, arg0)
693 #define VERRMSG2(msg, arg0, arg1) VCHANNELEDMESSAGE2(2, msg, arg0, arg1)
694 #define VERRMSG3(msg, arg0, arg1, arg2) VCHANNELEDMESSAGE3(2, msg, arg0, arg1, arg2)
704 #define VASSERT_MSG0(cnd, msg) \
707 Vnm_print(2, "%s:%d [%s()]: ERROR:\n" \
708 " Assertion Failed (%s): %s\n\n", \
709 __FILE__, __LINE__, __FUNCTION__, #cnd, msg); \
714 #define VASSERT_MSG1(cnd, msg, arg) \
718 snprintf( buff, 1000, msg, arg ); \
719 Vnm_print(2, "%s:%d [%s()]: ERROR:\n" \
720 " Assertion Failed (%s): %s\n\n", \
721 __FILE__, __LINE__, __FUNCTION__, #cnd, buff); \
726 #define VASSERT_MSG2(cnd, msg, arg0, arg1) \
730 snprintf( buff, 1000, msg, arg0, arg1 ); \
731 Vnm_print(2, "%s:%d [%s()]: ERROR:\n" \
732 " Assertion Failed (%s): %s\n\n", \
733 __FILE__, __LINE__, __FUNCTION__, #cnd, buff); \
738 #define VASSERT_MSG0(cnd, msg) \
741 Vnm_print(2, "%[%s()]: ERROR:\n" \
742 " Assertion Failed (%s): %s\n\n", \
743 __FUNCTION__, #cnd, msg); \
748 #define VASSERT_MSG1(cnd, msg, arg) \
752 snprintf( buff, 1000, msg, arg ); \
753 Vnm_print(2, "[%s()]: ERROR:\n" \
754 " Assertion Failed (%s): %s\n\n", \
755 __FUNCTION__, #cnd, buff); \
760 #define VASSERT_MSG2(cnd, msg, arg0, arg1) \
764 snprintf( buff, 1000, msg, arg0, arg1 ); \
765 Vnm_print(2, "[%s()]: ERROR:\n" \
766 " Assertion Failed (%s): %s\n\n", \
767 __FUNCTION__, #cnd, buff); \
780 #define VWARN_MSG0(cnd, msg) \
785 "%s:%d [%s()]: WARNING:\n" \
786 " Condition Failed (%s):\n %s\n\n", \
796 #define VWARN_MSG1(cnd, msg, arg0) \
800 snprintf(buff, 1000, msg, arg0); \
803 "%s:%d [%s()]: WARNING:\n" \
804 " Condition Failed (%s):\n %s\n\n", \
814 #define VWARN_MSG2(cnd, msg, arg0, arg1) \
818 snprintf(buff, 1000, msg, arg0, arg1); \
821 "%s:%d [%s()]: WARNING:\n" \
822 " Condition Failed (%s):\n %s\n\n", \
832 #define VWARN_MSG0(cnd, msg) \
837 "[%s()]: WARNING:\n" \
845 #define VWARN_MSG1(cnd, msg, arg0) \
849 snprintf(buff, 1000, msg, arg0); \
852 "[%s()]: WARNING:\n" \
860 #define VWARN_MSG2(cnd, msg, arg0, arg1) \
864 snprintf(buff, 1000, msg, arg0, arg1); \
867 "[%s()]: WARNING:\n" \
878 #define VABORT_MSG0(msg) \
880 Vnm_print(2, "%s:%d [%s()]: ABORTING:\n" \
882 __FILE__, __LINE__, __FUNCTION__, msg); \
886 #define VABORT_MSG1(msg, arg) \
889 snprintf( buff, 1000, msg, arg ); \
890 Vnm_print(2, "%s:%d [%s()]: ABORTING:\n" \
892 __FILE__, __LINE__, __FUNCTION__, buff); \
896 #define VABORT_MSG2(msg, arg0, arg1) \
899 snprintf( buff, 1000, msg, arg0, arg1); \
900 Vnm_print(2, "%s:%d [%s()]: ABORTING:\n" \
902 __FILE__, __LINE__, __FUNCTION__, buff); \
906 #define VABORT_MSG0(msg) \
908 Vnm_print(2, "%[%s()]: ABORTING:\n" \
910 __FUNCTION__, msg); \
914 #define VABORT_MSG1(msg, arg) \
917 snprintf( buff, 1000, msg, arg ); \
918 Vnm_print(2, "[%s()]: ABORTING:\n" \
920 __FUNCTION__, buff); \
924 #define VABORT_MSG2(msg, arg0, arg1) \
927 snprintf( buff, 1000, msg, arg0, arg1); \
928 Vnm_print(2, "[%s()]: ABORTING:\n" \
930 __FUNCTION__, buff); \
939 #define PRINT_INT(expr) \
941 Vnm_print(2, "%s:%d [%s()]: %s == %d\n", \
942 __FILE__, __LINE__, __FUNCTION__, #expr, expr); \
945 #define PRINT_DBL(expr) \
947 Vnm_print(2, "%s:%d [%s()]: %s == %f\n\n", \
948 __FILE__, __LINE__, __FUNCTION__, #expr, expr); \
951 #define PRINT_INT(expr)
952 #define PRINT_DBL(expr)
955 #define VMALLOC(vmem, n, type) ((type*)Vmem_malloc(vmem, n, sizeof(type)))
957 #define VFREE(vmem, n, type, ptr) (Vmem_free(vmem, n, sizeof(type), (void **)&(ptr)))
959 #define VFILL(vec, n, val) \
962 for (fill_idx = 0; fill_idx < n; fill_idx++) \
963 vec[fill_idx] = val; \
966 #define VCOPY(srcvec, dstvec, i, n) \
968 for (i = 0; i < n; i++) \
969 dstvec[i] = srcvec[i]; \
973 char* wrap_text(
char* str,
int right_margin,
int left_padding );
975 #define VAT(array, i) ((array)[(i) - 1])
976 #define RAT(array, i) ((array) + i - 1)
enum eVchrg_Src Vchrg_Src
Declaration of the Vchrg_Src type as the Vchrg_Meth enum.
eVhal_PBEType
Version of PBE to solve.
enum eVdata_Format Vdata_Format
Declaration of the Vdata_Format type as the Vdata_Format enum.
enum eVoutput_Format Voutput_Format
Declaration of the Voutput_Format type as the VOutput_Format enum.
enum eVsurf_Meth Vsurf_Meth
Declaration of the Vsurf_Meth type as the Vsurf_Meth enum.
enum eVhal_IPKEYType Vhal_IPKEYType
Declaration of the Vhal_IPKEYType type as the Vhal_IPKEYType enum.
eVsurf_Meth
Types of molecular surface definitions.
enum eVbcfl Vbcfl
Declare Vbcfl type.
enum eVhal_PBEType Vhal_PBEType
Declaration of the Vhal_PBEType type as the Vhal_PBEType enum.
eVdata_Format
Format of data for APBS I/O.
eVbcfl
Types of boundary conditions.
eVrc_Codes
Return code enumerations.
eVsol_Meth
Solution Method enumerations.
eVoutput_Format
Output file format.
enum eVdata_Type Vdata_Type
Declaration of the Vdata_Type type as the Vdata_Type enum.
eVhal_NONLINType
Type of nonlinear to use for MG methods.
enum eVhal_NONLINType Vhal_NONLINType
Declaration of the Vhal_NONLINType type as the Vhal_NONLINType enum.
eVchrg_Meth
Types of charge discretization methods.
eVhal_IPKEYType
Type of ipkey to use for MG methods.
enum eVchrg_Meth Vchrg_Meth
Declaration of the Vchrg_Meth type as the Vchrg_Meth enum.
eVdata_Type
Types of (scalar) data that can be written out of APBS.