Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Print LDG-found divergence error along with Central.
  • Loading branch information
inducer committed Mar 26, 2010
1 parent 8c7d6a1 commit 2c7ff8b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pyrticle/cloud.py
Expand Up @@ -872,8 +872,6 @@ def make_scaling_matrix(beta_scale, other_scale):

from hedge.tools import ptwise_dot
from hedge.models.nd_calculus import GradientOperator
#e_tilde = ptwise_dot(2, 1, make_scaling_matrix(1/gamma, 1),
#bound_poisson.grad(phi_tilde))
e_tilde = ptwise_dot(2, 1, make_scaling_matrix(1/gamma, 1),
GradientOperator(discr.dimensions).bind(discr)(phi_tilde))
e_prime = ptwise_dot(2, 1, make_scaling_matrix(1, gamma), e_tilde)
Expand All @@ -899,11 +897,11 @@ def make_scaling_matrix(beta_scale, other_scale):
d_tilde = maxwell_op.epsilon*e_tilde
d_prime = maxwell_op.epsilon*e_prime

from hedge.optemplate import InverseMassOperator
#divD_prime_ldg = bound_poisson.div(d_prime)
#divD_prime_ldg2 = bound_poisson.div(d_prime, maxwell_op.epsilon*gamma*phi_tilde)
#divD_prime_ldg3 = maxwell_op.epsilon*\
#(InverseMassOperator().apply(discr, bound_poisson.op(gamma*phi_tilde)))
from hedge.optemplate import InverseMassOperator
divD_prime_ldg3 = maxwell_op.epsilon*\
(InverseMassOperator().apply(discr, bound_poisson.op(gamma*phi_tilde)))
divD_prime_central = bound_div_op(d_prime)

print "l2 div D_prime error central: %g" % \
Expand All @@ -912,8 +910,8 @@ def make_scaling_matrix(beta_scale, other_scale):
#rel_l2_error(divD_prime_ldg, rho_prime)
#print "l2 div D_prime error ldg with phi: %g" % \
#rel_l2_error(divD_prime_ldg2, rho_prime)
#print "l2 div D_prime error ldg with phi 3: %g" % \
#rel_l2_error(divD_prime_ldg3, rho_prime)
print "l2 div D_prime error ldg with phi 3: %g" % \
rel_l2_error(divD_prime_ldg3, rho_prime)

if "vis_files" in method.debug:
from hedge.visualization import SiloVisualizer
Expand Down

0 comments on commit 2c7ff8b

Please sign in to comment.