-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b4a61c
commit 5c44747
Showing
4 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
Performance and Optimisation | ||
---------------------------- | ||
The Performance and Optimization section focuses on improving the efficiency and scalability of your geological models. | ||
These examples illustrate how to optimize large datasets, fine-tune solver parameters, and efficiently manage complex modeling scenarios. | ||
You'll also learn techniques for balancing computational performance with model accuracy, enabling you to build robust geological models without sacrificing speed. | ||
Whether you're working on a large-scale model or need to improve performance for time-sensitive projects, this section provides practical guidance on achieving the best results with LoopStructural. | ||
This section will show some tips for how to speed up your models for specific applications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
Solver Iteration Limits | ||
----------------------- | ||
LoopStructural uses iterative solvers to solve the least squares problem. | ||
The number of iterations can be controlled by the user. | ||
""" | ||
|
||
""" | ||
Solver Iteration Limits | ||
----------------------- | ||
LoopStructural uses iterative solvers to solve the least squares problem. | ||
The number of iterations can be controlled by the user. | ||
The number of iterations required by LoopStructural depends on the complexity of the geometry | ||
being modelled. | ||
In some cases a satisfactory solution can be found with a small number of iterations. | ||
In the example below we show the time taken to solve the problem for different numbers of iterations | ||
and show the resulting model. | ||
""" | ||
|
||
from LoopStructural import GeologicalModel | ||
from LoopStructural.datasets import load_claudius | ||
from LoopStructural.visualisation import Loop3DView | ||
import time | ||
|
||
data, bb = load_claudius() | ||
model = GeologicalModel(bb[0, :], bb[1, :]) | ||
model.data = data | ||
isovalue = 220 | ||
for maxiter in [10, 100, 500, 1000, 10000]: | ||
start = time.time() | ||
model.create_and_add_foliation( | ||
"strati", interpolatortype="FDI", solver_kwargs={"maxiter": maxiter} | ||
) | ||
model.update() | ||
end = time.time() | ||
print(f"maxiter: {maxiter} time: {end-start} seconds") | ||
view = Loop3DView(model) | ||
view.plot_surface(model["strati"], [220]) | ||
view.show() | ||
view.clear() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
Resolution of interpolator | ||
""" |