def test(self): df1 = mms.run_spatial('steady-adapt.i', 7, mpi=8) fig = mms.ConvergencePlot(xlabel='Element Size ($h$)', ylabel='$L_2$ Error') fig.plot(df1, label='steady-adapt', marker='o', markersize=8, num_fitted_points=3, slope_precision=1) fig.save('steady-adapt.png') for _,value in fig.label_to_slope.items(): self.assertTrue(fuzzyEqual(value, 1., .05))
def test(self): df1 = mms.run_spatial('advection-diffusion-reaction.i', 7, mpi=2) fig = mms.ConvergencePlot(xlabel='Element Size ($h$)', ylabel='$L_2$ Error') fig.plot(df1, label='compact-adr', marker='o', markersize=8, num_fitted_points=3, slope_precision=1) fig.save('compact-adr.png') for _,value in fig.label_to_slope.items(): self.assertTrue(fuzzyEqual(value, 2., .05))
def test(self): df1 = mms.run_spatial('skewed.i', 5, 'Variables/v/face_interp_method=average', mpi=1) fig = mms.ConvergencePlot(xlabel='Element Size ($h$)', ylabel='$L_2$ Error') fig.plot(df1, label='average', marker='o', markersize=8, num_fitted_points=3, slope_precision=1) fig.save('average.png') for _, value in fig.label_to_slope.items(): self.assertTrue(fuzzyEqual(value, 1., .15))
def test(self): df1 = mms.run_spatial( 'skewed.i', 5, 'Variables/v/face_interp_method=skewness-corrected FVKernels/advection/advected_interp_method=skewness-corrected', mpi=1) fig = mms.ConvergencePlot(xlabel='Element Size ($h$)', ylabel='$L_2$ Error') fig.plot(df1, label='corrected-advection', marker='o', markersize=8, num_fitted_points=3, slope_precision=1) fig.save('corrected-advection.png') for _, value in fig.label_to_slope.items(): self.assertTrue(fuzzyEqual(value, 2.0, .1))