Closed startrekman closed 3 years ago
@startrekman what needs to be done for a4_convergence is very similar to what is already done in a4_diffusion as mentioned here https://github.com/SCOREC/fep/blob/d16f0b636671f519bcfb8ea91d07fc04638ad091/a4/a4_convergence_rate.cpp#L131
You will just need to set up the diffusion problem again with much simpler all-around Dirichlet boundary conditions. You do not need to compute any integrals yourself. The L2 norms are computed automatically here https://github.com/SCOREC/fep/blob/d16f0b636671f519bcfb8ea91d07fc04638ad091/a4/a4_convergence_rate.cpp#L182 so you do not have to worry about that either.
So I am looking for something more like b.AddDomainIntegrator(new DomainLFIntegrator(force_function)); except that does not seem to work, it only works with a constant. Is there something like a similar thing to ConstantCoefficent but a function? Thank you.
@startrekman
for that you will need to define a FunctionCoefficient
object the same way such an object is defined here https://github.com/SCOREC/fep/blob/d16f0b636671f519bcfb8ea91d07fc04638ad091/a4/a4_diffusion.cpp#L203
Then that object can be passed to DomainLFIntegrator
I am having trouble locating in the documentation how to integrate anything other than a constant with the domain Integrator for a4_convergence. Can you send something to help me find how to do this? Thank you for your help.