[cig-commits] commit 2558 by ian.rose to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Wed Apr 16 10:03:22 PDT 2014
Revision 2558
Fix potential nan
U branches/freesurface/source/simulator/freesurface.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2558&peg=2558
Diff:
Modified: branches/freesurface/source/simulator/freesurface.cc
===================================================================
--- branches/freesurface/source/simulator/freesurface.cc 2014-04-16 16:31:31 UTC (rev 2557)
+++ branches/freesurface/source/simulator/freesurface.cc 2014-04-16 17:03:19 UTC (rev 2558)
@@ -547,15 +547,8 @@
const Tensor<1,dim> v = fe_face_values[velocities].value(j, q_point);
const Tensor<1,dim> n_hat = fe_face_values.normal_vector(q_point);
const Tensor<1,dim> w = fe_face_values[velocities].value(i, q_point);
- const Tensor<1,dim> g_hat = gravity/g_norm;
+ const Tensor<1,dim> g_hat = (g_norm == 0.0 ? Tensor<1,dim>() : gravity/g_norm);
- //make a symmetrized ones in case we want to preserve symmetry
-// Tensor<1,dim> sym = (n_hat*g_hat < 0.0 ? (n_hat-g_hat) : (n_hat+g_hat)); sym = sym/sym.norm();
-// Tensor<1,dim> g_sym = (n_hat*g_hat < 0.0 ? -sym : sym);
-// Tensor<1,dim> n_sym = sym;
-
-// const Tensor<1,dim> r_hat = quad_points[q_point]/quad_points[q_point].norm();
-
double pressure_perturbation = std::abs(material_model->reference_density()/*-free_surface_density*/)*
this->time_step*parameters.free_surface_theta*g_norm;
More information about the CIG-COMMITS
mailing list