the preconditioner must be built once before the solver begins to iterater, by putting the logic for this in a dedicated method it becomes cleaner to call
approxJacobiInvert now only preforms a reallocation if the result buffer is non null. If it is non null it will preform validation to confirm that the result buffer is the correct size to recive the inverted matrix
working on a "smart" schur compliment preconditioner for the block form of the lane emden equation. Currently this is stub and should not be considered usable
essential dofs can be applied to both theta and phi (grad theta) if we move to a block form. I have done this derivation and made that change so that we can properly apply the central boundary condition to the slope
The default gamma value has been upped to 1e4 which is enough to strongly constrain the solution to have zero slope at the core region. Further, the initial guess has been changed from a series expansion of theta to a simple quadratic that is one at origin and zero at the polytrope radius. This is faster to evaluate and seems to work just as well.
In order to constrain the central slope we find all the elements connected to the central vertex. The slope will be approximated over these using the finite difference method
Instead of treating the polytrope as a free boundary problem I have defined an interpolating polynominal, accurate to within 0.01 percent over n=[0,5) which is used to set the size of the domain for a given n
The NewtonSolver has been subclassed to try to auto enforce the zero boundary central condition by modifying the residual vector and the gradient matrix. This is a work in progress
BREAKING CHANGE:
Rescaling a mesh by a linear transformation is a useful option so that we can start with a single "base" mesh and then rescale it to the dimensions needed for our problem. This commit adds the LinearRescale option too meshIO so that a unit sphere can be turned into a sphere of arbitrary radius (as an example).
macros provides a unified place to define macros which can be accessed at other points in the code. I defined a DEPRICATION_WARNING_OFF macro so we can disable those warnings for times when we cannot control them
previously I had a lagrangian multipliers at every element; however, we are enforcing a global constraint so there need only be one lagrangian multiplier
the polytrope module will be used as an initial guess to the solver. A skeleton of this has been imported from https://github.com/tboudreaux/FEMPolytrope
This module will need major updates still to handle 3D, proper boundary conditions, and to incorporate it with the rest of our meshing scheme