<commit_before>/* The Next Great Finite Element Library. */
/* Copyright (C) 2003  <NAME> */

/* 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 2.1 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 GNU */
/* Lesser General Public License for more details. */

/* You should have received a copy of the GNU Lesser General Public */
/* License along with this library; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */



// <h1>Eigenproblems Example 3 - Can you "hear the shape" of a drum?</h1>
//
//   By <NAME>
//
// The sound that a drum makes is determined by it's resonant frequencies,
// which are given by the eigenvalues of the Laplacian. "Can One Hear the
// Shape of a Drum?" was the title of an article by <NAME>
// in the American Mathematical Monthly in 1966, where he raised the question:
// If we know all the eigenvalues of a drum, can we uniquely determine it's shape?
// This question was resolved in 1992, when Gordon, Webb, and Wolpert constructed
// a pair of regions in 2D that have different shapes but identical eigenvalues.
// So the answer to Kac's question is negative: the spectrum of the Laplacian does
// not uniquely determine the shape of the domain.

// In this example, we compute the first few eigenvalues of the two domains proposed
// by Gordon, Webb and Wolpert. This amounts to solving a generalized eigenvalue
// problem in each case. The computed eigenvalues are stored in drum1_evals.txt and
// drum2_evals.txt. We can compare these to the (highly accurate) values reported in:
// <NAME>, "Eigenmodes of Isospectral Drums", SIAM Review, Vol. 39, No. 1, pp. 1-17, 1997.


// C++ include files
#include <fstream>

// libMesh include files.
#include "libmesh.h"
#include "mesh.h"
#include "mesh_generation.h"
#include "exodusII_io.h"
#include "condensed_eigen_system.h"
#include "equation_systems.h"
#include "fe.h"
#include "quadrature_gauss.h"
#include "dense_matrix.h"
#include "sparse_matrix.h"
#include "numeric_vector.h"
#include "dof_map.h"
#include "fe_interface.h"
#include "getpot.h"

// Bring in everything from the libMesh namespace
using namespace libMesh;


// Function prototype.  This is the function that will assemble<commit_msg>added Driscoll's reference eigenvalues to the comment in  eigenvalue_ex3<commit_after>/* The Next Great Finite Element Library. */
/* Copyright (C) 2003  <NAME> */

/* 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 2.1 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 GNU */
/* Lesser General Public License for more details. */

/* You should have received a copy of the GNU Lesser General Public */
/* License along with this library; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */



// <h1>Eigenproblems Example 3 - Can you "hear the shape" of a drum?</h1>
//
//   By <NAME>
//
// The sound that a drum makes is determined by it's resonant frequencies,
// which are given by the eigenvalues of the Laplacian. "Can One Hear the
// Shape of a Drum?" was the title of an article by <NAME>
// in the American Mathematical Monthly in 1966, where he raised the question:
// If we know all the eigenvalues of a drum, can we uniquely determine it's shape?
// This question was resolved in 1992, when Gordon, Webb, and Wolpert constructed
// a pair of regions in 2D that have different shapes but identical eigenvalues.
// So the answer to Kac's question is no: the spectrum of the Laplacian does
// not uniquely determine the shape of the domain.

// In this example, we compute the first few eigenvalues of the two domains proposed
// by Gordon, Webb and Wolpert. This amounts to solving a generalized eigenvalue
// problem in each case. The computed eigenvalues are stored in drum1_evals.txt and
// drum2_evals.txt. We can compare these to the (highly accurate) values reported in:
// <NAME>, "Eigenmodes of Isospectral Drums", SIAM Review, Vol. 39, No. 1, pp. 1-17, 1997.
//
// The first five eigenvalues from Driscoll are listed below (the author states that
// "all digits shown are believed to be correct"):
//  2.53794399980
//  3.65550971352
//  5.17555935622
//  6.53755744376
//  7.24807786256


// C++ include files
#include <fstream>

// libMesh include files.
#include "libmesh.h"
#include "mesh.h"
#include "mesh_generation.h"
#include "exodusII_io.h"
#include "condensed_eigen_system.h"
#include "equation_systems.h"
#include "fe.h"
#include "quadrature_gauss.h"
#include "dense_matrix.h"
#include "sparse_matrix.h"
#include "numeric_vector.h"
#include "dof_map.h"
#include "fe_interface.h"
#include "getpot.h"

// Bring in everything from the libMesh namespace
using namespace libMesh;


// Function prototype.  This is the function that will assemble
{'fraction_non_alphanumeric': 0.09338872832369942, 'fraction_numerical': 0.026914739884393062, 'mean_word_length': 3.7650602409638556, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3142755', 'n_tokens_mistral': 1711, 'n_tokens_neox': 1539, 'n_words': 773}