-- FreeFem++ v4.6 (Thu Apr 2 15:47:38 CEST 2020 - git v4.6) Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // Discussion: 2 : // 3 : // Solve the Poisson equation over the L-shaped region. 4 : // 5 : // Export the data, using ffmatlib, for graphic processing by MATLAB or Octave. 6 : // 7 : // Licensing: 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 hopeC 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 : // Modified: 26 : // 27 : // 2018-05-19 28 : // 29 : // Author: 30 : // 31 : // Chloros2 32 : // 33 : 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