void
AutoDerivativeFunction<dim>::set_formula (const DifferenceFormula form)
{
+ // go through all known formulas, reject ones we don't know about
+ // and don't handle in the member functions of this class
+ switch (form)
+ {
+ case Euler:
+ case UpwindEuler:
+ case FourthOrder:
+ break;
+ default:
+ Assert(false, ExcMessage("The argument passed to this function does not "
+ "match any known difference formula."));
+ }
+
formula = form;
}
break;
}
default:
- Assert(false, ExcInvalidFormula());
+ Assert(false, ExcNotImplemented());
}
return grad;
}
}
default:
- Assert(false, ExcInvalidFormula());
+ Assert(false, ExcNotImplemented());
}
}
}
default:
- Assert(false, ExcInvalidFormula());
+ Assert(false, ExcNotImplemented());
}
}
}
default:
- Assert(false, ExcInvalidFormula());
+ Assert(false, ExcNotImplemented());
}
}
void
FunctionDerivative<dim>::set_formula (typename AutoDerivativeFunction<dim>::DifferenceFormula form)
{
+ // go through all known formulas, reject ones we don't know about
+ // and don't handle in the member functions of this class
+ switch (form)
+ {
+ case AutoDerivativeFunction<dim>::Euler:
+ case AutoDerivativeFunction<dim>::UpwindEuler:
+ case AutoDerivativeFunction<dim>::FourthOrder:
+ break;
+ default:
+ Assert(false, ExcMessage("The argument passed to this function does not "
+ "match any known difference formula."));
+ }
+
formula = form;
}
return (-f.value(p+2*incr[0], component) + 8*f.value(p+incr[0], component)
-8*f.value(p-incr[0], component) + f.value(p-2*incr[0], component))/(12*h);
default:
- Assert(false, ExcInvalidFormula());
+ Assert(false, ExcNotImplemented());
}
return 0.;
}
result/=(12.*h);
return;
default:
- Assert(false, ExcInvalidFormula());
+ Assert(false, ExcNotImplemented());
}
}
values[i] = (values[i] - 8.*aux[i])/(12*h);
return;
default:
- Assert(false, ExcInvalidFormula());
+ Assert(false, ExcNotImplemented());
}
}