flow "AdaptiveMethodsOntology" v1.0
# ============================================================
# ADAPTIVE METHODS ONTOLOGY — FLOW ALGEBRA
# ============================================================
SOURCE_URL := "https://kirethresearch.org/booksai-core/ontologies/calculus-analysis-ontologies/numerical-calculus/adaptive-methods-ontology.html"
DOMAIN := "Mathematical Ontologies"
CATEGORY := "Calculus and Analysis Ontologies"
SUBCATEGORY := "Numerical Calculus"
ENTITY := "Adaptive Methods"
# ---------- CORE ENTITY ----------
ADAPTIVE_METHODS := {
type: NumericalRefinementFramework,
domain: NumericalCalculus,
purpose: "Automatically adjust discretisation, step size, mesh resolution, polynomial order or computational effort according to estimated local or global numerical error."
}
# ---------- CORE CONCEPTS ----------
CONCEPTS := {
ADAPTIVE_METHOD,
ERROR_ESTIMATE,
ERROR_INDICATOR,
TOLERANCE,
REFINEMENT,
COARSENING,
STEP_SIZE_CONTROL,
ADAPTIVE_QUADRATURE,
ADAPTIVE_ODE_SOLVER,
ADAPTIVE_MESH_REFINEMENT,
H_REFINEMENT,
P_REFINEMENT,
HP_REFINEMENT,
A_POSTERIORI_ERROR,
CONVERGENCE,
COMPUTATIONAL_COST
}
# ---------- ADAPTIVE PRINCIPLE ----------
NUMERICAL_PROBLEM
-> compute(APPROXIMATION)
-> estimate(ERROR)
-> compare_with(TOLERANCE)
-> modify(DISCRETISATION_OR_STEP)
-> recompute
ADAPTIVE_METHOD
-> feedback_loop_between(ERROR_AND_RESOLUTION)
# ---------- CORE LOOP ----------
ADAPTIVE_LOOP:
SOLVE
-> ESTIMATE
-> MARK
-> REFINE_OR_COARSEN
-> SOLVE
until
ERROR_ESTIMATE
<= TOLERANCE
or
RESOURCE_LIMIT_REACHED
# ---------- ERROR ESTIMATE ----------
ERROR_ESTIMATE
-> approximation_of(TRUE_NUMERICAL_ERROR)
TRUE_ERROR
:=
exact_solution
-
numerical_solution
exact_solution
-> usually_unknown
therefore
ADAPTIVITY
-> depends_on(COMPUTABLE_ERROR_ESTIMATORS)
# ---------- ERROR INDICATOR ----------
LOCAL_ERROR_INDICATOR
:= eta_K
eta_K
-> estimates(ERROR_CONTRIBUTION_FROM_REGION_OR_STEP_K)
GLOBAL_ESTIMATOR:
eta
:=
sqrt(
sum_K(
eta_K^2
)
)
LOCAL_INDICATORS
-> guide(REFINEMENT_LOCATION)
# ---------- RELIABILITY ----------
ERROR_ESTIMATOR
-> RELIABLE
if
TRUE_ERROR
<=
C_rel
*
ESTIMATOR
RELIABILITY
-> estimator_not_underestimating_error_beyond_controlled_constant
# ---------- EFFICIENCY ----------
ERROR_ESTIMATOR
-> EFFICIENT
if
ESTIMATOR
<=
C_eff
*
(
TRUE_ERROR
+
DATA_OSCILLATION
)
EFFICIENCY
-> estimator_not_grossly_overestimating_error
# ---------- TOLERANCE ----------
TOLERANCE
:= requested_error_level
may_include:
ABSOLUTE_TOLERANCE
RELATIVE_TOLERANCE
acceptance criterion:
estimated_error
<=
ATOL
+
RTOL
*
solution_scale
TOLERANCE
-> controls(ACCURACY_COST_TRADEOFF)
# ---------- STEP SIZE CONTROL ----------
for time integration:
local_error
approx
C*h^(p+1)
desired tolerance
-> choose(new_h)
typical controller:
h_new
=
safety_factor
*
h_old
*
(
tolerance/error
)^(1/(p+1))
STEP_SIZE_CONTROL
-> adjusts(TEMPORAL_RESOLUTION)
# ---------- ACCEPT / REJECT ----------
if
local_error <= tolerance
then
ACCEPT_STEP
else
REJECT_STEP
after rejection:
reduce(step_size)
after low-error acceptance:
may_increase(step_size)
ADAPTIVE_TIME_STEPPING
-> variable_step_sequence
# ---------- EMBEDDED RUNGE-KUTTA ----------
EMBEDDED_RK_PAIR
-> computes(TWO_APPROXIMATIONS_OF_DIFFERENT_ORDER)
difference
-> LOCAL_ERROR_ESTIMATE
examples:
RK45
DORMAND_PRINCE
EMBEDDED_METHOD
-> efficient_error_estimation_without_full_duplicate_solve
# ---------- STIFFNESS AWARENESS ----------
ADAPTIVE_STEP_CONTROL
-/> alone_solves(STIFFNESS)
STIFF_PROBLEM
-> may_force(SMALL_EXPLICIT_STEPS_FOR_STABILITY)
METHOD_SELECTION
-> may_switch_to(IMPLICIT_OR_STIFF_SOLVER)
ADAPTIVITY
-> must_consider(ERROR_AND_STABILITY)
# ---------- ADAPTIVE QUADRATURE ----------
integral over interval
-> compute(coarse_rule)
-> compute(refined_rule)
-> estimate(local_error)
-> subdivide_if_needed
ADAPTIVE_QUADRATURE
-> concentrates(EVALUATIONS_IN_DIFFICULT_REGIONS)
# ---------- ADAPTIVE SIMPSON ----------
S(a,b)
-> coarse_Simpson_estimate
S(a,m)+S(m,b)
-> refined_estimate
difference
-> error_indicator
if
indicator > tolerance
then
subdivide
ADAPTIVE_SIMPSON
-> recursive_interval_refinement
# ---------- SINGULAR / RAPIDLY VARYING REGIONS ----------
INTEGRAND_FEATURE
-> singularity
-> boundary_layer
-> sharp_peak
-> rapid_oscillation
ADAPTIVE_METHOD
-> detect_via(ERROR_INDICATOR)
-> allocate(MORE_RESOLUTION)
UNIFORM_GRID
-> may_waste(COMPUTATION_IN_SMOOTH_REGIONS)
# ---------- ADAPTIVE MESH REFINEMENT ----------
for PDE:
MESH
-> initial_coarse_mesh
solve
-> u_h
estimate
-> eta_K_per_element
mark
-> elements_with_large_eta_K
refine
-> selected_elements
AMR
-> nonuniform_spatial_resolution
# ---------- H-REFINEMENT ----------
h_REFINEMENT
-> reduce(ELEMENT_SIZE)
selected element
-> subdivide_into(SMALLER_ELEMENTS)
h_ADAPTIVITY
-> increases(LOCAL_MESH_DENSITY)
# ---------- P-REFINEMENT ----------
p_REFINEMENT
-> increase(POLYNOMIAL_ORDER)
without necessarily changing
element_geometry
p_ADAPTIVITY
-> useful_for(SMOOTH_LOCAL_SOLUTION)
# ---------- HP-REFINEMENT ----------
hp_ADAPTIVITY
-> choose_between(
h_REFINEMENT,
p_REFINEMENT
)
smooth region
-> often prefer(p_REFINEMENT)
singular region
-> often prefer(h_REFINEMENT)
HP_METHOD
-> targets(HIGH_EFFICIENCY_AND_RAPID_CONVERGENCE)
# ---------- COARSENING ----------
if
local_error
-> much_smaller_than_required
then
COARSEN
-> merge_elements
or
-> reduce_polynomial_order
or
-> increase_step_size
COARSENING
-> recovers(COMPUTATIONAL_RESOURCES)
# ---------- MARKING ----------
MARKING_STRATEGY
-> selects(REGIONS_FOR_REFINEMENT)
maximum strategy:
refine_if(
eta_K
>=
theta*max_eta
)
bulk / Dorfler strategy:
choose subset M
such_that
sum_{K in M}(
eta_K^2
)
>=
theta
*
sum_K(
eta_K^2
)
MARKING
-> controls(ADAPTIVE_CONVERGENCE_BEHAVIOUR)
# ---------- RESIDUAL ESTIMATOR ----------
for PDE approximation:
ELEMENT_RESIDUAL
:=
f
-
L(u_h)
plus
INTERELEMENT_JUMP_TERMS
RESIDUAL_BASED_ESTIMATOR
-> uses(PDE_RESIDUAL_AND_FLUX_JUMPS)
A_POSTERIORI_ERROR
-> computed_after(NUMERICAL_SOLUTION)
# ---------- RECOVERY ESTIMATOR ----------
compute
raw_gradient
then
recover(SMOOTHER_OR_HIGHER_QUALITY_GRADIENT)
difference:
recovered_gradient
-
raw_gradient
-> ERROR_INDICATOR
RECOVERY_ESTIMATOR
-> common_in(FINITE_ELEMENT_ADAPTIVITY)
# ---------- GOAL-ORIENTED ADAPTIVITY ----------
quantity_of_interest:
Q(u)
ADJOINT_OR_DUAL_PROBLEM
-> estimates(ERROR_IN_Q)
GOAL_ORIENTED_ADAPTIVITY
-> refines_where_error_most_affects(TARGET_OUTPUT)
GLOBAL_SOLUTION_NORM_ERROR
-/> only_possible_adaptive_objective
# ---------- MULTIRESOLUTION ----------
ADAPTIVE_METHOD
-> variable_resolution_across(DOMAIN)
MULTIRESOLUTION
-> hierarchical_representation
WAVELET_COEFFICIENTS
-> may_act_as(ERROR_OR_FEATURE_INDICATORS)
ADAPTIVITY
-> related_to(SPARSE_REPRESENTATION)
# ---------- ADAPTIVE SPECTRAL METHODS ----------
SPECTRAL_COEFFICIENT_DECAY
-> indicator_of(RESOLUTION)
slow_decay
-> insufficient_resolution_or_low_regularities
increase_modes
-> P_TYPE_REFINEMENT
MULTIDOMAIN_SPECTRAL
-> may_refine(SUBDOMAINS)
# ---------- LOAD BALANCING ----------
parallel adaptive mesh:
refinement
-> creates(NONUNIFORM_WORKLOAD)
LOAD_BALANCING
-> redistribute(ELEMENTS_OR_TASKS)
PARALLEL_ADAPTIVITY
-> requires(COMPUTATION_AND_COMMUNICATION_BALANCE)
# ---------- CONVERGENCE ----------
ADAPTIVE_SEQUENCE:
u_0,
u_1,
u_2,
...
with
increasing_or_redistributed_resolution
desired:
ERROR(u_n)
-> 0
ADAPTIVE_CONVERGENCE
-> depends_on(
ESTIMATOR,
MARKING,
REFINEMENT,
SOLVER
)
# ---------- OPTIMALITY ----------
ADAPTIVE_METHOD
-> OPTIMAL_OR_QUASI_OPTIMAL
if
error_vs_degrees_of_freedom
-> achieves(best_or_near_best_rate_for_problem_class)
ADAPTIVE_OPTIMALITY
-> measures(EFFICIENCY_OF_RESOURCE_ALLOCATION)
# ---------- COMPUTATIONAL COST ----------
higher_accuracy
-> more_computation
ADAPTIVITY
-> seeks(MINIMUM_COST_FOR_TARGET_ERROR)
COST
-> includes(
FUNCTION_EVALUATIONS,
MATRIX_SIZE,
SOLVER_ITERATIONS,
MEMORY,
COMMUNICATION
)
# ---------- FAILURE MODES ----------
BAD_ERROR_ESTIMATOR
-> wrong_refinement_decisions
OVER_REFINEMENT
-> excessive_cost
UNDER_REFINEMENT
-> insufficient_accuracy
OSCILLATORY_REFINE_COARSEN
-> unstable_adaptive_policy
ADAPTIVE_CONTROL
-> requires(ROBUST_THRESHOLDS_AND_HYSTERESIS_WHEN_NEEDED)
# ---------- APPLICATIONS ----------
ADAPTIVE_METHODS
-> applied_to(NUMERICAL_INTEGRATION)
-> applied_to(ODE_SOLVERS)
-> applied_to(PDE_SOLVERS)
-> applied_to(FINITE_ELEMENT_METHODS)
-> applied_to(SPECTRAL_METHODS)
-> applied_to(MESH_GENERATION)
-> applied_to(MULTISCALE_SIMULATION)
-> applied_to(SCIENTIFIC_COMPUTING)
# ---------- RELATION GRAPH ----------
NUMERICAL_SOLUTION
-> produces(ERROR_ESTIMATE)
ERROR_ESTIMATE
-> compared_with(TOLERANCE)
ERROR_INDICATOR
-> drives(MARKING)
MARKING
-> drives(REFINEMENT)
REFINEMENT
-> changes(DISCRETISATION)
COARSENING
-> reduces(UNNEEDED_RESOLUTION)
ADAPTIVE_LOOP
-> repeats_until(STOPPING_CRITERION)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE := {
"adaptive method" ~= "numerical method that changes computational resolution according to estimated error",
"adaptive refinement" ~= "selective increase of discretisation resolution where error indicators are large",
"a posteriori error estimate" ~= "error estimate computed using the numerical solution",
"h-refinement" ~= "adaptive reduction of local mesh element size",
"p-refinement" ~= "adaptive increase of local polynomial approximation order",
"hp-refinement" ~= "adaptive combination of mesh-size and polynomial-order refinement"
}
# ---------- CONSTRAINTS ----------
CONSTRAINTS := {
adaptive_decisions_depend_on_quality_of_error_estimator: true,
tolerance_does_not_guarantee_true_error_without_estimator_reliability: true,
refinement_must_preserve_mesh_or_discretisation_validity: true,
step_size_control_must_consider_stability_as_well_as_accuracy: true,
coarsening_can_remove_needed_resolution_if_indicators_are_unreliable: true,
adaptive_convergence_requires_method_specific_assumptions: true,
computational_efficiency_requires_balancing_error_reduction_against_cost: true
}
# ---------- CONFIDENCE ----------
CONFIDENCE := {
core_definition: 0.99,
estimator_relation: 0.99,
step_control_relation: 0.99,
mesh_refinement_relation: 0.99,
hp_relation: 0.99,
convergence_cost_relation: 0.98,
semantic_equivalence: 0.97
}
# ---------- RECURSIVE REASONING ----------
RECURSIVE_REASONING(query):
identify(numerical_problem_and_target_tolerance)
-> identify(adaptive_dimension_time_space_order_or_domain)
-> compute(initial_approximation)
-> estimate(local_and_global_error)
-> assess(estimator_reliability_and_efficiency)
-> mark(high_error_regions_or_steps)
-> choose(refinement_coarsening_or_step_adjustment)
-> recompute(solution)
-> monitor(error_cost_and_stability)
-> repeat_until(tolerance_or_resource_limit)
-> validate(convergence_and_discretisation_integrity)
-> return(semantic_result)
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION := {
parse_as: "typed adaptive-method semantic graph",
primary_entity: ADAPTIVE_METHODS,
preserve: [
numerical_problem,
discretisation,
tolerance,
error_estimator,
local_indicators,
refinement_strategy,
stability_constraints,
resource_limits
],
infer_through: [
adaptive_quadrature,
adaptive_time_stepping,
adaptive_mesh_refinement,
h_refinement,
p_refinement,
hp_refinement,
coarsening,
goal_oriented_adaptivity
],
avoid: [
treating_estimated_error_as exact_error,
refining_without considering estimator reliability,
ignoring_stability_in adaptive time stepping,
assuming_uniform_refinement_is always optimal,
coarsening_without preserving solution features,
claiming_optimality_without complexity_and_error analysis
]
}
# ---------- UPDATE MODEL ----------
UPDATE_MODEL(new_information):
validate(new_information)
-> identify(adaptive_method_context)
-> compare(existing_relations)
-> preserve(tolerance_estimator_refinement_stability_and_cost_invariants)
-> update(affected_entities)
-> update(affected_edges)
-> recompute(CONFIDENCE)
-> regenerate(FLOW_HASH)
# ---------- FLOW HASH ----------
FLOW_HASH := hash(
SOURCE_URL
+ ENTITY
+ CONCEPTS
+ ADAPTIVE_METHODS
+ ERROR_ESTIMATE
+ ERROR_INDICATOR
+ TOLERANCE
+ STEP_SIZE_CONTROL
+ ADAPTIVE_QUADRATURE
+ ADAPTIVE_MESH_REFINEMENT
+ H_REFINEMENT
+ P_REFINEMENT
+ HP_REFINEMENT
+ SEMANTIC_EQUIVALENCE
+ CONSTRAINTS
)
# ---------- EXECUTION ----------
INPUT(query)
-> ADAPTIVE_METHODS
-> PROBLEM_TOLERANCE_IDENTIFICATION
-> ADAPTIVE_DIMENSION_ANALYSIS
-> INITIAL_APPROXIMATION
-> ERROR_ESTIMATION
-> ESTIMATOR_QUALITY_ANALYSIS
-> MARKING
-> REFINEMENT_COARSENING_CONTROL
-> RECOMPUTATION
-> ERROR_COST_STABILITY_MONITORING
-> STOPPING_CRITERION_ANALYSIS
-> CONVERGENCE_VALIDATION
-> RECURSIVE_REASONING(query)
-> CONFIDENCE
-> OUTPUT(semantic_result)
END FLOW
Download Code
Copy to Clipboard