|
[Libmesh-users] problem assembling a problem....
From: nelson - <nelson1977@gm...> - 2005-03-16 20:06
|
Hi all,
I have to use Libmesh to assemble an equation like this (i omitted a
more complicated term that now doesn't interest me :-))
U^{n} = U^{n-1}(1+(dt/eps))
where dt is the timestep and eps is a real problem parameter.
I have computed correctly u_old (as explained in the examples).... now
i try to assemble the RHS.
i have the following code but it doesn't work...
for (unsigned int qp = 0; qp < qrule.n_points(); qp++) {
for (unsigned i = 0; i < n_dofs ; i++) {
Fe(i) += JxW[qp]*(u_old*phi[i][qp] - (phi[i][qp] * ( dt / (eps);
i have tried also this but it doesn't works too :-(
for (unsigned int qp = 0; qp < qrule.n_points(); qp++) {
for (unsigned i = 0; i < n_dofs ; i++) {
Fe(i) += JxW[qp]*(u_old + (( dt / (eps) ) * u_old));
can anyone give me an help,
nelson
|
| Thread | Author | Date |
|---|---|---|
| [Libmesh-users] problem assembling a problem.... | nelson - <nelson1977@gm...> |