Skip to content

Commit 3f15906

Browse files
committed
release 2026.3.1
1 parent 1b6300c commit 3f15906

7 files changed

Lines changed: 28 additions & 23 deletions

File tree

research/steady-cpo-field/steadyCPOfancy.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ def savefig(self, num):
6464
print('*** Saving %s'%(fout))
6565
plt.savefig(fout, **self.kw_savefig)
6666

67-
def plot_inputs(self):
67+
def plot_inputs(self, mesh=False, boundaries=False):
6868
self.set_inputs()
69-
ax1, ax2 = self.newfig(mesh=False, boundaries=False, floating=False)
69+
ax1, ax2 = self.newfig(mesh=mesh, boundaries=boundaries, floating=False)
7070
self.plot_boundaries(ax1)
7171
self.plot_boundaries(ax2, hidelegend=True)
7272
self.plot_velocities(ax1, kw_cb=self.kw_vel['kw_cb'], kw_tcf=self.kw_vel['kw_tcf'], kw_cax=self.kw_cax)
7373
self.plot_strainratemag(ax2, kw_cb=self.kw_epsE['kw_cb'], kw_tcf=self.kw_epsE['kw_tcf'], kw_cax=self.kw_cax)
7474
self.savefig(0)
75-
76-
def plot_results(self, problem, numerics):
75+
76+
def plot_results(self, problem, numerics, savefig=True):
7777
self.set_inputs()
7878
self.set_solution(problem['name'])
7979
ax1, ax2 = self.newfig(mesh=False, boundaries=False, floating=False)
@@ -90,7 +90,8 @@ def plot_results(self, problem, numerics):
9090
if problem['name'] == 'LROT': num = 1
9191
if problem['name'] == 'LROT+DDRX': num = 2
9292
if problem['name'] == 'altbc': num = 3
93-
self.savefig(num)
93+
if savefig: self.savefig(num)
94+
return (ax1,ax2)
9495

