Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to use a user-defined NormFunction with NDSolve, e.g.,

NormFunction -> (Norm[Take[#, 2], \[Infinity]] &)

which says that the infinity norm should be used on the first two state variables.

How can I use a compiled version of the NormFunction above? When using a user-defined NormFunction integration seems to take longer time, and this seems to be because the NormFunction is not compiled. I believe that this is the case since when I define a user-defined norm returning the default norm it takes longer time compared to when not specifying it (and hence get the default norm automatically).

Any suggestions?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.