MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / Orthogonalize

Function Orthogonalize

python/eigenvalues.py:5–16  ·  view source on GitHub ↗
(vecs, mat)

Source from the content-addressed store, hash-verified

3from ngsolve import Projector, Norm, Matrix, Vector, IdentityMatrix
4
5def Orthogonalize (vecs, mat):
6 mv = []
7 for i in range(len(vecs)):
8 for j in range(i):
9 vecs[i] -= InnerProduct(vecs[i], mv[j]) * vecs[j]
10
11 hv = mat.CreateRowVector()
12 hv.data = mat * vecs[i]
13 norm = sqrt(InnerProduct(vecs[i], hv))
14 vecs[i] *= 1/norm
15 hv *= 1/norm
16 mv.append (hv)
17
18
19def PINVIT1(mata, matm, pre, num=1, maxit=20, printrates=True, GramSchmidt=False):

Callers 11

FE_TNedelecQuadMethod · 0.85
FE_NedelecTet2oMethod · 0.85
FE_NedelecTet3NoGradMethod · 0.85
FE_TNedelecPrism2Method · 0.85
FE_TNedelecPrism3Method · 0.85
FE_NedelecPyramid2Method · 0.85
FE_NedelecPyramid3Method · 0.85
FE_BDMTrig1Method · 0.85
FE_BDMTet1Method · 0.85
PINVIT1Function · 0.85

Calls 3

sqrtFunction · 0.90
InnerProductFunction · 0.50
CreateRowVectorMethod · 0.45

Tested by

no test coverage detected