To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 836c82f2 authored by Cyrill Mast's avatar Cyrill Mast
Browse files

__str__() formatted

parent f82cf1b8
...@@ -105,12 +105,14 @@ class BaseYosioka(BaseSphereFrequencyComposite): ...@@ -105,12 +105,14 @@ class BaseYosioka(BaseSphereFrequencyComposite):
['Frequency', 'f', self.f, 'Hz'], ['Frequency', 'f', self.f, 'Hz'],
['Pressure', 'p_0', self.p_0, 'Pa'], ['Pressure', 'p_0', self.p_0, 'Pa'],
['Position', 'pos', self.position, 'm'], ['Position', 'pos', self.position, 'm'],
['Wavelength', 'lambda', self.field.lambda_f, 'm'] ['Wavelength', 'lambda', self.field.lambda_f, 'm'],
['Wavetype', 'wavetype', self.wave_type, ''],
['Number of Iterations', 'n_max', self.n_max, '']
] ]
for p in param_general: for p in param_general:
out += SF.get_str_text(p[0], p[1], p[2], p[3]) out += SF.get_str_text(p[0], p[1], p[2], p[3])
out += '\n'
out += 'Fluid\n' out += 'Fluid: \n'
param_fluid = [ param_fluid = [
['Density', 'rho_f', self.rho_f, 'kg/m^3'], ['Density', 'rho_f', self.rho_f, 'kg/m^3'],
['Sound Speed', 'c_0', self.c_f, 'm/s'], ['Sound Speed', 'c_0', self.c_f, 'm/s'],
...@@ -118,8 +120,8 @@ class BaseYosioka(BaseSphereFrequencyComposite): ...@@ -118,8 +120,8 @@ class BaseYosioka(BaseSphereFrequencyComposite):
] ]
for p in param_fluid: for p in param_fluid:
out += SF.get_str_text(p[0], p[1], p[2], p[3]) out += SF.get_str_text(p[0], p[1], p[2], p[3])
out += '\n'
out += 'Particle\n' out += 'Particle: \n'
param_solid = [ param_solid = [
['Radius', 'R_0', self.R_0, 'm'], ['Radius', 'R_0', self.R_0, 'm'],
['Density', 'rho_s', self.rho_s, 'kg/m^3'], ['Density', 'rho_s', self.rho_s, 'kg/m^3'],
......
...@@ -339,6 +339,9 @@ class TestYosiokaARF(BaseTest): ...@@ -339,6 +339,9 @@ class TestYosiokaARF(BaseTest):
except NotImplementedError: except NotImplementedError:
pass pass
def test_str(self) -> None:
print(self.cls_general.__str__())
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment