2020# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121# SOFTWARE.
2222
23- """
24- MeshInfo
25-
26- """
23+ """MeshInfo."""
2724
2825from ansys .dpf .core import server as server_module
2926from ansys .dpf .core .generic_data_container import GenericDataContainer
@@ -66,7 +63,7 @@ def __init__(
6663 mesh_info = None ,
6764 server = None ,
6865 ):
69- """Initialize with a MeshInfo message"""
66+ """Initialize with a MeshInfo message. """
7067 # ############################
7168 # step 1: get server
7269
@@ -90,6 +87,14 @@ def __init__(
9087 self ._bodies_map = None
9188
9289 def __str__ (self ):
90+ """
91+ Return a string representation of the MeshInfo instance.
92+
93+ Returns
94+ -------
95+ str
96+ A string representation of the information about a mesh space.
97+ """
9398 txt = "DPF MeshInfo\n "
9499 txt += "-" * 30 + "\n "
95100 txt += "with properties:\n "
@@ -101,8 +106,7 @@ def __str__(self):
101106
102107 @property
103108 def generic_data_container (self ) -> GenericDataContainer :
104- """GenericDataContainer wrapped into the MeshInfo
105- that contains all the relative information of the derived class.
109+ """GenericDataContainer wrapped into the MeshInfo that contains all the relative information of the derived class.
106110
107111 Returns
108112 -------
@@ -113,9 +117,7 @@ def generic_data_container(self) -> GenericDataContainer:
113117
114118 @generic_data_container .setter
115119 def generic_data_container (self , value : GenericDataContainer ):
116- """GenericDataContainer wrapped into the MeshInfo
117- that contains all the relative information of the derived class.
118- """
120+ """GenericDataContainer wrapped into the MeshInfo that contains all the relative information of the derived class."""
119121 if not isinstance (value , GenericDataContainer ):
120122 raise ValueError ("Input value must be a GenericDataContainer." )
121123 self ._generic_data_container = value
@@ -169,7 +171,8 @@ def set_property(self, property_name, prop):
169171
170172 @property
171173 def number_nodes (self ):
172- """
174+ """Returns number of nodes in the mesh.
175+
173176 Returns
174177 -------
175178 number_nodes : int
@@ -179,7 +182,8 @@ def number_nodes(self):
179182
180183 @property
181184 def number_faces (self ):
182- """
185+ """Returns number of faces in the mesh.
186+
183187 Returns
184188 -------
185189 number_faces : int
@@ -192,7 +196,8 @@ def number_faces(self):
192196
193197 @property
194198 def number_elements (self ):
195- """
199+ """Returns number of elements in the mesh.
200+
196201 Returns
197202 -------
198203 number_elements : int
@@ -205,7 +210,8 @@ def number_elements(self):
205210
206211 @property
207212 def splittable_by (self ):
208- """
213+ """Return name of properties according to which the mesh can be split by.
214+
209215 Returns
210216 -------
211217 splittable by which entity : StringField
@@ -218,7 +224,8 @@ def splittable_by(self):
218224
219225 @property
220226 def available_elem_types (self ):
221- """
227+ """Returns available mesh element types.
228+
222229 Returns
223230 -------
224231 available element types : Scoping
@@ -231,7 +238,8 @@ def available_elem_types(self):
231238
232239 @property
233240 def part_names (self ):
234- """
241+ """Return part names of the mesh.
242+
235243 Returns
236244 -------
237245 part_names : StringField
@@ -267,7 +275,8 @@ def parts(self) -> dict:
267275
268276 @property
269277 def part_scoping (self ):
270- """
278+ """Return part scoping of the mesh.
279+
271280 Returns
272281 -------
273282 part_scoping : Scoping
@@ -283,7 +292,8 @@ def part_scoping(self):
283292
284293 @property
285294 def body_names (self ):
286- """
295+ """Return body names of the mesh.
296+
287297 Returns
288298 -------
289299 body_names : StringField
@@ -296,7 +306,8 @@ def body_names(self):
296306
297307 @property
298308 def body_scoping (self ):
299- """
309+ """Return body scoping of the mesh.
310+
300311 Returns
301312 -------
302313 body_scoping : Scoping
@@ -332,7 +343,8 @@ def bodies(self) -> dict:
332343
333344 @property
334345 def zone_names (self ):
335- """
346+ """Return zone names of the mesh.
347+
336348 Returns
337349 -------
338350 zone_names : StringField
@@ -423,7 +435,8 @@ def cell_zones(self) -> dict:
423435
424436 @property
425437 def zone_scoping (self ):
426- """
438+ """Return zone scoping of the mesh.
439+
427440 Returns
428441 -------
429442 zone_scoping : Scoping
@@ -439,20 +452,20 @@ def zone_scoping(self):
439452
440453 @number_nodes .setter
441454 def number_nodes (self , value ):
442- """Set the number of nodes in the mesh"""
455+ """Set the number of nodes in the mesh. """
443456 self .generic_data_container .set_property ("num_nodes" , value )
444457
445458 @number_elements .setter
446459 def number_elements (self , value ):
447- """Set the number of elements in the mesh"""
460+ """Set the number of elements in the mesh. """
448461 self .generic_data_container .set_property ("num_elements" , value )
449462
450463 @splittable_by .setter
451464 def splittable_by (self , value ):
452- """Set name of the properties according to which the mesh can be split by"""
465+ """Set name of the properties according to which the mesh can be split by. """
453466 self .generic_data_container .set_property ("splittable_by" , value )
454467
455468 @available_elem_types .setter
456469 def available_elem_types (self , value ):
457- """Set the available element types"""
470+ """Set the available element types. """
458471 self .generic_data_container .set_property ("available_elem_types" , value )
0 commit comments