SCOREC / fep

Finite Element Programming course materials
6 stars 4 forks source link

Convection Integrator assemby #32

Closed startrekman closed 3 years ago

startrekman commented 3 years ago

So I've got something like:

Vector av; av.SetSize(2); av(0)=1; av(1) = 0; VectorConstantCoefficient a_v(av); ConvectionIntegrator(a_v, 1.0);

But then I am not sure how to Assemble this/ incorporate this into the FE solve. I tried AssemblePA but that did not seem to work. What would you suggest I use to assemble the Convection Integrator and any other suggestions you might have? Thank you for your help.

mortezah commented 3 years ago

@startrekman that would be added the same way as the diffusion integrator here https://github.com/SCOREC/fep/blob/d16f0b636671f519bcfb8ea91d07fc04638ad091/a4/a4_diffusion.cpp#L147 replacing DiffusionIntegrator with the new one.

Note that you will add the convection integrator to the same ParBilinearFromobject(for exampleain the above example). And then when you calla.Assemble()` both those terms will be assembled internally.