Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should node finding use Newton or Gauss-Newton? #277

Open
inducer opened this issue Oct 25, 2021 · 0 comments
Open

Should node finding use Newton or Gauss-Newton? #277

inducer opened this issue Oct 25, 2021 · 0 comments

Comments

@inducer
Copy link
Owner

inducer commented Oct 25, 2021

Upsides of Gauss-Newton:

  • More robust?
  • Gives us "the closest" if the exact point can't be found

Downside:

  • Conditioning penalty via the normal equations

def _find_src_unit_nodes_via_gauss_newton(
tgt_bdry_nodes,
src_bdry_nodes,
src_grp, src_mesh_grp,
tgt_bdry_discr, src_bdry_discr,
tol):
dim = src_grp.dim
_, nelements, ntgt_unit_nodes = tgt_bdry_nodes.shape
initial_guess = np.mean(src_mesh_grp.vertex_unit_coordinates(), axis=0)
src_unit_nodes = np.empty((dim, nelements, ntgt_unit_nodes))
src_unit_nodes[:] = initial_guess.reshape(-1, 1, 1)
import modepy as mp
src_grp_basis_fcts = src_grp.basis_obj().functions
vdm = mp.vandermonde(src_grp_basis_fcts, src_grp.unit_nodes)
inv_t_vdm = la.inv(vdm.T)
nsrc_funcs = len(src_grp_basis_fcts)

cc @xywei @alexfikl @majosm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant