-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2024 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# Author : Anthony Geay (CEA/DEN)
-from MEDCoupling import *
+from medcoupling import *
import math
import os
targetMesh.setName("MyMesh3D");
targetMesh.setDescription("build3DMesh");
targetMesh.allocateCells(12);
- for i in xrange(8):
+ for i in range(8):
targetMesh.insertNextCell(NORM_HEXA8,8,targetConn[8*i:8*(i+1)]);
pass
targetMesh.finishInsertingCells();
targetMesh=MEDCouplingCurveLinearMesh();
targetMesh.setTime(2.3,4,5);
targetMesh.setTimeUnit("us");
- targetMesh.setName("Example of Cuve linear mesh");
+ targetMesh.setName("Example of Curve linear mesh");
targetMesh.setDescription("buildCLMesh");
a1=DataArrayDouble(3*20,1);
a1.iota(7.) ; a1.rearrange(3);
f.setGaussLocalizationOnType(NORM_QUAD4,_refCoo2,_gsCoo1,_wg1);
array=DataArrayDouble.New();
ptr=18*2*[None]
- for i in xrange(18*2):
+ for i in range(18*2):
ptr[i]=float(i+1);
pass
array.setValues(ptr,18,2);
f.setDescription("MyDescriptionNE");
array=DataArrayDouble.New();
ptr=18*2*[None]
- for i in xrange(18*2):
+ for i in range(18*2):
ptr[i]=float(i+7)
array.setValues(ptr,18,2);
array.setInfoOnComponent(0,"Power [MW]");