Package sfc :: Package dofcode
[hide private]
[frames] | no frames]

Source Code for Package sfc.dofcode

 1  # -*- coding: utf-8 -*- 
 2  """ 
 3  This module contains code for the class Dof_Ptv and its related components. 
 4  """ 
 5   
 6  # Copyright (C) 2008 Martin Sandve Alnes and Simula Resarch Laboratory 
 7  # 
 8  # This file is part of SyFi. 
 9  # 
10  # SyFi is free software: you can redistribute it and/or modify 
11  # it under the terms of the GNU General Public License as published by 
12  # the Free Software Foundation, either version 2 of the License, or 
13  # (at your option) any later version. 
14  # 
15  # SyFi is distributed in the hope that it will be useful, 
16  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
17  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
18  # GNU General Public License for more details. 
19  # 
20  # You should have received a copy of the GNU General Public License 
21  # along with SyFi. If not, see <http://www.gnu.org/licenses/>. 
22  # 
23  # First added:  2008-09-03 
24  # Last changed: 2008-09-03 
25   
26  from sfc.dofcode.Ptv import Ptv 
27  from sfc.dofcode.DofT import DofT 
28  from sfc.dofcode.Dof_Ptv import Dof_Ptv 
29   
30 -def gen_utility_code(hfilename):
31 name = hfilename.split(".")[0] 32 if name == "Ptv": 33 return name, Ptv.header, Ptv.implementation 34 if name == "DofT": 35 return name, DofT.header, DofT.implementation 36 if name == "Dof_Ptv": 37 return name, Dof_Ptv.header, Dof_Ptv.implementation 38 raise RuntimeError("Unknown utility '%s'." % hfilename)
39