Skip to content

Commit

Permalink
retrying with simpler transition to refinement mode
Browse files Browse the repository at this point in the history
  • Loading branch information
enzbus committed Sep 12, 2024
1 parent cf9cfe4 commit d7570a2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions project_euromir/solver_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import numpy as np
import scipy as sp

NOHSDE = True

from project_euromir import equilibrate
from project_euromir.direction_calculator import (
CGNewton, DenseNewton, DiagPreconditionedCGNewton,
Expand All @@ -40,7 +38,7 @@
from project_euromir.refinement import refine as hsde_refine
from project_euromir.refinement_no_hsde import refine

HSDE_REFINEMENT = True
HSDE_REFINEMENT = False

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -288,10 +286,10 @@ def _local_derivative_residual(xy):
# switch to refinement
x = xy[:n]
y = xy[n:]
y[zero:] = np.maximum(y[zero:], 0.)
# y[zero:] = np.maximum(y[zero:], 0.)
s = -matrix_transf @ x + b_transf
s[:zero] = 0.
s[zero:] = np.maximum(s[zero:], 0.)
# s[:zero] = 0.
# s[zero:] = np.maximum(s[zero:], 0.)
z = y-s
xz = np.concatenate([x, z])
for _ in range(3):
Expand Down

0 comments on commit d7570a2

Please sign in to comment.