InputData Namespace Reference

Functions

def LoadPebbles (OPT, DATA)
 
def LoadMesh (OPT, DATA)
 

Function Documentation

◆ LoadMesh()

def InputData.LoadMesh (   OPT,
  DATA 
)
27 def LoadMesh(OPT, DATA):
28  from stl import mesh
29  filename = OPT['stlInputDir'] + OPT['stlFileName']
30  stl_mesh = mesh.Mesh.from_file(filename)
31  DATA['stlMesh'] = stl_mesh
32  return OPT, DATA
def LoadMesh(OPT, DATA)
Definition: InputData.py:27

Referenced by MClump.main().

◆ LoadPebbles()

def InputData.LoadPebbles (   OPT,
  DATA 
)
10 def LoadPebbles(OPT, DATA):
11  import numpy as np
12  # This function loads pebbles data in the CLUMP library (csv) format
13  filename = OPT['clumpInputDir'] + OPT['clumpFileName']
14  textfile = open(filename, "r")
15  content_list = textfile.readlines()
16  pebbles = np.zeros([len(content_list), 4])
17  for i in range(len(content_list)):
18  content_list[i] = content_list[i].replace("\n", "")
19  word_list = content_list[i].split(',')
20  for j in range (4):
21  pebbles[i][j] = float(word_list[j])
22  DATA['pebbles'] = pebbles
23  if (OPT['verbose']): print(str(len(pebbles)) + " pebbles loaded \n")
24 
25  return OPT, DATA
26 
void LoadPebbles(ClumpData &a)
Definition: ClumpInput.h:92
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet print(const Packet &a)
Definition: GenericPacketMath.h:1166
str
Definition: compute_granudrum_aor.py:141
void split(const DoubleVector &in_vector, Vector< DoubleVector * > &out_vector_pt)
Definition: double_vector.cc:1413

References Eigen::internal.print(), oomph::DoubleVectorHelpers.split(), and compute_granudrum_aor.str.