Feng  Shi <[email protected]> writes:

> Hi Jed,
>
> I mean, for the 3-D Maxwellian equations, the field E and B are both
> vectors, so we have 6 scalars, in which case I can define dof=6 for
> each node, right? 

If you use a collocated discretization, yes.  Though you might want to
use a staggered/mixed scheme for curl-compatibility.

> For each node in this case, there are 6*6=36 elements for each block,
> am I right?

Yes, for collocated.

> As for setting the values, I understand I can use routine 
> MatSetValuesBlockedStencil to set Jacobian. But I don't know what indices we 
> should use in this case? Just as the same indices as the case with dof=1? 
> row.i=i, row.j=j and col[1:5].i=..., col[1:5].j=... then call:
> MatSetValuesBlockedStencil(B,1,&row, 7, &col, &Value[0][0],INSERT_VALUES);
> Am I right?

The "..." part above is important, but yes, that's the general idea.

Attachment: pgpclrbVFOfd2.pgp
Description: PGP signature

Reply via email to