Skip to content

Commit

Permalink
ENH: moved all declarations to pxd to workaround coverage bug
Browse files Browse the repository at this point in the history
  • Loading branch information
saullocastro committed Jul 16, 2021
1 parent a42c73a commit 22b85af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 9 additions & 0 deletions composites/core.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
cimport numpy as np
from libcpp.vector cimport vector

ctypedef np.int64_t cINT
ctypedef np.double_t cDOUBLE

cdef extern from "math.h":
double cos(double t) nogil
double sin(double t) nogil
double atan(double t) nogil

cdef inline double deg2rad(double thetadeg) nogil:
return thetadeg*4*atan(1.)/180.

cdef class LaminationParameters(object):
cdef public double xiA1, xiA2, xiA3, xiA4
cdef public double xiB1, xiB2, xiB3, xiB4
Expand Down
10 changes: 0 additions & 10 deletions composites/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,10 @@ Composites Core Module (:mod:`composites.core`)
"""
import numpy as np
cimport numpy as np
from libcpp.vector cimport vector

INT = np.int64
DOUBLE = np.float64

cdef extern from "math.h":
double cos(double t) nogil
double sin(double t) nogil
double atan(double t) nogil

cdef double deg2rad(double thetadeg) nogil:
return thetadeg*4*atan(1.)/180.

cdef class LaminationParameters(object):
"""Lamination parameters"""
#xiA lamination parameters for extensional matrix A
Expand Down

0 comments on commit 22b85af

Please sign in to comment.