fix bug in program printing
This commit is contained in:
parent
7f9ed4f632
commit
00caa1aa7e
2 changed files with 489 additions and 437 deletions
|
|
@ -150,13 +150,13 @@ class FieldBase (object):
|
|||
|
||||
|
||||
def code_decl (self):
|
||||
real_array_alloc = "allocate({0}({1}), stat=ierr) ; {0} = 0."
|
||||
return real_array_alloc.format(self.name, self.shape)
|
||||
|
||||
def code_alloc (self):
|
||||
real_array_decl = "real*8, allocatable, dimension({1}) :: {0}"
|
||||
return real_array_decl.format(self.name, self.dim)
|
||||
|
||||
def code_alloc (self):
|
||||
real_array_alloc = "allocate({0}({1}), stat=ierr) ; {0} = 0."
|
||||
return real_array_alloc.format(self.name, self.shape)
|
||||
|
||||
def code_free (self):
|
||||
real_array_free = "deallocate({})"
|
||||
return real_array_free.format(self.name)
|
||||
|
|
@ -248,6 +248,16 @@ class PrimaryField (FieldBase):
|
|||
def code (self):
|
||||
return "! {} is read from file".format(self.name)
|
||||
|
||||
def code_decl (self):
|
||||
return "! {} is read from file".format(self.name)
|
||||
|
||||
def code_alloc (self):
|
||||
return "! {} is read from file".format(self.name)
|
||||
|
||||
def code_free (self):
|
||||
return "! {} is read from file".format(self.name)
|
||||
|
||||
|
||||
|
||||
class DerivedField (FieldBase):
|
||||
|
||||
|
|
@ -484,8 +494,8 @@ class Stage3():
|
|||
set1.sort()
|
||||
set2.sort()
|
||||
|
||||
avg1 = "\n".join(allvar[v].code() for v in set1)
|
||||
avg2 = "\n".join(allvar[v].code() for v in set2)
|
||||
avg1 = "\n".join(allvar[v].code_avg() for v in set1)
|
||||
avg2 = "\n".join(allvar[v].code_avg() for v in set2)
|
||||
|
||||
|
||||
hfmt = 'character (len = *), parameter :: output_header="{}"'
|
||||
|
|
|
|||
904
code/m_terms.f90
904
code/m_terms.f90
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue