-- FreeFem++ v4.6 (Thu Apr 2 15:47:38 CEST 2020 - git v4.6) Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // 3D parallel plate capacitor problem 2 : // 3 : // Discussion: 4 : // 5 : // Solves the Laplace Equation on a parallel plate capacitor (dirichlet) boundary. 6 : // FE-Mesh and space functions are written to text files in order to be plot with 7 : // Matlab / Octave. 8 : // 9 : // This program requires the ffmatlib.idp include file, as well as access to 10 : // the msh3 and medit libraries. 11 : // 12 : // Licensing: 13 : // 14 : // Copyright (C) 2018 Chloros2 15 : // 16 : // This program is free software: you can redistribute it and/or modify it 17 : // under the terms of the GNU General Public License as published by 18 : // the Free Software Foundation, either version 3 of the License, or 19 : // (at your option) any later version. 20 : // 21 : // This program is distributed in the hopeC that it will be useful, but 22 : // WITHOUT ANY WARRANTY; without even the implied warranty of 23 : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 : // GNU General Public License for more details. 25 : // 26 : // You should have received a copy of the GNU General Public License 27 : // along with this program. If not, see 28 : // . 29 : // 30 : // Modified: 31 : // 32 : // 2018-05-19 33 : // 34 : // Author: 35 : // 36 : // Chloros2 37 : // 38 : 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