Commit Graph

79 Commits

Author SHA1 Message Date
ac2cccda29 feat(solver/seed): Initial guess system
the seed system has two jobs, get the lane-emden solution for a reasonable n and project that onto the mesh. Note that the seed system does not solve lane-emden, that is in utils/laneemden (so that it can be reused by other systems). Currently SERiF only solves polytrope so the lane-emden initial guess is generally very good; however, as we move to non polytropic EOS we will still use a projected lane-emden as our initial guess for the starting model
2026-11-09 13:35:24 -05:00
9f4207bc6a feat(solver/preconditioner): Implements preconditioner system
The system matrix for a problem may be poorly conditioned, preconditioners are supposed to efficiently estimate the inverse of the system matrix so that a simpler problem, with the approximate identity matrix may be solved instead. The problem is that the best approach to this varies with different fields. The preconditioner system implements infrastructure to define seperate preconditioners for different fields which are then composed together.
2026-11-09 13:33:10 -05:00
24d4c20f82 feat(solver/normalization): Added normalization system
The dynamical range of different fields SERiF must solve for is massive. This just breaks any reasonable preconditioner / spreads the eigen modes of the system matrix out. This is a normalization system which uses charectaristic scale factors (e.g. the approximate radius estimated using the lane-emden equation) to rescale different fields to a more similar numeric scale. This turns out to be essential for stable convergence. Broadly this implements Riesz normalization along with exact diagnoal normalization.
2026-11-09 13:30:20 -05:00
9da779417b feat(solver/nonlinear): Implements a damped newton line-search with backtracking
This uses a linear solver from solver/linear which then calls some linear solver from the backend. Note that MFEM's build in newton solver is very simplistic and not sufficient for our needs; therefore we implement a more robust one here (and this is why newton is in the frontend and not the backend)
2026-11-09 13:27:14 -05:00
f520fe5f03 feat(solver/linear): Implemented a few linear solver frontends
As with much of the code, the actual solvers are implemented (through MFEM) in the backend. This provides an interface so we can more easily swap out the linear solvers on the backend in the future
2026-11-09 13:25:52 -05:00
64cc306a2c feat(solver/continuation): system to auto continue a solver along some number of parameters
A representative example is angular momentum. It may be useful to not spin a model up all the way initially (due to convergence issues) rather the continuation system allows for a model to be spun up over a few solves so that it can more reliably reach a stable state
2026-11-09 13:24:42 -05:00
87a1026be6 feat(operators): Moved most of operators to backend
Operators defines how SERiF concepts map into MFEM (or generally any backend) concenpts and types. Since we are trying to seperate the specific MFEM implementation out of SERiF most of the code that was here has moved to backend. However, what remains is some general code related to the block layout of a systen and the contributions of different equations to different parts of that block layout
2026-11-09 13:23:08 -05:00
48c6bac1cc feat(model): added model sub system
SERiF defines a so-called "model" subsystem. A model is a fully compile-time description of a problem. Note that this is a description not an evaluation tool. The basic idea is that since we have this robust description we can more easily serialize and be confident that others who load a model are getting the exact same thing. Further, this provides a convient place to do things like validate that all options are compatible, do some limited initial construction of the needed computational graph, allocate needed memory, etc... Some of the stuff that might initially seem to belong to a model will be in the discritization system though (e.g. FEM object lifetimes)
2026-11-09 13:20:46 -05:00
c6d1686c5d feat(mapping): The mapping code was all moved to the backend, this module now just brings the MFEM backend in
The mapping code is fundamentally backend dependent. Previously we had DomainMapper here; however, since it depende on MFEM we have moved it to the backend. The mapping module now just includes parts of the backend so that prior code will not break
2026-11-09 13:16:36 -05:00
30af52ccea feat(geometry/surface): System for prescripting surface condition and building computational node for surface condition
The surface needs some defined condition (e.g. Isobaric) This module defines how the surface is defined. Again, much like the deformation system this does not actually implement much of the code to deform the surface to that condition; rather, it implements code to allow the prescription to be described robustly at compile time
2026-11-09 13:13:53 -05:00
4bbbf1c418 feat(geometry/deformation): Added deformation subsystem
The model must be able to deform to capture the shape induced by rotation or an external potential. Here we add the precription to descibe how we allow deformation. Note that the code to define how deformation is actually implemented is in the backend.
2026-11-09 13:11:29 -05:00
9760e46477 feat(equations): simplified the supported equation set
previously we modeled gravity as a mixed formulation. However, this turns out to not be needed with the improved surface prescription. Removing this and returning to a simpler gravity system dramatically reduces the number of unknowns and therefore speeds up the system.
2026-11-09 13:08:08 -05:00
48bc7d5472 feat(dimensions): added second partial type and new dimensions 2026-11-02 10:06:47 -05:00
9a7e4a7112 feat(equations): Loads of simple getters
The continuation and snapshotting systems needed more getters in order to reliably serialize a model. Added those getters
2026-10-14 11:16:29 -04:00
f353deef57 feat(discretization/quadrature): added rules getter 2026-10-14 11:15:02 -04:00
4c3a9ab3a2 docs(discretization/domain/schema/validation): updated docs and brought some imports over from the new backend/mfem 2026-10-14 11:14:25 -04:00
c2ec94b9b7 docs(discretization/domain/schema): removed some whitespace 2026-10-14 11:13:27 -04:00
7f3ebbae45 feat(discretization/domain): updated domain system to use unified mfem backend
This means that the domain system never directly uses mfem code any more
2026-10-14 11:01:33 -04:00
d2e43c82f1 feat(discretization): added implementation of checked_block_size
tho see the note in the header, this could be made more general likeley
2026-10-14 10:58:52 -04:00
d3ff5add71 feat(discretization): Added SystemLayout and associated helpers to allow for more robust access to parts of the block system 2026-10-14 10:57:52 -04:00
3ca1385a8c docs(Emily's-rules): added some new rules 2026-10-14 10:06:05 -04:00
5908f49e05 feat(dimensions): added InverseTimeSquared and GravitationalConstant 2026-10-14 10:05:40 -04:00
a9db87b834 feat(geometry/deformation/backend/mfem/detail): added reference tracking structs
Note, I say this in the todo's in the files too. This system is something of a holdover from the older MeanField system which used a bespoke (per module) caching system. We may want to consider ripping this out in favor of the more general depedencies graph system now that we have it in SERiF
2026-10-12 14:25:16 -04:00
0a1fb8d8db feat(geometry/deformation/backend/mfem): added radial_location implementation 2026-10-12 14:10:52 -04:00
eb9da56438 feat(geometry/deformation/backend/mfem/detail): added radial loactor to help identify points on a surface 2026-10-12 14:10:10 -04:00
c440134059 docs(mapping): added doxygen comments 2026-10-12 13:58:37 -04:00
546dc42d3e docs(mapping/compactification): added compactification documentation 2026-10-12 11:16:57 -04:00
eb521f3f01 feat(equations): Added point-wise datastructurs which equations return to the operator backend
These include all the information needed to integrate the global residual over the domain
2026-10-12 10:55:58 -04:00
0875831525 feat(equations): added rotation_force. This constrains the rotation force based on ridig rotation. When we add differential rotation we will need to dramatically modify this equation 2026-10-12 10:48:08 -04:00
51012252a0 docs(equations): removed old documentation from rigid rotation 2026-10-12 10:33:55 -04:00
f8bc1a37a5 feat(equations): added rigid rotation helper
This is a class which adds some helper utilities for computing the effective potential and the hessian of a body under rigid rotation. Note this is not an equation in and of itself
2026-10-12 10:33:24 -04:00
fee05a621d feat(equations): Added EquationRegistry
This is a compile time pack of equations which can be used to do things like say "this model is described by this set of equations"
2026-10-12 09:37:03 -04:00
cb2ac127aa feat(equations): added pressure_force equation
this equation describes the contribution of pressure to the mechanical balance of the system
2026-10-12 09:15:32 -04:00
1a222ef4b1 feat(equations): Added mixed formulation gravity equations
we solve gravity with a mixed formulation to avoid the loss of one order of accuracy while differentiating the potential.
2026-10-09 16:15:26 -04:00
747f37a10e docs(discretization/forms): made some small corrections 2026-10-09 15:59:51 -04:00
8154949bb7 docs(discretization/forms): expanded operand documentation with example 2026-10-09 15:55:57 -04:00
7432596642 docs(equations): added missing \f for latex rendering 2026-10-08 16:17:17 -04:00
9fd18d834a feat(equations): added mass normalization
This equation weakly constrains the total mass of the system to some prescribed mass by integrating the density over the volume
2026-10-08 16:16:34 -04:00
be9aec541f docs(equations): fixed missing * in doxygen comment preventing it from parsing right 2026-10-08 13:16:51 -04:00
9bd77a661f feat(equations): added hydrostatic_equilibrium equation 2026-10-08 13:11:09 -04:00
6a273fdd9d feat(equations): added gravity force equation. This computes the point-wise gravitational force (which is the residual as generally it should be minimzed). Note that I let the gradient = the negative gravitational acceleration 2026-10-08 12:23:27 -04:00
f2832d4c57 docs(equations): removed old docs 2026-10-08 12:01:20 -04:00
4336a93364 feat(equations): displacement_force
added equation that sums pressure, gravity, and rotation together to get the displacement force. Note that some of the dependencies of this have not been commited yet as they lack documentation
2026-10-08 11:59:57 -04:00
0eef623130 feat(equations): added contribution(s) which allows equations authors to more quickly write equations without writing the boiler plate required by the backend 2026-10-08 11:49:03 -04:00
78c78f6bd4 feat(equations): added compile time concepts and types
These help constrain what are valid equations at compile time thereby preventing invalid equations from causing runtime crashes due to missing methods and members (this does not validate anythinng about the physics of an equation, only that the form of the equation is right). Note that this is done at compile time rather than with runtime polymorphism to avoid both indirection cost but more imporantly to allow the compiler to more easily inline functions and preform other optimizations that indirection can hide.
2026-10-08 11:16:42 -04:00
c8c4b7515d docs(equations): removed some old docs 2026-10-08 11:15:00 -04:00
0571c63fad feat(equations): added central_density
This equation provides a constraint on central density through specific enthalpy (I think this is general so long as the eos can convert, though I wrote this for the barotropic case). This may need to be changed latter to be more general (though also generally we should not constrain central density). this is really there to deal with the specific non-rotating n=3 case where the central density is ill-defined due to a singularity.
2026-10-08 10:44:52 -04:00
ba6264e22c feat(equations): added material centering equation
this equation provides a residual that weakly enforces that some material point should remain at the origin
2026-10-08 10:30:03 -04:00
4cb34acc82 docs(equations): added contributions documentation 2026-10-08 10:28:50 -04:00
c7eab38e1d feat(equations): Added barotropic closure
This enforces that the model density and ethalpy are self consistent with the eos density from the model enthalpy
2026-10-08 09:32:19 -04:00