##############################
# Or build directly from the dataframe and processor attributes.

model2 = GeologicalModel(processor.origin, processor.maximum)
model2.data = processor.data
model2.create_and_add_foliation("supergroup_0")
model2.update()

##############################
# Visualising model
# ~~~~~~~~~~~~~~~~~

view = LavaVuModelViewer(model)
view.add_model_surfaces()
view.rotation = [-37.965614318847656, 13.706363677978516, 3.110347032546997]
view.display()

##############################
# Adding faults
# ~~~~~~~~~~~~~

fault_orientations

fault_edges

fault_properties

processor = ProcessInputData(
    contacts=contacts,
    contact_orientations=stratigraphic_orientations.rename(
        {"formation": "name"}, axis=1),
Esempio n. 2
0
vals = [0,60,250,330,600]
strat_column = {'strati':{}}
for i in range(len(vals)-1):
    strat_column['strati']['unit_{}'.format(i)] = {'min':vals[i],'max':vals[i+1],'id':i}
model.set_stratigraphic_column(strat_column)
strati = model.create_and_add_foliation("strati",
                                           interpolatortype="FDI", # try changing this to 'PLI'
                                           nelements=1e4, # try changing between 1e3 and 5e4
                                           buffer=0.3,
                                           solver='pyamg',
                                           damp=True
                                          )
viewer = LavaVuModelViewer(model,background="white")
viewer.add_model_surfaces()
viewer.rotate([-85.18760681152344, 42.93233871459961, 0.8641873002052307])
viewer.display()
#################################################################################################
# Looking at the log file
# ~~~~~~~~~~~~~~~~~~~~~~~
# Here are the first 10 lines of the log file. 
# Most operations in loopstructural are recorded and this will allow you to identify whether 
# an operation is not occuring as you would expect.

from itertools import islice
# with open('logging_demo_log.log') as inf:
#     for line in islice(inf, 0, 11):
#         print(line)


#################################################################################################
# Logging to console
Esempio n. 3
0
# the vectorfield at a lower resolution than the mesh otherwise it can be
# difficult to see the vectors. You can use numpy stepping along the
# array: ``locations = mesh.barycentre[::20,:]`` which will sample every
# 20th sample in the numpy array.
# 

viewer = LavaVuModelViewer(model,background="white")

# determine the number of unique surfaces in the model from 
# the input data and then calculate isosurfaces for this
unique = np.unique(strati.interpolator.get_value_constraints()[:,3])
viewer.add_isosurface(strati,
                       slices=unique,  
                       cmap='prism',
                      paint_with=strati)

viewer.add_section(strati,
                   axis='x',
                   value=0.,
                   boundary_points=model.bounding_box, 
                   nsteps=np.array([30,30,30]),
                  cmap='prism')
viewer.add_scalar_field(strati,
                     cmap='prism')
viewer.add_model(cmap='tab20')

# Add the data addgrad/addvalue arguments are optional
viewer.add_data(strati,addgrad=True,addvalue=True, cmap='prism')
viewer.lv.rotate([-85.18760681152344, 42.93233871459961, 0.8641873002052307])
viewer.display()# to add an interactive display