+%% -----------------------------------------------------------------------------
+%%
+%% SPDX-License-Identifier: LGPL-2.1-or-later
+%% Copyright (C) 2022 by Wolfgang Bangerth
+%%
+%% This file is part of the deal.II code gallery.
+%%
+%% -----------------------------------------------------------------------------
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% list of "exact" measurement values, z_hat %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% -----------------------------------------------------------------------------
+%%
+%% SPDX-License-Identifier: LGPL-2.1-or-later
+%% Copyright (C) 2022 by Wolfgang Bangerth
+%%
+%% This file is part of the deal.II code gallery.
+%%
+%% -----------------------------------------------------------------------------
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%% forward solver function %%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% -----------------------------------------------------------------------------
+%%
+%% SPDX-License-Identifier: LGPL-2.1-or-later
+%% Copyright (C) 2022 by Wolfgang Bangerth
+%%
+%% This file is part of the deal.II code gallery.
+%%
+%% -----------------------------------------------------------------------------
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% compute statistics on data set %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% -----------------------------------------------------------------------------
+%%
+%% SPDX-License-Identifier: LGPL-2.1-or-later
+%% Copyright (C) 2022 by Wolfgang Bangerth
+%%
+%% This file is part of the deal.II code gallery.
+%%
+%% -----------------------------------------------------------------------------
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% compute log probability, log pi %%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% -----------------------------------------------------------------------------
+%%
+%% SPDX-License-Identifier: LGPL-2.1-or-later
+%% Copyright (C) 2022 by Wolfgang Bangerth
+%%
+%% This file is part of the deal.II code gallery.
+%%
+%% -----------------------------------------------------------------------------
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%% Run MCMC sampler to estimate posterior distribution %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% -----------------------------------------------------------------------------
+%%
+%% SPDX-License-Identifier: LGPL-2.1-or-later
+%% Copyright (C) 2022 by Wolfgang Bangerth
+%%
+%% This file is part of the deal.II code gallery.
+%%
+%% -----------------------------------------------------------------------------
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% plots solution, u, to Poisson equation %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%% associated to theta and a 32x32 mesh %%%%%%%%%%%%%%%%%%%%%
+%% -----------------------------------------------------------------------------
+%%
+%% SPDX-License-Identifier: LGPL-2.1-or-later
+%% Copyright (C) 2022 by Wolfgang Bangerth
+%%
+%% This file is part of the deal.II code gallery.
+%%
+%% -----------------------------------------------------------------------------
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%% do all precomputations necessary for MCMC simulations %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+## -----------------------------------------------------------------------------
+##
+## SPDX-License-Identifier: LGPL-2.1-or-later
+## Copyright (C) 2022 by Wolfgang Bangerth
+##
+## This file is part of the deal.II code gallery.
+##
+## -----------------------------------------------------------------------------
+
import numpy as np
import scipy.sparse
from scipy.sparse.linalg import spsolve
-/* ---------------------------------------------------------------------
+/* -----------------------------------------------------------------------------
*
- * Copyright (C) 2019 by the deal.II authors and Wolfgang Bangerth.
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ * Copyright (C) 2019 by Wolfgang Bangerth
*
- * This file is part of the deal.II library.
+ * This file is part of the deal.II code gallery.
*
- * The deal.II library is free software; you can use it, 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 2.1 of the License, or (at your option) any later version.
- * The full text of the license can be found in the file LICENSE.md at
- * the top level directory of deal.II.
- *
- * ---------------------------------------------------------------------
-
+ * -----------------------------------------------------------------------------
*
* Author: Wolfgang Bangerth, Colorado State University, 2019.
*/
-
#include <deal.II/base/timer.h>
#include <deal.II/base/multithread_info.h>
#include <deal.II/grid/tria.h>