Skip to content

Post process causing crash of the code with reduced meshes #1878

Discussion options

You must be logged in to vote

A way to avoid this error is the following :

  • Load the JSON file and remove the PostProcess section.
    NB : The JSON musn't contain any comment, the module JSON doesn' support it. The module json5 seems to do it, but it is not installed by default...

  • Set the model properties to heatBoxDEIM and heatBoxMDEIM from this cutted JSON object

[...]
import json

feelpp.Environment.setConfigFile(casefile)
json_path = feelpp.Environment.expand('$cfgdir') + "/thermal-fin.json"

f = open(json_path, 'r')
j = json.load(f)
try:
    j.pop('PostProcess')
except KeyError as e:
    print(f"There was no section {e} in the model")

[...]

heatBoxDEIM = heat(dim=dim,order=1)
heatBoxDEIM.setModelProperties(j)…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@thomas-saigre
Comment options

thomas-saigre Jun 1, 2022
Collaborator Author

Comment options

thomas-saigre
Jun 1, 2022
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by prudhomm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants