Peano
Loading...
Searching...
No Matches
PETScMain.py
Go to the documentation of this file.
1
# This file is part of the ExaHyPE2 project. For conditions of distribution and
2
# use, please see the copyright notice at www.peano-framework.org
3
import
peano4.runner.DefaultSequence
4
import
os
5
6
7
class
PETScMain
(
peano4.runner.DefaultSequence
):
8
9
def
__init__
(self,
10
project,
11
domain_offset,
12
domain_size
13
):
14
"""
15
16
project: peano4.Project
17
18
"""
19
super(PETScMain,self).
__init__
(project)
20
self.
overwrite
overwrite
=
True
21
22
self.
d
[
"Project_Name"
] = project.project_name
23
self.
d
[
"DomainOffset"
] =
"{"
+ str(domain_offset[0])
24
self.
d
[
"DomainSize"
] =
"{"
+ str(domain_size[0])
25
for
i
in
domain_offset[1:]:
26
self.
d
[
"DomainOffset"
] +=
", "
27
self.
d
[
"DomainOffset"
] += str(i)
28
for
i
in
domain_size[1:]:
29
self.
d
[
"DomainSize"
] +=
", "
30
self.
d
[
"DomainSize"
] += str(i)
31
self.
d
[
"DomainOffset"
] +=
"}"
32
self.
d
[
"DomainSize"
] +=
"}"
33
34
def
_get_header_file_template
(self):
35
templatefile_prefix = os.path.realpath(__file__).replace(
".pyc"
,
""
).replace(
".py"
,
""
)
36
return
templatefile_prefix+
".template.h"
37
38
39
def
_get_implementation_file_template
(self):
40
templatefile_prefix = os.path.realpath(__file__).replace(
".pyc"
,
""
).replace(
".py"
,
""
)
41
return
templatefile_prefix+
".template.cpp"
42
api.PETScMain.PETScMain
Definition
PETScMain.py:7
api.PETScMain.PETScMain.__init__
__init__(self, project, domain_offset, domain_size)
project: peano4.Project
Definition
PETScMain.py:13
api.PETScMain.PETScMain._get_header_file_template
_get_header_file_template(self)
Definition
PETScMain.py:34
api.PETScMain.PETScMain._get_implementation_file_template
_get_implementation_file_template(self)
Definition
PETScMain.py:39
api.PETScMain.PETScMain.overwrite
overwrite
Definition
PETScMain.py:20
peano4.runner.DefaultSequence.DefaultSequence
The default sequence sketches what Peano does if there's no main.
Definition
DefaultSequence.py:6
peano4.runner.DefaultSequence.DefaultSequence.d
d
Definition
DefaultSequence.py:22
peano4.runner.DefaultSequence.DefaultSequence.overwrite
overwrite
Definition
DefaultSequence.py:21
src
mghype
petsc
api
PETScMain.py
Generated on Fri Apr 11 2025 10:17:58 for Peano by
1.10.0