Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Jacobian evaluation argument of realdot must be 0, 1, or -1

Please login with a confirmed email address before reporting spam

Hello I am a new comsol user 5.5 While analysing the photonics crystal I am facing "Jacobian evaluation argument of realdot must be 0, 1, or -1"

It would be nice if you can help me.



1 Reply Last Post 3 mars 2021, 09:06 UTC−5
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago 3 mars 2021, 09:06 UTC−5

Hi Amartya,

This error occurs because you are using the optional third argument to the realdot operator in in an unintended way. From the COMSOL Multiphysics documentation:

realdot(a,b,jaclevel)

The jaclevel argument controls Jacobian contributions of the realdot(a,b) operator and can have the following values:

  • −1: (default) Jacobian contributions in the assembling only if splitting of complex variables in real and imaginary part is active for the Study
  • 0: no Jacobian contributions
  • 1: always Jacobian contributions

In your model, you have defined the variable nEz as intop1(realdot(emw.Ez,emw.Ez,emw.Ez))/A, which is an incorrect use of the syntax with three input arguments.

Best regards,

Magnus Ringh

Hi Amartya, This error occurs because you are using the optional third argument to the `realdot` operator in in an unintended way. From the COMSOL Multiphysics documentation: `realdot(a,b,jaclevel)` The `jaclevel` argument controls Jacobian contributions of the `realdot(a,b)` operator and can have the following values: * −1: (default) Jacobian contributions in the assembling only if splitting of complex variables in real and imaginary part is active for the Study * 0: no Jacobian contributions * 1: always Jacobian contributions In your model, you have defined the variable `nEz` as `intop1(realdot(emw.Ez,emw.Ez,emw.Ez))/A`, which is an incorrect use of the syntax with three input arguments. Best regards, Magnus Ringh

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.