9596
def plot_biases(self, problem):
9697
self.set_inputs()
@@ -125,7 +126,7 @@ def plot_CPOs(self, ax, fab, onlymarkers=False, lvlmax=0.4, ROTATE_TO_XY=True, d
125126

126127
###########
127128

128-
def plot_boundaries(self, ax, lw=2, zorder=20, hidelegend=False):
129+
def plot_boundaries(self, ax, lw=2, zorder=20, ncol=3, hidelegend=False):
129130
xb, yb = self.xyboundaries()
130131
legh, legl = [], []
131132
for ii in range(2):
@@ -136,7 +137,7 @@ def plot_boundaries(self, ax, lw=2, zorder=20, hidelegend=False):
136137
legh.append(Line2D([0], [0], color=self.c_floating, lw=lw))
137138
legl.append('Floating')
138139
if not hidelegend:
139-
ax.legend(legh, legl, loc='upper left', ncol=3, fancybox=False, frameon=False, **self.kw_leg)
140+
ax.legend(legh, legl, loc='upper left', ncol=ncol, fancybox=False, frameon=False, **self.kw_leg)
140141

141142
def xyboundaries(self):
142143
(coords, bmeshes) = self.bmesh()

src/Makefile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ SRCCORE=$(OBJCORE:.o=.f90)
4949
PATHM77=include/math77
5050
OBJM77=$(PATHM77)/amach.o $(PATHM77)/derv1.o $(PATHM77)/dnqsol.o $(PATHM77)/dnrm2.o $(PATHM77)/erfin.o $(PATHM77)/ermsg.o $(PATHM77)/ierm1.o $(PATHM77)/ierv1.o
5151
SRCM77=$(OBJM77:.o=.f)
52+
OBJM77NODIR=$(notdir $(OBJM77))
5253

5354
### Elmer, ...
5455

@@ -57,13 +58,13 @@ ELMERS=$(ELMERSRCS:.f90=)
5758

5859
### Collect all
5960

60-
OBJALL=$(SPECFAB).o $(OBJCORE) $(OBJM77)
61+
OBJALL=$(SPECFAB).o $(OBJCORE) $(OBJM77NODIR)
6162
SRCALL=$(SPECFAB).f90 $(SRCCORE) $(SRCM77)
6263

6364
### Python versions supported
6465

6566
PYVERS=3
66-
#PYVERS=3.8 3.9 3.10 3.11 3.12 3.13
67+
#PYVERS=3.8 3.9 3.10 3.11 3.12 3.13 3.14
6768

6869
#---------------------------
6970

@@ -101,14 +102,11 @@ clear:
101102
rm -f $(PATHRHEOTEST)/rheology-test-orthotropic $(PATHRHEOTEST)/rheology-test-transverselyisotropic
102103
rm -f $(PATHFABEVO)/run-fabric-evolution-latrot $(PATHFABEVO)/run-fabric-evolution-ddrx
103104
rm -f $(SPECFAB).o $(SPECFAB).mod *.so $(PATHSPECFABPY)/*.so
104-
rm -f $(LAMBDASOLVER).o $(LAMBDASOLVER).mod $(OBJM77) $(PATHM77)/test $(FRAMES).o
105+
rm -f $(LAMBDASOLVER).o $(LAMBDASOLVER).mod $(OBJM77) $(OBJM77NODIR) $(PATHM77)/test $(FRAMES).o
105106

106107
clean: clear
107-
rm -f *.o *.mod *.so
108+
rm -f *.o *.mod *.so libspecfab.a
108109

109-
# old, not used
110-
#all: $(SPECFAB).o lib$(SPECFAB).so
111-
112110
#---------------------------
113111

114112
constitutive-tests: $(SPECFAB).o
@@ -168,8 +166,9 @@ $(IDEALSTATE).o: $(IDEALSTATE).f90 $(HEADER).o $(ROTATION).o $(FRAMES).o
168166
$(COMPILER) $(OPTS) -c $<
169167

170168
$(LAMBDASOLVER).o:
171-
rm -f $(OBJM77) $(LAMBDASOLVER).o $(LAMBDASOLVER).mod $(PATHM77)/test
169+
rm -f $(OBJM77) $(OBJM77NODIR) $(LAMBDASOLVER).o $(LAMBDASOLVER).mod $(PATHM77)/test
172170
cd $(PATHM77) && $(COMPILER) $(OPTS) -c *.f
171+
cp $(OBJM77) ./
173172
$(COMPILER) $(OPTS) -c $(LAMBDASOLVER).f90
174173
$(COMPILER) $(OPTS) $(PATHM77)/test.f90 $(LAMBDASOLVER).o $(OBJM77) -o $(PATHM77)/test
175174

src/golf.f90

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Module GOLF
4040
! INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(12) ! If not using
4141
! with Elmer
4242

43-
Real, Parameter :: kmin=0.002_dp ! valeur de ki mimum
43+
Real(8), Parameter :: kmin=0.002_dp ! valeur de ki mimum
4444
Integer, Parameter :: Ndiv=30 ! Ndiv+2 Number of points along ik1
4545
Integer, Parameter :: Ntot=813 ! Total number of points
4646
Integer, Parameter :: NetaI=4878 ! 6*4884 length of EtaI
@@ -89,7 +89,7 @@ Subroutine ViscGene(eta6,Angle,eta36)
8989
Integer, Dimension(6), Parameter :: ik=(/1,2,3,1,2,3/)
9090
Integer, Dimension(6), Parameter :: jk=(/1,2,3,2,3,1/)
9191
Integer :: k,m,n
92-
Integer :: i,j
92+
! Integer :: i,j
9393

9494

9595
! Angle = Phi, Theta, Omega
@@ -269,7 +269,7 @@ Function InterQ9(x,y,xi,yi,Q)
269269
Real(kind=dp), Dimension(9) :: Q
270270
Real(kind=dp) :: InterQ9
271271
Real(kind=dp) :: Ip,x,y
272-
Integer i
272+
! Integer i
273273

274274
!
275275
a(1)=InterP(x,xi,Q(1))
@@ -358,7 +358,8 @@ Subroutine ViscMat_ai(ai0,eta6,etaI)
358358
Real(kind=dp) :: a1,a2
359359
Real(kind=dp), parameter :: UnTier = 0.3333333333333333333333333333333333333333_dp
360360
Integer, Dimension(3) :: ordre
361-
Integer :: i,j,n
361+
! Integer :: i,j,n
362+
Integer :: i,n
362363
Integer :: ik1,ik2
363364
Integer :: N4,N5,N6
364365

src/setup-dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
'specfabpy/*.py',
1919
'specfabpy/fenics/*.py',
2020
'specfabpy/firedrake/*.py',
21-
'tamm/*.py',
21+
'specfabpy/tamm/*.py',
2222
]},
2323
)

src/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
else:
1010
setup(
1111
name="specfabpy",
12-
version="2025.10.2",
12+
version="2026.3.1",
1313
author="Nicholas M. Rathmann and David A. Lilien",
1414
author_email="rathmann@nbi.ku.dk",
1515
description="specfab Python module",

src/specfabpy/fenics/steadyCPO.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def __init__(self, domain):
4848
self.dxy_u = domain['subsample_u']
4949
self.dxy_h = domain['subsample_h']
5050

51+
if 'GRE' in self.fvel:
52+
self.uxname, self.uyname = 'vx', 'vy' # different names for Greenland file
53+
5154
### Determine bounding box of domain for interpolation
5255

5356
content = open(domain['fgeo']).readlines()

tests/GOLF/GOLF.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030

3131
# Print etaij for some test case
3232

33-
a2_test = a2_smax(ez)
33+
a2 = a2_smax(ez)
34+
a2 = a2_gdl(ez)
3435

35-
etaij = sf.etaij_GOLF(a2_test)
36+
etaij = sf.etaij_GOLF(a2)
3637
etaij_diag = np.diag(etaij)
3738
eta_xxxx, eta_yyyy, eta_zzzz, eta_xyxy, eta_yzyz, eta_xzxz = etaij_diag # unpack components
3839
print(etaij)

0 commit comments

Comments
 (0)