Commit Graph

73 Commits

Author SHA1 Message Date
76d6d3d1cf fix(poly): working to resolve overshoot mode 2025-06-10 12:49:31 -04:00
2a91d57ad7 fix(poly): fixed numerous bugs related to inconsistent system sizing with the reduced operator
this has restored the symmetry which we relied on before.
2025-06-09 10:19:18 -04:00
6e1453cf6e docs(poly): began cleaning up and adding docs 2025-06-05 15:13:50 -04:00
a31c966146 feat(poly): refactoring PolytropeOperator to work on the reduced system so as to avoid rank deficiencies 2025-06-05 12:37:00 -04:00
4eb8b71271 docs(laneEmdenVariationalForm): updated to match MFEM sign convention more closley 2025-06-05 12:36:26 -04:00
2e9de49f88 refactor(poly): minor comment cleaning up 2025-06-03 08:11:01 -04:00
f5dea85db1 fix(PolytropeOperator): seperated boundary aware and unaware operators for M, Q, and D
residual calculation needs to be done when boundary degrees of freedom have not been removed (since their removal takes place in the Mult step in order to introduce the proper restoring force). Whereas jacobian calculation needs to always work from the boundary aware operators (these are sparse matrices)

The other thing to note here is that this seems contrary to a matrix free design. While true it is common practive to assemble linear terms since they are cheap. We still never assemble the non linear matrix form.
2025-05-22 11:30:24 -04:00
bd4aebedce refactor(polySolver): turned on preconditioner and removed redundant validation check 2025-05-18 15:33:06 -04:00
b16ba8a7b6 feat(operator): added matrix free inverter and SchurComplement operator
In order to maintain memory efficienty I have implimented a matrix free SchurComplement operator as well as an operator which uses a few iterations of GMRES to approxinate the inverse of any general operator.
2025-05-18 15:32:08 -04:00
534a9cdf4b feat(polySolver): added polytropic index as a constructor argument for polytrope operator 2025-05-12 14:27:41 -04:00
1ee919a4a9 feat(PolytropeOperator): added polytropic index as a member variable 2025-05-12 14:27:01 -04:00
14eb21bd31 fix(PolytropeOperator): uncommented code that should never have been commented in GetGradient 2025-05-11 15:09:22 -04:00
412a3be2ec refactor(PolytropeOperator): commented out debug code 2025-05-11 14:40:19 -04:00
8b9d46e996 style(NonlinearPowerIntegrator): removed old comments 2025-05-11 14:38:50 -04:00
3d33839028 feat(NonlinearPowerIntergrator): increased robustness to theta ~ 0 and theta < 0 2025-05-11 14:38:22 -04:00
454d49c3d3 style(polySolver): removed redundant lines 2025-05-11 14:37:26 -04:00
dee6ca80f4 fix(operator): changed MULT (residuals) to deal with negated M properly 2025-04-30 07:32:56 -04:00
ed4b6404ab refactor(poly): refactored initializer 2025-04-30 07:28:00 -04:00
ae5d61bd75 feat(poly): locking phi surface flux and fixed phi boundary condition application 2025-04-28 13:44:27 -04:00
d3a5e4615b fix(polyCoeff.h): removed const qualifier on stuct 2025-04-25 12:41:14 -04:00
33c15b5713 fix(polyCoeff.h): removed accidently deleted file 2025-04-25 12:26:32 -04:00
cb6d0b8bd4 Merge branch 'main' into feature/mixedPolytrope
# Conflicts:
#	src/poly/coeff/meson.build
#	src/poly/coeff/private/polyCoeff.cpp
#	src/poly/utils/meson.build
#	src/poly/utils/private/operator.cpp
#	src/resources/macros/warning_control.h
#	src/types/public/4DSTARTypes.h
2025-04-25 12:24:44 -04:00
56f596500c feat(poly): added NonlinearPowerIntegrator and PolytropeOperator
A custom integrator is required to handle the theta^n term in the lane emden equation, that is written as NonlinearPowerIntegrator which is a mfem::NonlinearFormIntegrator and defines methods to assemble its element vector (function value) and element gradient matrix (jacobian). This is then, along with built in mfem vectors for M Q and D, incorporated into the PolytropeOperator which defines methods for Mult (calculate the residuals of the variational form) and GetGradient (find the jacobian of the system)
2025-04-25 11:41:08 -04:00
2acc037111 fix(poly): phi boundary values now coorespond to theta flux through polytrope surface 2025-04-25 10:32:06 -04:00
58840d82cd refactor(poly): renamed core2 to core_hires and updated docs for polysolver 2025-04-23 11:00:32 -04:00
e56ab5644b fix(poly): fixed -M bug in form
MFEM MixedVectorWeakDivergenceIntegrator is actually already -M in our derivation, I have negated this so that Mform -> M directly
2025-04-23 09:13:30 -04:00
e4b56d7ce2 feat(poly): added memory safty flags 2025-04-21 10:18:44 -04:00
afdebb8636 refactor(operator): added updatePreconditioner method
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
2025-04-21 09:56:34 -04:00
9d164ef35b feat(operator): smarter memory managment for all invertable matricies
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
2025-04-21 09:55:21 -04:00
09fdff27bc refactor(poly): improved const corectness 2025-04-21 09:22:21 -04:00
1af5bd00a2 refactor(thetaSeriesExpansion): marked parameters as const 2025-04-21 09:09:09 -04:00
513e90b7a0 refactor(solver): renamed setupOperator -> setOperatorEssentialTrueDofs to better reflect method job 2025-04-21 09:05:34 -04:00
30a6cb074f docs(src): updated file headers 2025-04-21 08:56:45 -04:00
431a47b9c7 refactor(poly): updated header guards to pragma once 2025-04-21 08:54:59 -04:00
58cebc6167 feat(poly): preconditioner is now being computed 2025-04-21 08:35:29 -04:00
184f92faf1 refactor(polySolver): removed build_prec method
building and managing has been offloaded to the operator
2025-04-21 08:07:17 -04:00
4a6b7aaa35 feat(polytrope-operator): finished computing the preconditioner 2025-04-21 08:04:49 -04:00
274f24034c refactor(operator.h): removed get block methods 2025-04-21 07:45:17 -04:00
e7ad73c0f9 refactor(jacobiInvert): moved all jacobi inverting logic into dedicated function 2025-04-21 07:33:39 -04:00
0cc8e5bdfa feat(polyInitialGuess): use numeric derivitive for phi initial guess 2025-04-18 11:18:55 -04:00
41460acacf feat(debug-utils): added framework for shared debug util tools 2025-04-10 09:05:30 -04:00
08b68c22de feat(poly): major work on preconditioner for block form of lane emden equation
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
2025-04-09 15:17:55 -04:00
acf5367556 fix(poly): bug fixing in block form
currently derivitive constraint is not working
2025-04-03 11:14:50 -04:00
dcc4381cbb refactor(poly): removed unused includes 2025-04-02 15:00:28 -04:00
e3afe90f37 feat(poly): moved to a block form for poly
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
2025-04-02 14:57:37 -04:00
0880403850 fix(poly): have a much closer to working polytrope, still small divergence near core 2025-03-27 14:26:23 -04:00
b2ddbc41e7 fix(poly): increased default gamma and changed initial guess
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.
2025-03-26 12:34:30 -04:00
df3cf68e92 docs(src): updated headers 2025-03-19 13:50:01 -04:00
b3581d11ed feat(poly): added full constraint integrator function
not yet debugged
2025-03-19 13:49:21 -04:00
0ec1b6e751 feat(poly): find all connected elements to central vertex
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
2025-03-19 11:15:37 -04:00