Library NumAnalysis.FEM.FE_examples

This file is part of the Rocq Numerical Analysis library
Copyright (C) Boldo, Clément, Martin, Mayero
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the COPYING file for more details.

Description

Definition and shape functions of FE_LagP2k (from affine independent vertices).

From NumAnalysis Require Import stdlib_wR ssr_wMC.

From Coquelicot Require Import Hierarchy.
Close Scope R_scope.

From NumAnalysis Require Import FEM_wDep.

Section FE_LagP2k.

Context {k : nat}.
Hypothesis neq_k_0 : k ≠ O.

Definition FE_LagP2k_ref : FE 2 := FE_LagPSdSk_ref neq_2_0 neq_k_0.
Definition shape_fun_LagP2k_ref := shape_fun FE_LagP2k_ref.

Context {vtx : [0..2] → 'R^2}.
Hypothesis Hvtx : aff_indep_ms vtx.

Definition FE_LagP2k : FE 2 := FE_LagPSdSk neq_2_0 neq_k_0 Hvtx.
Definition shape_fun_LagP2k := shape_fun FE_LagP2k.

End FE_LagP2k.

Section FE_LagP21.

Context {vtx : [0..2] → 'R^2}.
Hypothesis Hvtx : aff_indep_ms vtx.

Definition FE_LagP21 : FE 2 := FE_LagP2k neq_1_0 Hvtx.
Definition shape_fun_LagP21 := shape_fun_LagP2k neq_1_0 Hvtx.

Lemma shape_fun_LagP21_correct : shape_fun_LagP21 = LagPd1 Hvtx.
Proof.
unfold shape_fun_LagP21, shape_fun_LagP2k.
rewrite shape_fun_LagPSd1_correct; apply castF_refl.
Qed.

End FE_LagP21.