-- FreeFem++ v4.14 (mer. 06 mars 2024 16:59:04 CET - git v4.14-1-g2b2052ae) file : laplace_periodic.edp Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // laplace_periodic.edp 2 : // 3 : // Discussion: 4 : // 5 : // Solve the Laplace equation in the square with periodic boundary 6 : // conditions, and writes the resulting data to files, using the 7 : // ffmatlib() interface, for subsequent graphics processing by MATLAB or Octave. 8 : // 9 : // Licensing: 10 : // 11 : // Copyright (C) 2018 Chloros2 12 : // 13 : // This program is free software: you can redistribute it and/or modify it 14 : // under the terms of the GNU General Public License as published by 15 : // the Free Software Foundation, either version 3 of the License, or 16 : // (at your option) any later version. 17 : // 18 : // This program is distributed in the hope that it will be useful, but 19 : // WITHOUT ANY WARRANTY; without even the implied warranty of 20 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 : // GNU General Public License for more details. 22 : // 23 : // You should have received a copy of the GNU General Public License 24 : // along with this program. If not, see 25 : // . 26 : // 27 : // Modified: 28 : // 29 : // 2018-05-19 30 : // 31 : // Author: 32 : // 33 : // Chloros2 34 : // 35 : include "ffmatlib.idp"/*ffmatlib.idp Export Macros (Plot Solutions for Matlab and Octave) 2 : * 3 : * Author: Chloros2 4 : * Created: 2018-12-21 5 : * 6 : * This file is part of the ffmatlib which is hosted at 7 : * https://github.com/samplemaker/freefem_matlab_octave_plot 8 : * 9 : * Copyright (C) 2018 Chloros2 10 : * 11 : * This program is free software: you can redistribute it and/or modify it 12 : * under the terms of the GNU General Public License as published by 13 : * the Free Software Foundation, either version 3 of the License, or 14 : * (at your option) any later version. 15 : * 16 : * This program is distributed in the hope that it will be useful, but 17 : * WITHOUT ANY WARRANTY; without even the implied warranty of 18 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 : * GNU General Public License for more details. 20 : * 21 : * You should have received a copy of the GNU General Public License 22 : * along with this program. If not, see 23 : * . 24 : * 25 : */ 26 : 27 : //Save finite element connectivity (j-th degree of freedom for i-th element) 28 : macro ffSaveVh(Th, Vh, filename){ 29 # { 30 # ofstream file(filename); 31 # file.precision(10); 32 # for (int i=0; i