getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

defining a field on the mesh dofs


From: Lesage,Anne Cecile J
Subject: defining a field on the mesh dofs
Date: Wed, 1 Dec 2021 21:42:01 +0000

Dear all

 

I would like to define a non-constant pressure field on the mesh dofs

I would like to read the value from an ascii file

 

I am thinking of using the following python scripting

 

import numpy as np

 

file = open('pfield.txt', 'r') # 'r' = read

pfield = np.loadtxt(file,dtype=fload)

 

md.add_fem_data(“pc”,mfp)

md.set_variable("pc", pfield)

 

Will it be correct to use pc in building a week form?

 

Thank you

Regards

Anne-Cecile

 

 

 

 

 

 

 

The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]