mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
Improve organization of agent documents
This commit is contained in:
1 parent
30793beef2
commit
c6dbdf0c79
34 files changed
+830
-515
No files matched your search
@@ -0,0 +1,175 @@
|
||||
# Build System Documentation
|
||||
|
||||
ResInsight uses CMake with multiple build generators supported. The project requires:
|
||||
- CMake 3.26+ (boost dependency requirement)
|
||||
- C++23 standard
|
||||
- GCC 13+ or Clang 19+ (Linux) / MSVC 2022 17.8+ (Windows)
|
||||
- Python 3.8+
|
||||
- Qt 6.4+
|
||||
|
||||
## Prerequisites and Dependencies
|
||||
|
||||
### Linux (Ubuntu/Debian)
|
||||
|
||||
```bash
|
||||
# Update system and install build tools
|
||||
sudo apt update
|
||||
sudo apt install build-essential curl zip unzip tar flex bison ninja-build
|
||||
|
||||
# Install Qt6 dependencies
|
||||
sudo apt install qt6-base-dev qt6-base-private-dev qt6-charts-dev qt6-networkauth-dev libqt6svg6-dev
|
||||
|
||||
# Clone repository and initialize submodules
|
||||
git clone https://github.com/OPM/ResInsight
|
||||
cd ResInsight
|
||||
git submodule update --init
|
||||
|
||||
# Bootstrap vcpkg for dependency management
|
||||
ThirdParty/vcpkg/bootstrap-vcpkg.sh
|
||||
```
|
||||
|
||||
### Windows (Visual Studio 2022)
|
||||
|
||||
```powershell
|
||||
# Install prerequisites:
|
||||
# - Visual Studio 2022 (17.8+) with C++ workload and CMake tools
|
||||
# - Qt 6.4+ (via Qt Online Installer or vcpkg)
|
||||
# - Git for Windows
|
||||
# - Python 3.8+
|
||||
|
||||
# Clone repository and initialize submodules
|
||||
git clone https://github.com/OPM/ResInsight
|
||||
cd ResInsight
|
||||
git submodule update --init
|
||||
|
||||
# Bootstrap vcpkg for dependency management
|
||||
ThirdParty\vcpkg\bootstrap-vcpkg.bat
|
||||
```
|
||||
|
||||
## Build Commands
|
||||
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
# Configure with CMake preset (recommended)
|
||||
cmake . --preset=linux-base
|
||||
# Note: Copy CMakeUserPresets-example-linux.json to CMakeUserPresets.json and update Qt paths
|
||||
|
||||
# OR configure manually
|
||||
mkdir build && cd build
|
||||
cmake .. -GNinja
|
||||
|
||||
# Build the project
|
||||
cd build && ninja
|
||||
# OR from workspace root
|
||||
ninja -C build
|
||||
|
||||
# Build specific targets
|
||||
ninja -C build ResInsight
|
||||
ninja -C build extract-projectfile-versions
|
||||
```
|
||||
|
||||
### Windows (Visual Studio 2022)
|
||||
|
||||
```powershell
|
||||
# Configure with CMake preset (recommended)
|
||||
cmake . --preset=x64-relwithdebinfo
|
||||
# Note: Copy CMakeUserPresets-example-windows.json to CMakeUserPresets.json and update Qt paths
|
||||
|
||||
# OR using Visual Studio 2022 CMake integration:
|
||||
# 1. Open Visual Studio 2022
|
||||
# 2. File -> Open -> Folder -> Select ResInsight root directory
|
||||
# 3. VS will automatically detect CMakeLists.txt and configure the project
|
||||
# 4. Select x64-relwithdebinfo configuration from the dropdown
|
||||
# 5. Build -> Build All
|
||||
|
||||
# Build the project from command line
|
||||
cmake --build --preset x64-relwithdebinfo
|
||||
|
||||
# Build specific targets
|
||||
cmake --build --preset x64-relwithdebinfo --target ResInsight
|
||||
cmake --build --preset x64-relwithdebinfo --target extract-projectfile-versions
|
||||
```
|
||||
|
||||
## Build Presets
|
||||
|
||||
Available CMake presets in `CMakePresets.json`:
|
||||
- `ninja`: Base configuration with vcpkg toolchain, unit tests enabled, warnings as errors
|
||||
- `linux-base`: Inherits from ninja, includes Qt path configuration (Linux)
|
||||
- `x64-release`: Release build configuration
|
||||
- `x64-relwithdebinfo`: Release with debug info configuration (Windows)
|
||||
- `x64-debug`: Debug build configuration (Windows)
|
||||
|
||||
Create `CMakeUserPresets.json` from appropriate example file:
|
||||
- Linux: Copy `CMakeUserPresets-example-linux.json` and update `CMAKE_PREFIX_PATH` for Qt installation
|
||||
- Windows: Copy `CMakeUserPresets-example-windows.json` and update Qt paths, Python executable, and ODB API paths
|
||||
|
||||
## Test Commands
|
||||
|
||||
The project uses CTest for testing:
|
||||
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
# From build directory
|
||||
ctest
|
||||
# OR
|
||||
ninja test
|
||||
|
||||
# Run specific test suites
|
||||
ctest -R "UnitTests"
|
||||
ctest -R "opm-parser-tests"
|
||||
ctest -R "roffcpp-tests"
|
||||
ctest -R "regression-analysis-tests"
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
```powershell
|
||||
# From build directory
|
||||
ctest -C RelWithDebInfo
|
||||
# OR using CMake preset
|
||||
cmake --build --preset x64-relwithdebinfo --target test
|
||||
|
||||
# Run specific test suites
|
||||
ctest -R "UnitTests" -C RelWithDebInfo
|
||||
ctest -R "opm-parser-tests" -C RelWithDebInfo
|
||||
ctest -R "roffcpp-tests" -C RelWithDebInfo
|
||||
ctest -R "regression-analysis-tests" -C RelWithDebInfo
|
||||
```
|
||||
|
||||
## Python Tests
|
||||
|
||||
### Linux
|
||||
|
||||
```bash
|
||||
# Make a virtual environment:
|
||||
python3 -m venv venv-claude
|
||||
|
||||
# Start the virtual env:
|
||||
source venv-claude/bin/activate
|
||||
|
||||
# Install pytest
|
||||
pip install pytest
|
||||
|
||||
# Run the tests (e.g all tests in tests_polygons.py):
|
||||
cd GrpcInterface/Python/rips && source /workspace/venv-claude/bin/activate && RESINSIGHT_EXECUTABLE=build-claude/ResInsight python -m pytest tests/test_polygons.py --console
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
```powershell
|
||||
# Make a virtual environment:
|
||||
python -m venv venv-claude
|
||||
|
||||
# Start the virtual env:
|
||||
venv-claude\Scripts\Activate.ps1
|
||||
|
||||
# Install pytest
|
||||
pip install pytest
|
||||
|
||||
# Run the tests (e.g all tests in tests_polygons.py):
|
||||
cd GrpcInterface\Python\rips
|
||||
$env:RESINSIGHT_EXECUTABLE="..\..\..\..\build\RelWithDebInfo\ResInsight.exe"
|
||||
python -m pytest tests/test_polygons.py --console
|
||||
```
|
||||
@@ -0,0 +1,59 @@
|
||||
# Coding Style Guidelines
|
||||
|
||||
This document describes the coding style and formatting conventions for ResInsight.
|
||||
|
||||
## Code Formatting
|
||||
|
||||
### clang-format
|
||||
|
||||
ResInsight uses clang-format for C++ code formatting:
|
||||
- **Configuration**: `.clang-format` file in repository root
|
||||
- **Version**: Use clang-format-19 to enforce style
|
||||
|
||||
### Python Formatting
|
||||
|
||||
Python code should be formatted using `ruff`:
|
||||
|
||||
```bash
|
||||
# Format source code
|
||||
python -m ruff format test_polygons.py
|
||||
|
||||
# Check code style
|
||||
python -m ruff check --fix test_polygons.py
|
||||
```
|
||||
|
||||
## Language Standards
|
||||
|
||||
- **C++**: C++23 standard
|
||||
- **Python**: Python 3.8+
|
||||
|
||||
## Best Practices
|
||||
|
||||
### General Guidelines
|
||||
|
||||
1. **Minimal Changes**: Make the smallest possible changes to achieve the goal
|
||||
2. **Preserve Formatting**: Do not reformat unrelated code
|
||||
3. **Comments**: Match the style of existing comments in the file
|
||||
4. **Libraries**: Use existing libraries whenever possible; only add new libraries or update versions if absolutely necessary
|
||||
|
||||
### Code Quality
|
||||
|
||||
1. Always validate changes don't break existing behavior
|
||||
2. Always validate changes don't introduce security vulnerabilities
|
||||
3. Fix any vulnerabilities related to your changes
|
||||
4. Run linters, builds and tests before making code changes to understand any existing issues
|
||||
5. Always try to lint, build and test code changes as soon as possible after making them
|
||||
|
||||
### Testing
|
||||
|
||||
1. Only run linters, builds and tests that already exist
|
||||
2. Do not add new linting, building or testing tools unless necessary to fix the issue
|
||||
3. It is unacceptable to remove or edit unrelated tests
|
||||
4. Documentation changes do not need to be linted, built or tested unless there are specific tests for documentation
|
||||
|
||||
## Commit Conventions
|
||||
|
||||
When creating commits:
|
||||
- Use issue number at the start of the title: `#12773 Python: Add API for creating valve templates`
|
||||
- Follow git conventions for commit messages
|
||||
- Always run python formatting/check on changed files before commits
|
||||
@@ -0,0 +1,344 @@
|
||||
# Core Agent Guidelines
|
||||
|
||||
This document provides core guidelines that all AI agents working on ResInsight should follow.
|
||||
|
||||
## Project Overview
|
||||
|
||||
ResInsight is a 3D visualization and post-processing tool for reservoir simulation data built with a modular architecture.
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
### Core Framework Structure
|
||||
|
||||
- **Visualization Framework (Fwk/VizFwk/)**: Core 3D rendering using Qt/OpenGL
|
||||
- LibCore, LibGeometry, LibRender, LibViewing, LibGuiQt
|
||||
|
||||
- **Application Framework (Fwk/AppFwk/)**: UI and data management framework
|
||||
- Project Data Model (PDM) system for serialization and UI generation
|
||||
- Command framework for undo/redo operations
|
||||
- User interface components built on Qt
|
||||
|
||||
- **Application Code (ApplicationLibCode/)**: Domain-specific functionality
|
||||
- Commands/, ResultStatisticsCache/, GeoMech/ modules
|
||||
- Integration with Eclipse, ODB, and other reservoir simulation formats
|
||||
|
||||
### Key Dependencies
|
||||
|
||||
- **Qt6**: Application framework and UI (Core, Gui, OpenGL, Network, Widgets)
|
||||
- **Third-party libraries**: resdata (ERT), OPM libraries, qwt plotting, OpenVDS seismic data
|
||||
- **vcpkg**: Package manager for most dependencies
|
||||
|
||||
### Data Sources Supported
|
||||
|
||||
- Eclipse binary files (*.GRID, *.EGRID with *.INIT, *.XNNN, *.UNRST)
|
||||
- ABAQUS ODB files (when RESINSIGHT_ODB_API_DIR is configured)
|
||||
- OpenVDS seismic data
|
||||
- Various well and completion data formats
|
||||
|
||||
### Build Configuration Options
|
||||
|
||||
Key CMake options:
|
||||
- `RESINSIGHT_ENABLE_GRPC`: Enable gRPC scripting framework
|
||||
- `RESINSIGHT_USE_ODB_API`: Enable ABAQUS ODB support
|
||||
- `RESINSIGHT_ENABLE_UNITY_BUILD`: Experimental build speedup
|
||||
- `RESINSIGHT_ENABLE_HDF5`: Enable HDF5 library support
|
||||
|
||||
### Python Integration
|
||||
|
||||
ResInsight includes Python integration via gRPC when `RESINSIGHT_ENABLE_GRPC=ON`:
|
||||
- Python API modules in GrpcInterface/Python/
|
||||
- Two-way data exchange capabilities
|
||||
- Script automation support
|
||||
|
||||
## Development Notes
|
||||
|
||||
- **Version**: Current version defined in `ResInsightVersion.cmake` (2025.04.4-dev)
|
||||
- **Git Workflow**: Main development on `dev` branch, `master` branch for stable releases
|
||||
- **Dependencies**: Extensive third-party integration via git submodules in `ThirdParty/`
|
||||
- **Build Output**: Goes to `CMAKE_RUNTIME_OUTPUT_DIRECTORY` (CMAKE_CURRENT_BINARY_DIR)
|
||||
- **Qt Integration**: Uses Qt's resource system (.qrc files) for UI resources
|
||||
- **Entry Point**: Main executable and supporting tools built from `ApplicationExeCode/`
|
||||
- **Testing**: Cross-platform automated testing on RHEL, Ubuntu, and Windows 11
|
||||
- **Build Configuration**: Key option `RESINSIGHT_TREAT_WARNINGS_AS_ERRORS` available in CMake presets
|
||||
|
||||
## Common File Locations
|
||||
|
||||
- Main CMake configuration: `/workspace/CMakeLists.txt`
|
||||
- Application entry point: `ApplicationExeCode/RiaMain.cpp`
|
||||
- Version info: `ResInsightVersion.cmake`
|
||||
- Third-party dependencies: `ThirdParty/` with individual CMakeLists.txt files
|
||||
- Python API: `GrpcInterface/Python/`
|
||||
|
||||
## Git Commit Conventions
|
||||
|
||||
- When creating a git commit for a feature request use the issue number at the start of the title, e.g "#12773 Python: Add API for creating valve templates"
|
||||
- When creating a commit use git conventions
|
||||
- Always run python formatting/check on changed files before commits
|
||||
|
||||
## Making PDM Objects Scriptable for Python GRPC Interface
|
||||
|
||||
To make a PDM (Project Data Model) object available in the Python GRPC interface, you need to make it "scriptable":
|
||||
|
||||
### 1. Convert PDM Object to Scriptable
|
||||
|
||||
**In the header file (.h):**
|
||||
- No changes needed to the class declaration
|
||||
- The object inherits from `caf::PdmObject` as usual
|
||||
|
||||
**In the source file (.cpp):**
|
||||
```cpp
|
||||
// Add required includes
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
|
||||
// Change object initialization
|
||||
CAF_PDM_InitScriptableObject("Display Name", ":/Icon.png", "", "ScriptKeyword");
|
||||
```
|
||||
|
||||
### 2. Convert PDM Fields to Scriptable
|
||||
|
||||
**Change field initialization from:**
|
||||
```cpp
|
||||
CAF_PDM_InitField(&m_fieldName, "FieldName", defaultValue, "Display Name");
|
||||
```
|
||||
|
||||
**To:**
|
||||
```cpp
|
||||
CAF_PDM_InitScriptableField(&m_fieldName, "ScriptFieldName", defaultValue, "Display Name");
|
||||
```
|
||||
|
||||
### 3. Field Naming Conventions for Python
|
||||
|
||||
- Use camelCase for script field names (e.g., "StartMd", "EndMd")
|
||||
- Python generator converts to snake_case automatically (start_md, end_md)
|
||||
- Avoid abbreviations like "MD" - use "Md" instead
|
||||
|
||||
### 4. Class Keyword Requirements
|
||||
|
||||
The class keyword used in `CAF_PDM_SOURCE_INIT` must be unique and descriptive:
|
||||
```cpp
|
||||
CAF_PDM_SOURCE_INIT(RimClassName, "ClassKeyword");
|
||||
```
|
||||
|
||||
### 5. Build and Python Generation
|
||||
|
||||
After making objects scriptable:
|
||||
1. Build the project: `ninja -C build`
|
||||
2. Python classes are automatically generated in `build/Python/rips/generated/generated_classes.py`
|
||||
3. The scriptable class will appear as a Python class with appropriate attributes
|
||||
|
||||
### 6. GRPC Method Integration
|
||||
|
||||
To add methods that return scriptable objects:
|
||||
```cpp
|
||||
// In GRPC interface method
|
||||
QString RimcClassName_method::classKeywordReturnedType() const
|
||||
{
|
||||
return RimTargetClass::classKeywordStatic();
|
||||
}
|
||||
```
|
||||
|
||||
### Example: DiameterRoughnessInterval
|
||||
|
||||
**Before (not scriptable):**
|
||||
```cpp
|
||||
CAF_PDM_InitObject("Diameter Roughness Interval", ":/Icon.png");
|
||||
CAF_PDM_InitField(&m_startMD, "StartMD", 0.0, "Start MD");
|
||||
```
|
||||
|
||||
**After (scriptable):**
|
||||
```cpp
|
||||
CAF_PDM_InitScriptableObject("Diameter Roughness Interval", ":/Icon.png", "", "DiameterRoughnessInterval");
|
||||
CAF_PDM_InitScriptableField(&m_startMD, "StartMd", 0.0, "Start MD");
|
||||
```
|
||||
|
||||
This enables the class to be used from Python:
|
||||
```python
|
||||
interval = completions_settings.add_diameter_roughness_interval(start_md=100, end_md=200)
|
||||
print(f"Start: {interval.start_md}, End: {interval.end_md}")
|
||||
```
|
||||
|
||||
## Field Validation in Python GRPC Interface
|
||||
|
||||
Python field updates are automatically validated when calling `obj.update()`. This ensures data integrity by preventing invalid values from being set.
|
||||
|
||||
### Validation Types
|
||||
|
||||
1. **Type Validation**: Ensures field value types match (int, float, string, etc.)
|
||||
- Parsing errors are caught during type conversion
|
||||
- Example: Setting a string "hello" to an integer field is rejected
|
||||
|
||||
2. **Range Validation**: Checks values against min/max constraints defined with `setRange()`, `setMinValue()`, or `setMaxValue()`
|
||||
- Fields with range constraints reject out-of-bounds values
|
||||
- Example: A field with `setMinValue(0)` rejects negative values
|
||||
|
||||
3. **Object Validation**: Validates cross-field constraints via `validate()` override
|
||||
- Custom business logic can enforce relationships between fields
|
||||
- Example: Ensuring end date is after start date
|
||||
|
||||
### Setting Field Ranges in C++
|
||||
|
||||
To add range validation to a PDM field:
|
||||
|
||||
```cpp
|
||||
RimMyClass::RimMyClass()
|
||||
{
|
||||
CAF_PDM_InitScriptableField(&m_percentage, "Percentage", 50.0, "Percentage");
|
||||
m_percentage.setRange(0.0, 100.0); // Validates 0-100 range
|
||||
|
||||
CAF_PDM_InitScriptableField(&m_count, "Count", 1, "Count");
|
||||
m_count.setMinValue(0); // Only validates minimum
|
||||
m_count.setMaxValue(100); // Only validates maximum
|
||||
|
||||
CAF_PDM_InitScriptableField(&m_wellBoreFluidPvtTable, "WellBoreFluidPvtTable", 0, "Wellbore Fluid PVT Table");
|
||||
m_wellBoreFluidPvtTable.setMinValue(0); // Must be non-negative
|
||||
}
|
||||
```
|
||||
|
||||
### Python Behavior
|
||||
|
||||
Invalid values are **rejected** and field values remain unchanged:
|
||||
|
||||
```python
|
||||
# Example: Setting invalid value
|
||||
completions_settings = well_path.completion_settings()
|
||||
completions_settings.well_bore_fluid_pvt_table = -5 # Invalid: below minimum of 0
|
||||
|
||||
try:
|
||||
completions_settings.update() # Triggers validation
|
||||
except Exception as e:
|
||||
print(f"Validation failed: {e}")
|
||||
# Output:
|
||||
# Validation failed: <_InactiveRpcError of RPC that terminated with:
|
||||
# status = StatusCode.INVALID_ARGUMENT
|
||||
# details = "Validation failed for WellPathCompletionSettings:
|
||||
# WellBoreFluidPvtTable: Value -5 is below minimum 0"
|
||||
# >
|
||||
|
||||
# The field retains its previous valid value (rollback occurred)
|
||||
current_value = well_path.completion_settings().well_bore_fluid_pvt_table
|
||||
print(f"Value remains: {current_value}") # Previous valid value
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
Validation errors raise gRPC exceptions with descriptive messages:
|
||||
|
||||
```python
|
||||
try:
|
||||
obj.update()
|
||||
except Exception as e:
|
||||
error_msg = str(e)
|
||||
if "Validation failed" in error_msg:
|
||||
# Handle validation error
|
||||
print("Please correct the following fields:")
|
||||
print(error_msg)
|
||||
else:
|
||||
# Other error
|
||||
raise
|
||||
```
|
||||
|
||||
### Multiple Field Errors
|
||||
|
||||
All validation errors are aggregated and returned together:
|
||||
|
||||
```python
|
||||
# Set multiple invalid values
|
||||
settings.field1 = invalid_value1
|
||||
settings.field2 = invalid_value2
|
||||
|
||||
try:
|
||||
settings.update()
|
||||
except Exception as e:
|
||||
# Error message lists all validation failures:
|
||||
# "Validation failed for ClassName:
|
||||
# field1: Value ... exceeds maximum ...
|
||||
# field2: Value ... is below minimum ..."
|
||||
pass
|
||||
```
|
||||
|
||||
### Validation Guarantees
|
||||
|
||||
- **Atomic Updates**: If any field fails validation, no fields are updated (all-or-nothing)
|
||||
- **Rollback**: Failed updates don't modify field values - they remain at their previous valid state
|
||||
- **Type Safety**: Cannot assign values of wrong type (string to int, etc.)
|
||||
- **Clear Messages**: Error messages include field names and specific validation failures
|
||||
|
||||
### Implementation Notes
|
||||
|
||||
- Validation occurs automatically on `update()` - no manual validation needed
|
||||
- Built on commit f342ca77572c840eadf22fe0a3fd2935c62fd04b validation infrastructure
|
||||
- Uses C++23 `std::expected<void, QString>` for clean error handling
|
||||
- Returns `grpc::INVALID_ARGUMENT` status with validation details
|
||||
|
||||
## PDM UI Editor Attributes - Modern setAttribute Pattern
|
||||
|
||||
Note: Always use () when accessing a field's value. This is required for proper type management. Use `m_myTextField()` instead of `m_myTextField`.
|
||||
|
||||
The CAF (Command Application Framework) PDM (Project Data Model) system has migrated from the old `defineEditorAttribute` pattern to a modern `setAttribute` pattern using type-safe Keys structs.
|
||||
|
||||
### New Pattern: setAttribute with Keys Struct
|
||||
|
||||
**Setting attributes using the new pattern:**
|
||||
|
||||
```cpp
|
||||
// Modern approach - use Keys constants with implicit type deduction
|
||||
m_comboBoxField.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::ADJUST_WIDTH_TO_CONTENTS, true );
|
||||
m_comboBoxField.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::MINIMUM_CONTENTS_LENGTH, 15 );
|
||||
m_comboBoxField.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::BUTTON_TEXT, "Click Me" );
|
||||
```
|
||||
|
||||
### Benefits of the New Pattern
|
||||
|
||||
1. **Type Safety**: Compile-time checking of attribute names prevents typos
|
||||
2. **IDE Support**: Auto-completion for attribute keys
|
||||
3. **Self-Documenting**: Keys struct clearly shows available attributes for each editor
|
||||
4. **Maintainable**: Single source of truth for attribute names
|
||||
5. **Validation**: Automatic warnings for unsupported attributes
|
||||
|
||||
### Migration from Old Pattern
|
||||
|
||||
**Old pattern (deprecated):**
|
||||
```cpp
|
||||
// In defineEditorAttribute() override
|
||||
auto* myAttr = dynamic_cast<caf::PdmUiComboBoxEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
myAttr->adjustWidthToContents = true;
|
||||
myAttr->minimumContentsLength = 15;
|
||||
}
|
||||
```
|
||||
|
||||
**New pattern:**
|
||||
```cpp
|
||||
// In field initialization or elsewhere
|
||||
m_field.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::ADJUST_WIDTH_TO_CONTENTS, true );
|
||||
m_field.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::MINIMUM_CONTENTS_LENGTH, 15 );
|
||||
```
|
||||
|
||||
### Common Attribute Examples
|
||||
|
||||
```cpp
|
||||
// Line Editor - notify on text changes
|
||||
m_textField.uiCapability()->setAttribute( caf::PdmUiLineEditor::Keys::NOTIFY_WHEN_TEXT_IS_EDITED, true );
|
||||
|
||||
// Label Editor - hyperlink with callback
|
||||
m_labelField.uiCapability()->setAttribute( caf::PdmUiLabelEditor::Keys::LINK_TEXT,
|
||||
"Click <a href='link'>here</a>" );
|
||||
std::function<void(const QString&)> callback = [](const QString& link) { /* handler */ };
|
||||
m_labelField.uiCapability()->setAttribute( caf::PdmUiLabelEditor::Keys::LINK_ACTIVATED_CALLBACK,
|
||||
QVariant::fromValue( callback ) );
|
||||
|
||||
// List Editor - set height hint
|
||||
m_listField.uiCapability()->setAttribute( caf::PdmUiListEditor::Keys::HEIGHT_HINT, 150 );
|
||||
|
||||
// Push Button - set button text
|
||||
m_buttonField.uiCapability()->setAttribute( caf::PdmUiPushButtonEditor::Keys::BUTTON_TEXT, "Execute" );
|
||||
|
||||
// Combo Box - enable previous/next buttons
|
||||
m_comboField.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::SHOW_PREVIOUS_AND_NEXT_BUTTONS, true );
|
||||
```
|
||||
|
||||
### Backward Compatibility
|
||||
|
||||
The old `defineEditorAttribute` pattern still works but is discouraged for new code. Both patterns can coexist during migration, with the new `setAttribute` pattern taking precedence when both are used.
|
||||
@@ -0,0 +1,122 @@
|
||||
# Repository Map
|
||||
|
||||
This document provides an overview of the ResInsight repository structure and key file locations.
|
||||
|
||||
## Top-Level Directory Structure
|
||||
|
||||
```
|
||||
ResInsight/
|
||||
├── ApplicationExeCode/ # Main executable entry points
|
||||
│ └── RiaMain.cpp # Application entry point
|
||||
├── ApplicationLibCode/ # Domain-specific functionality
|
||||
│ ├── Commands/ # Command framework implementations
|
||||
│ ├── ResultStatisticsCache/
|
||||
│ └── GeoMech/ # Geomechanics modules
|
||||
├── Fwk/ # Framework libraries
|
||||
│ ├── VizFwk/ # Visualization framework (Qt/OpenGL)
|
||||
│ │ ├── LibCore
|
||||
│ │ ├── LibGeometry
|
||||
│ │ ├── LibRender
|
||||
│ │ ├── LibViewing
|
||||
│ │ └── LibGuiQt
|
||||
│ └── AppFwk/ # Application framework
|
||||
│ ├── PDM system # Project Data Model for serialization
|
||||
│ ├── Command framework # Undo/redo operations
|
||||
│ └── UI components # Qt-based user interface
|
||||
├── GrpcInterface/ # gRPC integration
|
||||
│ └── Python/ # Python API
|
||||
│ └── rips/ # Python package
|
||||
├── ThirdParty/ # Third-party dependencies (git submodules)
|
||||
│ └── vcpkg/ # vcpkg package manager
|
||||
├── TestModels/ # Test data and models
|
||||
├── cmake/ # CMake modules and utilities
|
||||
├── docs/ # Documentation
|
||||
│ ├── agents/ # Agent-specific documentation
|
||||
│ └── class-diagrams/ # PlantUML class diagrams
|
||||
├── scripts/ # Build and utility scripts
|
||||
├── tooling/ # Development tools
|
||||
├── patches/ # Patches for dependencies
|
||||
├── CMakeLists.txt # Main CMake configuration
|
||||
├── CMakePresets.json # CMake build presets
|
||||
├── ResInsightVersion.cmake # Version information
|
||||
└── vcpkg.json # vcpkg dependencies
|
||||
```
|
||||
|
||||
## Key Files
|
||||
|
||||
### Build Configuration
|
||||
- `CMakeLists.txt` - Main CMake configuration
|
||||
- `CMakePresets.json` - Predefined build configurations
|
||||
- `CMakeUserPresets-example-linux.json` - Example user presets for Linux
|
||||
- `CMakeUserPresets-example-windows.json` - Example user presets for Windows
|
||||
- `vcpkg.json` - vcpkg dependency manifest
|
||||
- `vcpkg-configuration.json` - vcpkg configuration
|
||||
|
||||
### Version and Documentation
|
||||
- `ResInsightVersion.cmake` - Version definitions (2025.04.4-dev)
|
||||
- `README.md` - Project overview and getting started
|
||||
- `COPYING` - License information
|
||||
- `docs/agents/` - Agent documentation
|
||||
- `core.md` - Core agent guidelines
|
||||
- `build.md` - Build system documentation
|
||||
- `coding-style.md` - Coding style guidelines
|
||||
- `repo-map.md` - This file
|
||||
|
||||
### Code Formatting
|
||||
- `.clang-format` - clang-format configuration for C++ code
|
||||
- `.codespellrc` - codespell configuration
|
||||
- `.codespell-ignore` - codespell ignore list
|
||||
- `.misspell-fixer.ignore` - misspell-fixer ignore list
|
||||
|
||||
### Source Code Organization
|
||||
|
||||
#### Visualization Framework (Fwk/VizFwk/)
|
||||
Core 3D rendering using Qt/OpenGL with libraries for:
|
||||
- Geometry processing
|
||||
- Rendering pipeline
|
||||
- View management
|
||||
- Qt GUI integration
|
||||
|
||||
#### Application Framework (Fwk/AppFwk/)
|
||||
- **PDM System**: Project Data Model for:
|
||||
- Object serialization
|
||||
- UI generation
|
||||
- Field validation
|
||||
- **Command Framework**: Undo/redo operations
|
||||
- **UI Components**: Qt-based widgets and dialogs
|
||||
|
||||
#### Application Code (ApplicationLibCode/)
|
||||
Domain-specific functionality including:
|
||||
- Eclipse file format integration
|
||||
- ODB (ABAQUS) support
|
||||
- Well path and completion management
|
||||
- Grid and geometry processing
|
||||
- Result statistics and caching
|
||||
|
||||
#### Python Integration (GrpcInterface/Python/)
|
||||
- gRPC server implementation
|
||||
- Python API (rips package)
|
||||
- Generated Python classes from PDM objects
|
||||
- Test suite for Python API
|
||||
|
||||
## Data File Formats
|
||||
|
||||
ResInsight supports various reservoir simulation file formats:
|
||||
- Eclipse binary: `*.GRID`, `*.EGRID`, `*.INIT`, `*.XNNN`, `*.UNRST`
|
||||
- ABAQUS ODB files (when `RESINSIGHT_ODB_API_DIR` configured)
|
||||
- OpenVDS seismic data
|
||||
- Well and completion data formats
|
||||
|
||||
## Build Outputs
|
||||
|
||||
Build artifacts are placed in:
|
||||
- Linux: `build/` directory (or preset-specific directory)
|
||||
- Windows: `build/RelWithDebInfo/`, `build/Debug/`, etc.
|
||||
- Python generated classes: `build/Python/rips/generated/generated_classes.py`
|
||||
|
||||
## Testing
|
||||
|
||||
- Unit tests: Various test executables
|
||||
- Integration tests: CTest-based test suites
|
||||
- Python tests: `GrpcInterface/Python/rips/tests/`
|
||||
- Test data: `TestModels/` directory
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
Investigations on using ResInsight to render plots in a compleatly Headless state
|
||||
|
||||
- Qt 5.8 or higher needed, it seems. Tested with Qt 5.14.1. Tested with Qt 5.6.1 on CentOS 6 and the plots was rendered without fonts.
|
||||
- Start ResInsight with the additional options -platform offscreen
|
||||
- The project can not contain visible 3D views. If it does, ResInsight will crash
|
||||
- Might add -stylesheet <path to stylesheet definition file> to explicitly control fonts
|
||||
example contents of stylesheets file:
|
||||
|
||||
* { font: bold italic large "Times New Roman" }
|
||||
|
||||
The "*" might be substituted with specific classes or widgets.
|
||||
It seems as the Qwt plot axis-titles are not affected by the stylesheet set above
|
||||
|
||||
- Example command line:
|
||||
|
||||
./ResInsight --project FPPLot.rsp --savesnapshots all --snapshotsize 500 500 -stylesheet stylesheet.txt -platform offscreen
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
@startuml
|
||||
left to right direction
|
||||
|
||||
package "Project" {
|
||||
RimProject --> RimOilField
|
||||
RimOilField --> RimAnnotationCollection
|
||||
RimAnnotationCollection --> "n" RimAnnotation
|
||||
|
||||
RimAnnotation <|-- RimTextAnnotation
|
||||
RimAnnotation <|-- RimCircleAnnotation
|
||||
RimAnnotation <|-- RimPolygonAnnotation
|
||||
}
|
||||
|
||||
package "View" {
|
||||
Rim3dView --> RivAnnotationsPartMgr
|
||||
Rim3dView <|-- RimGridView
|
||||
RimGridView --> RimAnnotationInViewCollection
|
||||
RivAnnotationsPartMgr --> "n" RivAnnotationPartMgr
|
||||
RivAnnotationPartMgr "injected" --> RimAnnotation
|
||||
}
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,50 @@
|
||||
@startuml
|
||||
|
||||
package "Summary case ensamble" {
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<New>> LightGray
|
||||
}
|
||||
|
||||
package Cases {
|
||||
RimSummaryCaseMainCollection --> "*" RimSummaryCaseCollection
|
||||
RimSummaryCaseMainCollection --> "*" RimSummaryCase
|
||||
RimSummaryCaseCollection --> "*" RimSummaryCase
|
||||
|
||||
RimSummaryCase -> RigCaseRealizationParameters
|
||||
|
||||
RimSummaryCaseMainCollection ..> RifCaseRealizationParametersReader : create
|
||||
RifCaseRealizationParametersReader ..> RimSummaryCase : set parameters
|
||||
|
||||
class RifSummaryReaderInterface {
|
||||
allResultAddresses()
|
||||
}
|
||||
RimSummaryCase <|-- RimGridSummaryCase
|
||||
RimSummaryCase --> RifSummaryReaderInterface
|
||||
RifSummaryReaderInterface <|-- RifReaderEclipseSummary
|
||||
RimGridSummaryCase ..> RifReaderEclipseSummary
|
||||
}
|
||||
|
||||
package Curves {
|
||||
RimMainPlotCollection --> RimSummaryPlotCollection
|
||||
RimSummaryPlotCollection --> "*" RimSummaryPlot
|
||||
|
||||
RimSummaryPlot --> RimSummaryCurveCollection
|
||||
RimSummaryPlot -> RimEnsambleCurveSetCollection
|
||||
RimSummaryCurveCollection --> "*" RimSummaryCurve
|
||||
RimSummaryCurveCollection -> "3" RimSummaryPlotSourceStepping
|
||||
RimEnsambleCurveSetCollection --> RimEnsambleCurveSet
|
||||
RimEnsambleCurveSet --> "*" RimSummaryCurve
|
||||
}
|
||||
|
||||
RimProject -> RimMainPlotCollection
|
||||
RimProject --> "*" RimOilField
|
||||
RimOilField --> RimSummaryCaseMainCollection
|
||||
|
||||
RimSummaryCurve -> RimSummaryCase
|
||||
RimSummaryCurve --> RifEclipseSummaryAddress
|
||||
|
||||
RifSummaryReaderInterface --> "*" RifEclipseSummaryAddress
|
||||
}
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,27 @@
|
||||
@startuml
|
||||
|
||||
PdmObject <|-- RimPlotCellFilter
|
||||
|
||||
|
||||
class RimPlotCellFilter
|
||||
{
|
||||
void updateCellVisibilityFromFilter(size_t timeStepIndex,
|
||||
cvf::UByteArray* cellVisibility)
|
||||
|
||||
FilterModeType filterMode() const;
|
||||
}
|
||||
|
||||
RimPlotCellFilter <|-- RimPlotCellPropertyFilter
|
||||
RimPlotCellFilter <|-- RimPlotCellFilterCollection
|
||||
|
||||
RimPlotCellFilterCollection -> RimPlotCellFilter
|
||||
class RimPlotCellFilterCollection
|
||||
{
|
||||
std::vector<RimCellFilter*> m_filters
|
||||
}
|
||||
|
||||
RimPlotCellFilter <|-- RimPlotCellRegionFilter_planned
|
||||
RimPlotCellFilter <|-- RimPlotCellRangeFilter_planned
|
||||
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,40 @@
|
||||
@startuml
|
||||
left to right direction
|
||||
|
||||
class RiaArgumentParser {
|
||||
parseArguments();
|
||||
executeCommandFile();
|
||||
}
|
||||
|
||||
class RicfCommandFileExecutor {
|
||||
executeCommands();
|
||||
prepareFileCommandsForExecution();
|
||||
}
|
||||
|
||||
class RicfCommandFileReader {
|
||||
readCommands();
|
||||
}
|
||||
|
||||
class RicfObjectCapability {
|
||||
readFields();
|
||||
}
|
||||
|
||||
package "Command Objects" {
|
||||
|
||||
class RicfCommandObject {
|
||||
execute();
|
||||
}
|
||||
|
||||
RicfCommandObject <|-- RicfOpenProject
|
||||
RicfCommandObject <|-- RicfSetExportFolder
|
||||
}
|
||||
|
||||
RicfObjectCapability <|-- RicfCommandObject
|
||||
|
||||
RiaApplication -> RiaArgumentParser
|
||||
RiaArgumentParser -> RicfCommandFileExecutor
|
||||
RicfCommandFileExecutor --> RicfCommandObject
|
||||
RicfCommandFileExecutor -> RicfCommandFileReader
|
||||
RicfCommandFileReader --> RicfObjectCapability
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,50 @@
|
||||
@startuml
|
||||
|
||||
package "Curve creator (Plot editor)" {
|
||||
|
||||
'
|
||||
' Class definitions
|
||||
'
|
||||
class RicSummaryCurveCreatorSplitterUi {
|
||||
Qt layouts
|
||||
}
|
||||
|
||||
class RicSummaryCurveCreator {
|
||||
Appearance types
|
||||
OK/Apply/Cancel buttons
|
||||
}
|
||||
|
||||
class RiuSummaryCurveDefSelectionEditor {
|
||||
m_firstRowLeftLayout
|
||||
m_firstRowRightLayout
|
||||
}
|
||||
|
||||
class RiuSummaryCurveDefSelection {
|
||||
Cases
|
||||
Summary categories
|
||||
Identifier fields
|
||||
}
|
||||
|
||||
'
|
||||
' Class Hierarchy
|
||||
'
|
||||
PdmUiWidgetBasedObjectEditor <|-- RicSummaryCurveCreatorSplitterUi
|
||||
PdmUiWidgetBasedObjectEditor <|-- RiuSummaryCurveDefSelectionEditor
|
||||
|
||||
'
|
||||
' Class references
|
||||
'
|
||||
RicSummaryCurveCreatorDialog --> RicSummaryCurveCreatorSplitterUi
|
||||
|
||||
RicSummaryCurveCreatorSplitterUi ->RicSummaryCurveCreator
|
||||
|
||||
RicSummaryCurveCreator --> RiuSummaryCurveDefSelectionEditor
|
||||
|
||||
RicSummaryCurveCreator --> RimSummaryPlot : Target plot
|
||||
RicSummaryCurveCreator --> RimSummaryPlot : Preview plot
|
||||
|
||||
RiuSummaryCurveDefSelectionEditor --> RiuSummaryCurveDefSelection
|
||||
|
||||
}
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,31 @@
|
||||
@startuml
|
||||
|
||||
class RifReaderInterface {
|
||||
virtual open()
|
||||
virtual close()
|
||||
virtual staticResult()
|
||||
virtual dynamicResult()
|
||||
virtual timeSteps()
|
||||
}
|
||||
|
||||
RifEclipseRestartDataAccess <|- RifEclipseRestartFilesetAccess
|
||||
RifEclipseRestartDataAccess <|- RifEclipseUnifiedRestartFileAccess
|
||||
|
||||
RifReaderInterface <|- RifReaderEclipseOutput
|
||||
|
||||
class RifEclipseOutputFileTools {
|
||||
helper class with several static functions
|
||||
used to read data from Eclipse binary files
|
||||
}
|
||||
|
||||
|
||||
RifReaderEclipseOutput o-- "1..N" RifEclipseRestartDataAccess
|
||||
|
||||
|
||||
RifEclipseRestartFilesetAccess --o RifEclipseOutputFileTools : uses
|
||||
RifEclipseUnifiedRestartFileAccess --o RifEclipseOutputFileTools : uses
|
||||
|
||||
ecl_file_type "N" o-- RifEclipseRestartFilesetAccess
|
||||
ecl_file_type "1" o-- RifEclipseUnifiedRestartFileAccess
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,93 @@
|
||||
@startuml
|
||||
|
||||
Title Classes related to fractures
|
||||
|
||||
note as N1
|
||||
Updated 2018-03-07
|
||||
end note
|
||||
|
||||
class RimFracture {
|
||||
RimDefines::UnitSystemType fractureUnit;
|
||||
}
|
||||
|
||||
class RimSimWellFracture {
|
||||
}
|
||||
class RimWellPathFracture {
|
||||
}
|
||||
|
||||
|
||||
RimFracture <|-- RimSimWellFracture
|
||||
RimFracture <|-- RimWellPathFracture
|
||||
|
||||
RimFracture -> RimStimPlanFractureTemplate
|
||||
|
||||
RimFracture -> RivWellFracturePartMgr
|
||||
RivWellFracturePartMgr ->RimFracture
|
||||
|
||||
class RimFractureTemplate {
|
||||
RimDefines::UnitSystemType fractureTemplateUnit;
|
||||
}
|
||||
|
||||
class RimEllipseFractureTemplate {
|
||||
}
|
||||
class RimStimPlanFractureTemplate {
|
||||
}
|
||||
|
||||
class RifStimPlanXmlReader {
|
||||
<<static>> readStimPlanXMLFile()
|
||||
}
|
||||
|
||||
RimFractureTemplate <|-- RimEllipseFractureTemplate
|
||||
RimFractureTemplate <|-- RimStimPlanFractureTemplate
|
||||
|
||||
class RigStimPlanFractureDefinition{
|
||||
std::vector<double> gridXs;
|
||||
std::vector<double> gridYs;
|
||||
std::vector<double> timeSteps;
|
||||
std::vector<double> depths;
|
||||
std::vector<RigStimPlanResultFrames> stimPlanData;
|
||||
|
||||
}
|
||||
|
||||
class RigFractureCell{
|
||||
std::vector<cvf::Vec3d> m_polygon;
|
||||
double m_displayValue;
|
||||
double m_conductivityValue;
|
||||
size_t m_i;
|
||||
size_t m_j;
|
||||
|
||||
|
||||
}
|
||||
|
||||
class RigFractureGrid{
|
||||
}
|
||||
|
||||
|
||||
RimStimPlanFractureTemplate "1" *-- "1" RigStimPlanFractureDefinition
|
||||
RimStimPlanFractureTemplate "1" *-- "1" RigFractureGrid
|
||||
RimEllipseFractureTemplate "1" *-- "1" RigFractureGrid
|
||||
RigFractureGrid "1" *-- "many" RigFractureCell
|
||||
|
||||
class RigStimPlanResultFrames{
|
||||
QString resultName;
|
||||
QString unit;
|
||||
std::vector<std::vector<std::vector<double>>> parameterValues;
|
||||
//Vector for each time step, for each depth and for each x-value
|
||||
|
||||
}
|
||||
|
||||
RigStimPlanFractureDefinition "1" *-- "1 for each property in StimPlan File" RigStimPlanResultFrames
|
||||
|
||||
RicExportFractureCompletionsImpl --> RimFracture
|
||||
RicExportFractureCompletionsImpl ..> RigFractureGrid
|
||||
RicExportFractureCompletionsImpl ..> RigFractureCell
|
||||
|
||||
|
||||
class RicExportFractureCompletionsImpl{
|
||||
generateFracturesCompdatValues()
|
||||
}
|
||||
|
||||
RimStimPlanFractureTemplate ---> RifStimPlanXmlReader
|
||||
RifStimPlanXmlReader ...> "create" RigStimPlanFractureDefinition
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,25 @@
|
||||
@startuml
|
||||
|
||||
class RiuGraphWindow {
|
||||
menu : QMenu
|
||||
toolbars : QToolbar
|
||||
graphLayoutWindow : QMainWindow
|
||||
Center widget with graphs
|
||||
}
|
||||
note left: Main window with toolbars and control widgets
|
||||
|
||||
class RimGraph {
|
||||
QWT widget contained in a dockwidget
|
||||
}
|
||||
|
||||
QwtPlot <|-- RimGraph
|
||||
|
||||
class RimCurve {
|
||||
Base class for curves to be rendered in a Graph
|
||||
Must notify Graph when data is changed
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,57 @@
|
||||
@startuml
|
||||
|
||||
actor Client
|
||||
|
||||
box "Server Side" #LightBlue
|
||||
participant Server order 20
|
||||
participant Service order 40
|
||||
participant Callback order 30
|
||||
participant ServerThread order 10
|
||||
|
||||
Server -> Service : Create
|
||||
activate Server
|
||||
Server -> Callback : Create(Service)
|
||||
Server -> ServerThread : Launch
|
||||
activate ServerThread
|
||||
deactivate Server
|
||||
Client -> ServerThread: Request #1
|
||||
ServerThread -> Server : Queue(Request #1)
|
||||
Server -> Server : Scheduled
|
||||
activate Server
|
||||
Server->ServerThread : Block
|
||||
deactivate ServerThread
|
||||
Server -> Server : Take Requests
|
||||
Server->ServerThread : Unblock
|
||||
activate ServerThread
|
||||
Server -> Callback : Init(Request #1)
|
||||
activate Callback
|
||||
Server -> Callback : Process(Request #1)
|
||||
Callback -> Service : Method
|
||||
activate Service
|
||||
return Result
|
||||
deactivate Service
|
||||
Client -> ServerThread: Request #2
|
||||
Callback --> Server : Finish #1
|
||||
deactivate Callback
|
||||
Server --> Client : Reply #1
|
||||
deactivate Server
|
||||
ServerThread -> Server : Queue(Request #2)
|
||||
Server -> Server : Scheduled
|
||||
activate Server
|
||||
Server->ServerThread : Block
|
||||
deactivate ServerThread
|
||||
Server->Server : Take Requests
|
||||
Server->ServerThread : Unblock
|
||||
activate ServerThread
|
||||
Server -> Callback : Process(Request #2)
|
||||
activate Callback
|
||||
Server -> Callback : Init(Request #1)
|
||||
Callback -> Service : Method
|
||||
activate Service
|
||||
return Result
|
||||
Callback --> Server : Finish #2
|
||||
deactivate Callback
|
||||
Server --> Client : Reply #2
|
||||
deactivate Server
|
||||
deactivate ServerThread
|
||||
@enduml
|
||||
@@ -0,0 +1,56 @@
|
||||
@startuml
|
||||
|
||||
|
||||
package GrpcServices
|
||||
{
|
||||
class RiaGrpcServiceInterface
|
||||
class RiaGrpcStreamService
|
||||
{
|
||||
GetStream(Request*, Reply*, StateHandler*)
|
||||
RequestGetStream(...)
|
||||
SetStream(Request*, Reply*, StateHandler*)
|
||||
RequestSetStream(...)
|
||||
}
|
||||
RiaGrpcServiceInterface <|-- RiaGrpcStreamService
|
||||
|
||||
}
|
||||
|
||||
package GrpcCallbacks
|
||||
{
|
||||
class RiaGrpcCallbackInterface
|
||||
|
||||
class RiaGrpcClientStreamCallback<RiaGrpcStreamService, Request, Reply, StateHandler>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class RiaGrpcServerStreamCallback<RiaGrpcStreamService, Request, Reply, StateHandler>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
RiaGrpcCallbackInterface <|-- RiaGrpcServerStreamCallback
|
||||
RiaGrpcCallbackInterface <|-- RiaGrpcClientStreamCallback
|
||||
|
||||
|
||||
|
||||
RiaGrpcServerStreamCallback --> RiaGrpcStreamService::RequestGetStream : registers
|
||||
RiaGrpcServerStreamCallback --> RiaGrpcStreamService::GetStream : sends N chunks
|
||||
RiaGrpcClientStreamCallback --> RiaGrpcStreamService::RequestSetStream : registers
|
||||
RiaGrpcClientStreamCallback --> RiaGrpcStreamService::SetStream : gets N chunks
|
||||
}
|
||||
|
||||
package GrpcServer
|
||||
{
|
||||
class RiaGrpcServer
|
||||
RiaGrpcServer "1" *-- "many" RiaGrpcServiceInterface : contains
|
||||
RiaGrpcServer "1" *-- "many" RiaGrpcCallbackInterface : contains
|
||||
|
||||
}
|
||||
|
||||
package ResInsight {
|
||||
RiaApplication --> RiaGrpcServer
|
||||
}
|
||||
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,5 @@
|
||||
This regexp will identify all files not starting with the character '/'
|
||||
Useful to detect files with missing copyright header
|
||||
|
||||
^(?!/).*$
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
@startuml
|
||||
|
||||
package Legends {
|
||||
|
||||
OverlayItem <|-- OverlayScalarMapperLegend
|
||||
|
||||
ScalarMapper <|-- ScalarMapperRangeBased
|
||||
ScalarMapperRangeBased <|-- ScalarMapperContinuousLinear
|
||||
ScalarMapperRangeBased <|-- ScalarMapperDiscreteLinear
|
||||
|
||||
RimStimPlanColors --> RimLegendConfig
|
||||
Rim2dIntersectionView --> RimLegendConfig
|
||||
RimEclipseCellColors --> RimLegendConfig
|
||||
|
||||
RimLegendConfig --> ScalarMapper
|
||||
RimLegendConfig --> OverlayScalarMapperLegend
|
||||
|
||||
OverlayScalarMapperLegend --> ScalarMapper
|
||||
}
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,16 @@
|
||||
@startuml
|
||||
|
||||
RigMainGrid *-- "1" RigNNCData
|
||||
|
||||
RigEclipseCaseData *-- RigMainGrid
|
||||
|
||||
|
||||
RimCase *-- RimTimeStepFilter
|
||||
|
||||
|
||||
RimCase <|- RimEclipseCase
|
||||
RimEclipseCase <|- RimEclipseResultCase
|
||||
|
||||
RimEclipseResultCase *- RigEclipseCaseData
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,10 @@
|
||||
@startuml
|
||||
PDM -> PdmObject: fieldChangedByUi(changedField, oldValue, newValue)
|
||||
note right: Called for changed UI field (by the user)
|
||||
|
||||
PDM -> PdmObject: defineUiOrdering(uiOrdering)
|
||||
note right: Called each time the view have to be rebuilt, also after UI field change
|
||||
|
||||
PDM -> PdmObject: calculateValueOptions(fieldNeedingOptions)
|
||||
note right: Called for each visible field
|
||||
@enduml
|
||||
@@ -0,0 +1,41 @@
|
||||
@startuml
|
||||
|
||||
package cafPickEvents {
|
||||
class caf::PickEventHandler {
|
||||
-caf::PdmObjectHandle* objectBeingModified
|
||||
+bool isObjectBeingModified(caf::PdmObjectHandle*)
|
||||
+void registerAsPickEventHandler()
|
||||
+void unregisterAsPickEventHandler()
|
||||
+bool handlePickEvent(const PickEvent& eventObject)
|
||||
+void notifyUnregistered()
|
||||
|
||||
}
|
||||
caf::PickEventHandler --> caf::PickEvent
|
||||
}
|
||||
package RicPickEvents {
|
||||
caf::PickEventHandler <|-- Ric3dViewPickEventHandler
|
||||
caf::PickEvent <|-- Ric3dPickEvent
|
||||
|
||||
Ric3dViewPickEventHandler --> Ric3dPickEvent
|
||||
|
||||
class RicVec3dPEH
|
||||
{
|
||||
-caf::PdmField<cvf::Vec3d>* m_vectorField;
|
||||
}
|
||||
|
||||
Ric3dViewPickEventHandler <|-- RicVec3dPEH
|
||||
Ric3dViewPickEventHandler <|-- RicCreateWellTargetsPEH
|
||||
Ric3dViewPickEventHandler <|-- RicPolylineTargetsPEH
|
||||
Ric3dViewPickEventHandler <|-- RicMeasurementPEH
|
||||
|
||||
RicDefaultPickEventHandler --> Ric3dPickEvent
|
||||
}
|
||||
package DataModel
|
||||
{
|
||||
class caf::PdmObjectHandle
|
||||
class caf::PdmField
|
||||
caf::PickEventHandler --> caf::PdmObjectHandle
|
||||
RicVec3dPEH --> caf::PdmField
|
||||
}
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,31 @@
|
||||
@startuml
|
||||
package Rim {
|
||||
PdmObject <|-- RimViewWindow
|
||||
package plots {
|
||||
RimViewWindow <|-- RimPlotWindow
|
||||
RimPlotWindow <|-- RimPlot
|
||||
RimPlot <|-- RimSummaryPlot
|
||||
}
|
||||
}
|
||||
|
||||
package RiuQwt {
|
||||
class RiuSummaryQwtPlot
|
||||
class RiuQwtPlotWidget
|
||||
}
|
||||
|
||||
package RiuQtCharts {
|
||||
class RiuSummaryQtChartsPlot
|
||||
class RiuQtChartsPlotWidget
|
||||
}
|
||||
|
||||
RiuPlotWidget <|--- RiuQwtPlotWidget
|
||||
RiuSummaryPlot <|-- RiuSummaryQwtPlot
|
||||
|
||||
RiuSummaryQwtPlot --> RiuQwtPlotWidget
|
||||
RiuSummaryQtChartsPlot --> RiuQtChartsPlotWidget
|
||||
|
||||
RiuSummaryPlot <|-- RiuSummaryQtChartsPlot
|
||||
RiuPlotWidget <|--- RiuQtChartsPlotWidget
|
||||
|
||||
RimSummaryPlot --> RiuSummaryPlot
|
||||
@enduml
|
||||
@@ -0,0 +1,71 @@
|
||||
@startuml
|
||||
left to right direction
|
||||
RimCase <|-- RimEclipseCase
|
||||
RimCase <|-- RimGeoMechCase
|
||||
|
||||
RimEclipseCase <|--- RimEclipseInputCase
|
||||
RimEclipseCase <|--- RimEclipseInputCaseOpm
|
||||
RimEclipseCase <|--- RimEclipseResultCase
|
||||
RimEclipseCase <|--- RimEclipseStatisticsCase
|
||||
|
||||
class RimEclipseInputCase {
|
||||
Based on ASCII input files
|
||||
}
|
||||
|
||||
class RimEclipseInputCaseOpm {
|
||||
Based on ASCII input files using OPM parser
|
||||
}
|
||||
|
||||
class RimEclipseResultCase {
|
||||
Based on binary files (EGRID, UNSMRY, ..)
|
||||
}
|
||||
|
||||
class RimEclipseStatisticsCase {
|
||||
Case derived from statistics computations of multiple cases
|
||||
}
|
||||
|
||||
RimCase *-- "N" RimView
|
||||
|
||||
|
||||
class RimEclipseCase {
|
||||
RigEclipseCaseData* reservoirData()
|
||||
RimReservoirCellResultsStorage* results()
|
||||
-- private --
|
||||
matrixResults RimReservoirCellResultsStorage
|
||||
fractureResults RimReservoirCellResultsStorage
|
||||
}
|
||||
|
||||
RimEclipseCase *-- RigEclipseCaseData
|
||||
RimEclipseCase *-- RimReservoirCellResultsStorage
|
||||
|
||||
class RigEclipseCaseData {
|
||||
RigMainGrid* mainGrid()
|
||||
RigCaseCellResultsData* results()
|
||||
RigActiveCellInfo* activeCellInfo()
|
||||
RigFormationNames* activeFormationNames()
|
||||
RigSingleWellResultsData* findWellResult()
|
||||
RigCell& cellFromWellResultCell()
|
||||
}
|
||||
|
||||
RigEclipseCaseData *-- RigCaseCellResultsData
|
||||
|
||||
|
||||
RimReservoirCellResultsStorage *-- RigCaseCellResultsData
|
||||
|
||||
class RimReservoirCellResultsStorage {
|
||||
RigCaseCellResultsData* cellResults()
|
||||
}
|
||||
|
||||
|
||||
RimSummaryCase <|-- RimFileSummaryCase
|
||||
RimSummaryCase <|-- RimGridSummaryCase
|
||||
|
||||
class RimGridSummaryCase {
|
||||
RimEclipseCase* associatedEclipseCase(
|
||||
}
|
||||
|
||||
|
||||
|
||||
RimGridSummaryCase *-- RimEclipseCase
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,58 @@
|
||||
@startuml
|
||||
left to right direction
|
||||
|
||||
RifSummaryReaderInterface <|-- RifCalculatedSummaryCurveReader
|
||||
RifSummaryReaderInterface <|-- RifColumnBasedUserData
|
||||
RifSummaryReaderInterface <|-- RifCsvUserData
|
||||
RifSummaryReaderInterface <|-- RifKeywordVectorUserData
|
||||
RifSummaryReaderInterface <|-- RifReaderEclipseSummary
|
||||
RifSummaryReaderInterface <|-- RifReaderObservedData
|
||||
RifSummaryReaderInterface <|-- RifEnsembleStatisticsReader
|
||||
RifSummaryReaderInterface <|-- RifDerivedEnsembleReader
|
||||
|
||||
RifColumnBasedUserData *-- "1" RifColumnBasedUserDataParser
|
||||
RifKeywordVectorUserData *-- "1" RifKeywordVectorUserDataParser
|
||||
RifReaderObservedData --> RifCsvUserDataParser
|
||||
|
||||
RimSummaryCaseCollection --> "*" RimSummaryCase
|
||||
|
||||
RimSummaryCaseCollection <|-- RimDerivedEnsembleCaseCollection
|
||||
|
||||
RimDerivedEnsembleCaseCollection --> "*" RimDerivedEnsembleCase
|
||||
|
||||
RimSummaryCase <|-- RimCalculatedSummaryCase
|
||||
RimSummaryCase <|-- RimFileSummaryCase
|
||||
RimSummaryCase <|-- RimGridSummaryCase
|
||||
RimSummaryCase <|-- RimObservedData
|
||||
RimSummaryCase <|-- RimEnsembleStatisticsCase
|
||||
RimSummaryCase <|-- RimDerivedEnsembleCase
|
||||
|
||||
RimObservedData <|-- RimObservedEclipseUserData
|
||||
RimObservedData <|-- RimCsvUserData
|
||||
RimObservedData <|-- RimSummaryObservedDataFile
|
||||
|
||||
RimCalculatedSummaryCase --> RifCalculatedSummaryCurveReader
|
||||
|
||||
RimDerivedEnsembleCase --> RifDerivedEnsembleReader
|
||||
|
||||
RimSummaryObservedDataFile --> RifReaderObservedData
|
||||
|
||||
RimObservedEclipseUserData *--> RifSummaryReaderInterface
|
||||
|
||||
RimCsvUserData -> RicPasteAsciiDataToSummaryPlotFeatureUi
|
||||
RimCsvUserData --> RifCsvUserData
|
||||
|
||||
RimFileSummaryCase *--> RifReaderEclipseSummary
|
||||
RimGridSummaryCase *--> RifReaderEclipseSummary
|
||||
|
||||
RicPasteAsciiDataToSummaryPlotFeatureUi --> RifCsvUserDataParser
|
||||
|
||||
RimEnsembleCurveSet -> "1" RimSummaryCaseCollection
|
||||
|
||||
RimEnsembleCurveSet --> "1" RimEnsembleStatisticsCase
|
||||
RimEnsembleStatisticsCase --> RifEnsembleStatisticsReader
|
||||
|
||||
RimSummaryCaseMainCollection -> "*" RimSummaryCase
|
||||
RimSummaryCaseMainCollection -> "*" RimSummaryCaseCollection
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,32 @@
|
||||
@startuml
|
||||
|
||||
class RimViewWindow {
|
||||
RimMdiWindowController mdiWindowGeometry()
|
||||
}
|
||||
|
||||
note top of RimViewWindow : Updated 2018-04-18 (NOTE : sub classes of RimViewWindow is not complete, consider Doxygen for this info
|
||||
|
||||
class RimView {
|
||||
}
|
||||
|
||||
RimViewWindow <|-- Rim3dView
|
||||
|
||||
package plots {
|
||||
RimViewWindow <|-- RimSummaryPlot
|
||||
RimViewWindow <|-- RimTotalWellAllocationPlot
|
||||
RimViewWindow <|-- RimWellAllocationPlot
|
||||
RimViewWindow <|-- RimWellLogPlot
|
||||
}
|
||||
|
||||
RimViewWindow *-- RimMdiWindowController
|
||||
|
||||
Rim3dView <|-- Rim2dIntersectionView
|
||||
|
||||
Rim3dView <|-- RimGridView
|
||||
|
||||
RimGridView <|-- RimEclipseView
|
||||
RimGridView <|-- RimGeoMechView
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,16 @@
|
||||
@startuml
|
||||
|
||||
RimViewLinkerCollection --* "1" RimViewLinker
|
||||
RimViewLinker --* "n" RimViewController
|
||||
RimViewLinker "masterView" ---> RimGridView
|
||||
|
||||
RimViewController "managedView" ---> RimGridView
|
||||
|
||||
Rim3dView <|-- RimGridView
|
||||
|
||||
|
||||
RimViewLinker .> RimViewManipulator
|
||||
Rim3dView -* RiuViewer
|
||||
RimViewManipulator ...> RiuViewer
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,68 @@
|
||||
@startuml
|
||||
scale 2000 width
|
||||
|
||||
actor RedrawScheduler
|
||||
|
||||
box "Rim3dView" #White
|
||||
participant createDisplayModelAndRedraw order 10
|
||||
participant setCurrentTimeStepAndUpdate order 20
|
||||
participant updateDisplayModelForCurrentTimeStepAndRedraw order 30
|
||||
end box
|
||||
|
||||
box "RimSpecialView" #LightBlue
|
||||
participant onCreateDisplayModel order 40
|
||||
participant onUpdateDisplayModelForCurrentTimeStep order 45
|
||||
end box
|
||||
|
||||
box "RiuViewer" #LightBlue
|
||||
participant setCurrentFrame order 50
|
||||
end box
|
||||
|
||||
box "Rim3dView Comparison" #LightGray
|
||||
participant createDisplayModelAndRedraw_c order 60
|
||||
|
||||
end box
|
||||
|
||||
box "RimSpecialView Comparison" #LightGray
|
||||
participant onCreateDisplayModel_c order 70
|
||||
participant onUpdateDisplayModelForCurrentTimeStep_c order 80
|
||||
|
||||
end box
|
||||
|
||||
|
||||
RedrawScheduler -> createDisplayModelAndRedraw ++
|
||||
|
||||
createDisplayModelAndRedraw -> onCreateDisplayModel ++
|
||||
onCreateDisplayModel -> setCurrentFrame ++
|
||||
|
||||
setCurrentFrame -> setCurrentTimeStepAndUpdate ++
|
||||
|
||||
setCurrentTimeStepAndUpdate -> updateDisplayModelForCurrentTimeStepAndRedraw ++
|
||||
|
||||
updateDisplayModelForCurrentTimeStepAndRedraw -> onUpdateDisplayModelForCurrentTimeStep ++
|
||||
onUpdateDisplayModelForCurrentTimeStep --> updateDisplayModelForCurrentTimeStepAndRedraw -- :return
|
||||
|
||||
updateDisplayModelForCurrentTimeStepAndRedraw -> onUpdateDisplayModelForCurrentTimeStep_c ++
|
||||
onUpdateDisplayModelForCurrentTimeStep_c --> updateDisplayModelForCurrentTimeStepAndRedraw -- :return
|
||||
|
||||
updateDisplayModelForCurrentTimeStepAndRedraw --> setCurrentTimeStepAndUpdate -- : return
|
||||
|
||||
setCurrentTimeStepAndUpdate --> setCurrentFrame --: return
|
||||
setCurrentFrame --> onCreateDisplayModel --: return
|
||||
|
||||
onCreateDisplayModel --> createDisplayModelAndRedraw --: return
|
||||
|
||||
createDisplayModelAndRedraw -> createDisplayModelAndRedraw_c ++
|
||||
createDisplayModelAndRedraw_c -> onCreateDisplayModel_c ++
|
||||
onCreateDisplayModel_c --> createDisplayModelAndRedraw_c-- : return
|
||||
|
||||
createDisplayModelAndRedraw_c --> createDisplayModelAndRedraw -- : return
|
||||
|
||||
createDisplayModelAndRedraw -> onUpdateDisplayModelForCurrentTimeStep_c ++
|
||||
onUpdateDisplayModelForCurrentTimeStep_c --> createDisplayModelAndRedraw --: return
|
||||
|
||||
createDisplayModelAndRedraw --> RedrawScheduler -- : return
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,31 @@
|
||||
@startuml
|
||||
|
||||
class RicPointTangentManipulator{
|
||||
eventFilter()
|
||||
}
|
||||
|
||||
class RicPointTangentManipulatorPartMgr {
|
||||
appendPartsToModel()
|
||||
}
|
||||
Viewer <|-- RiuViewer
|
||||
RiuViewer ----* PdmUiSelection3dEditorVisualizer
|
||||
|
||||
RicPointTangentManipulator -* RicPointTangentManipulatorPartMgr
|
||||
|
||||
PdmUiObjectEditorHandle <|-- PdmUi3dObjectEditorHandle
|
||||
|
||||
RicWellTarget3dEditor --* RicPointTangentManipulator
|
||||
|
||||
RicWellPathGeometry3dEditor -* "n" RicWellTarget3dEditor
|
||||
PdmUi3dObjectEditorHandle <|-- RicWellPathGeometry3dEditor
|
||||
|
||||
RicPointTangentManipulator ..up.> "installEventFilter()" Viewer
|
||||
|
||||
PdmUi3dObjectEditorHandle <|-- Ric3dObjectEditorHandle
|
||||
Ric3dObjectEditorHandle <|-- RicWellTarget3dEditor
|
||||
|
||||
PdmUiSelection3dEditorVisualizer --* "n" PdmUi3dObjectEditorHandle
|
||||
Viewer ..down.> "eventFilter()" RicPointTangentManipulator
|
||||
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,54 @@
|
||||
@startuml
|
||||
|
||||
class RimView
|
||||
class RimOilField
|
||||
class RimEclipseCaseCollection
|
||||
class RimCase
|
||||
class RimWellPath
|
||||
class RimWellPathCollection
|
||||
|
||||
RimProject *--> RimOilField
|
||||
|
||||
RimOilField *--> RimWellPathCollection
|
||||
RimOilField *--> RimEclipseCaseCollection
|
||||
RimEclipseCaseCollection *--> "n" RimEclipseCase
|
||||
|
||||
RimWellPathCollection *--> "n" RimWellPath
|
||||
RimSimWellInViewCollection *--> "n" RimSimWellInView
|
||||
|
||||
|
||||
RimView <|-- RimEclipseView
|
||||
|
||||
RimCase <|-- RimEclipseCase
|
||||
|
||||
RimEclipseCase *--> "n" RimEclipseView
|
||||
|
||||
RimEclipseView *-> RimSimWellInViewCollection
|
||||
|
||||
|
||||
|
||||
class RigWellPath {
|
||||
std::vector<cvf::Vec3d> m_wellPathPoints;
|
||||
std::vector<double> m_measuredDepths;
|
||||
}
|
||||
|
||||
class RimWellPath {
|
||||
Represents reference to a file containing points along a curve
|
||||
for the center line of the physical well path
|
||||
}
|
||||
RimWellPath *-> RigWellPath
|
||||
|
||||
|
||||
class RimSimWellInView {
|
||||
Represents a collection of cubes the simulation
|
||||
well passes through
|
||||
}
|
||||
|
||||
class RigSimulationWellCenterLineCalculator {
|
||||
Can compute a RigWellPath based on a RigSimWellData
|
||||
}
|
||||
|
||||
RigSimulationWellCenterLineCalculator ...> RigWellPath
|
||||
RigSimulationWellCenterLineCalculator ...> RigSimWellData
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,90 @@
|
||||
@startuml
|
||||
package Rim {
|
||||
|
||||
PdmObject <|-- RimViewWindow
|
||||
package plot {
|
||||
RimViewWindow <|-- RimWellLogPlot
|
||||
RimViewWindow <|-- RimSummaryPlot
|
||||
|
||||
PdmObject <|-- RimWellLogTrack
|
||||
|
||||
RimViewWindow <|-- RimWellAllocationPlot
|
||||
RimViewWindow <|-- RimWellRftPlot
|
||||
RimViewWindow <|-- RimWellPltPlot
|
||||
RimWellAllocationPlot *--> RimWellLogPlot
|
||||
RimWellRftPlot *--> RimWellLogPlot
|
||||
RimWellPltPlot *--> RimWellLogPlot
|
||||
}
|
||||
package curve {
|
||||
|
||||
PdmObject <|---- RimPlotCurve
|
||||
RimPlotCurve <|-- RimWellLogCurve
|
||||
RimPlotCurve <|-- RimSummaryCurve
|
||||
RimWellLogCurve <|-- RimWellFlowRateCurve
|
||||
RimWellLogCurve <|-- RimWellLogExtractionCurve
|
||||
RimWellLogCurve <|-- RimWellLogFileCurve
|
||||
RimWellLogCurve <|-- RimWellLogRftCurve
|
||||
RimWellLogCurve *--> RigWellLogCurveData
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class RimWellLogTrack {
|
||||
PdmChildArrayField<RimWellLogCurve*> curves;
|
||||
}
|
||||
|
||||
class RimPlotCurve {
|
||||
RiuLineSegmentQwtPlotCurve* qwtPlotCurve;
|
||||
}
|
||||
|
||||
class RimWellLogPlot {
|
||||
PdmChildArrayField<RimWellLogTrack*> m_tracks;
|
||||
QPointer<RiuWellLogPlot> m_viewer;
|
||||
}
|
||||
|
||||
package Qwt {
|
||||
QWidget <|--- RiuWellLogPlot
|
||||
QWidget <|-- QwtPlot
|
||||
QwtPlot <|--- RiuWellLogTrack
|
||||
QwtPlot <|--- RiuSummaryQwtPlot
|
||||
|
||||
RiuWellLogPlot *----> "n" RiuWellLogTrack
|
||||
QwtPlot *--> "n" QwtPlotCurve
|
||||
QwtPlotCurve <|-- RiuLineSegmentQwtPlotCurve
|
||||
RiuWellLogTrack --[hidden]> RiuLineSegmentQwtPlotCurve
|
||||
|
||||
class RiuWellAllocationPlot{
|
||||
}
|
||||
class RiuWellRftPlot{
|
||||
}
|
||||
class RiuWellPltPlot{
|
||||
}
|
||||
}
|
||||
|
||||
class RiuWellLogPlot {
|
||||
QList<RiuWellLogTrack*> m_trackPlots;
|
||||
PdmPointer<RimWellLogPlot> m_plotDefinition;
|
||||
}
|
||||
|
||||
class RiuWellLogTrack {
|
||||
PdmPointer<RimWellLogTrack> m_plotTrackDefinition;
|
||||
}
|
||||
RimWellLogPlot *---> "n" RimWellLogTrack
|
||||
RimWellLogTrack *---> "n" RimWellLogCurve
|
||||
|
||||
RimSummaryPlot *---> "n" RimSummaryCurve
|
||||
|
||||
RimWellLogPlot -r-> RiuWellLogPlot
|
||||
RimWellLogTrack -r-> RiuWellLogTrack
|
||||
RimPlotCurve -r-> RiuLineSegmentQwtPlotCurve
|
||||
RimSummaryPlot -r-> RiuSummaryQwtPlot
|
||||
RimWellAllocationPlot *-> RiuWellAllocationPlot
|
||||
RimWellRftPlot *-> RiuWellRftPlot
|
||||
RimWellPltPlot *-> RiuWellPltPlot
|
||||
RiuWellAllocationPlot ....> RiuWellLogPlot
|
||||
RiuWellRftPlot ....> RiuWellLogPlot
|
||||
RiuWellPltPlot ....> RiuWellLogPlot
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,52 @@
|
||||
@startuml
|
||||
/'
|
||||
package Viz{
|
||||
class RivWellPathPartMgr
|
||||
class RivFishbonesSubsPartMgr
|
||||
class RivWellFracturePartMgr
|
||||
}
|
||||
'/
|
||||
|
||||
package Pdm{
|
||||
class RimView
|
||||
class RimOilField
|
||||
class RimEclipseCaseCollection
|
||||
class RimCase
|
||||
class RimWellPath
|
||||
class RimWellPathCollection
|
||||
class RimFishbonesMultipleSubs
|
||||
class RimWellPathCompletions
|
||||
class RimFishboneWellPathCollection
|
||||
class RimPerforationCollection
|
||||
class RimWellPathFractureCollection
|
||||
class RimFishbonesCollection
|
||||
class RimFracture
|
||||
}
|
||||
|
||||
RivWellPathPartMgr ..> RimWellPath
|
||||
RimWellPath *--> RivWellPathPartMgr
|
||||
|
||||
RivWellPathPartMgr *--> "n" RivFishbonesSubsPartMgr
|
||||
|
||||
RivFishbonesSubsPartMgr ..> RimFishbonesMultipleSubs
|
||||
|
||||
RivWellFracturePartMgr ...> RimFracture
|
||||
|
||||
RimOilField *--> RimWellPathCollection
|
||||
RimOilField *--> RimEclipseCaseCollection
|
||||
RimEclipseCaseCollection *--> "n" RimCase
|
||||
|
||||
RimCase *--> "n" RimView
|
||||
RimWellPathCollection *--> "n" RimWellPath
|
||||
RimWellPath *--> RimWellPathCompletions
|
||||
RimFishbonesCollection *--> RimFishbonesMultipleSubs
|
||||
RimFishbonesCollection *--> RimFishboneWellPathCollection
|
||||
RimWellPathCompletions *--> RimFishbonesCollection
|
||||
RimWellPathCompletions *--> RimPerforationCollection
|
||||
RimWellPathCompletions *--> RimWellPathFractureCollection
|
||||
|
||||
RimWellPathFractureCollection *--> "n" RimFracture
|
||||
|
||||
RimFracture *--> RivWellFracturePartMgr
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,135 @@
|
||||
# Spell Checking Workflows
|
||||
|
||||
ResInsight uses automated spell checking to maintain code quality and catch typos in code, comments, and documentation.
|
||||
|
||||
## Two Workflows
|
||||
|
||||
### 1. spell-check.yml (Full Repository Check)
|
||||
|
||||
**When it runs:** On every push to any branch
|
||||
|
||||
**What it does:**
|
||||
- Checks all code in four directories:
|
||||
- `ApplicationExeCode/`
|
||||
- `ApplicationLibCode/`
|
||||
- `Fwk/AppFwk/`
|
||||
- `GrpcInterface/`
|
||||
- Uses `codespell` to find and suggest fixes for typos
|
||||
- Automatically creates a PR with fixes if typos are found
|
||||
- PR will be created on a branch named `spell-check-patches-*`
|
||||
|
||||
**Use case:** Regular maintenance and keeping the entire codebase clean
|
||||
|
||||
### 2. spell-check-pr.yml (PR Review Check)
|
||||
|
||||
**When it runs:** On pull requests that modify files in the target directories
|
||||
|
||||
**What it does:**
|
||||
- Only checks files that were changed in the PR
|
||||
- Uses `codespell` for spell checking
|
||||
- Checks these file types: `.cpp`, `.h`, `.inl`, `.py`, `.md`, `.txt`, `.cmake`, `.yml`, `.yaml`
|
||||
- Skips binary files: `.svg`, `.xml`, `.json`
|
||||
- Fails the PR check if typos are found (must be fixed before merge)
|
||||
|
||||
**Use case:** Preventing new typos from being introduced in PRs
|
||||
|
||||
## Configuration Files
|
||||
|
||||
### .codespellrc
|
||||
|
||||
Central configuration file for codespell that defines:
|
||||
- Files to skip (e.g., SVG, JSON, XML files)
|
||||
- Ignore words file location
|
||||
- Default directories to check
|
||||
- File types to include
|
||||
- Output formatting options
|
||||
|
||||
This configuration is automatically used by both GitHub workflows and local runs.
|
||||
|
||||
### .codespell-ignore
|
||||
|
||||
Used by `codespell` (both workflows). Contains domain-specific terms that should not be flagged:
|
||||
|
||||
- Petroleum engineering terms: `perm`, `porosity`, `wellbore`, `facies`
|
||||
- Eclipse file formats: `EGRID`, `INIT`, `UNRST`, `SMSPEC`
|
||||
- Simulation tools: `Abaqus`, `ODB`, `VTK`
|
||||
- Common abbreviations: `API`, `GUI`, `RGB`, `CSV`
|
||||
- Units: `ft`, `mD`, `bbl`, `psi`
|
||||
|
||||
**To add a word:** Simply add it to `.codespell-ignore` (one word per line, comments start with `#`)
|
||||
|
||||
## How to Fix Typos
|
||||
|
||||
### From Full Repository Check
|
||||
|
||||
When the spell-check workflow creates a PR:
|
||||
|
||||
1. Review the PR created by the workflow
|
||||
2. Check if the suggested changes are correct
|
||||
3. If correct: merge the PR
|
||||
4. If incorrect: close the PR and add the word to `.codespell-ignore`
|
||||
|
||||
### From PR Review Check
|
||||
|
||||
When your PR fails the spell check:
|
||||
|
||||
1. Read the error message to see which words are flagged
|
||||
2. Fix the typos in your code OR
|
||||
3. If the word is correct (domain-specific term), add it to `.codespell-ignore`
|
||||
4. Push the changes to your PR
|
||||
5. The check will run again automatically
|
||||
|
||||
## Common Domain Terms Already Whitelisted
|
||||
|
||||
The following are already in the whitelist:
|
||||
- Reservoir simulation: `perm`, `permeability`, `porosity`, `geomech`, `seismic`
|
||||
- Eclipse formats: `EGRID`, `GRID`, `INIT`, `UNRST`, `SMSPEC`, `ESMRY`
|
||||
- Tools: `Abaqus`, `ODB`, `VTK`, `OSDU`, `FMU`, `VFP`
|
||||
- Abbreviations: `Md`, `Tvd`, `Rkb`, `Rft`, `Plt`
|
||||
- Organizations: `ResInsight`, `Equinor`, `Ceetron`, `OPM`
|
||||
|
||||
## Testing Locally
|
||||
|
||||
You can run spell checks locally before pushing:
|
||||
|
||||
### Using codespell (recommended for quick checks)
|
||||
|
||||
```bash
|
||||
# Install codespell
|
||||
pip install codespell
|
||||
|
||||
# Check specific files (uses .codespellrc automatically)
|
||||
codespell myfile.cpp
|
||||
|
||||
# Check a directory (uses .codespellrc automatically)
|
||||
codespell ApplicationLibCode/
|
||||
|
||||
# Check all default directories (defined in .codespellrc)
|
||||
codespell
|
||||
|
||||
# Apply fixes automatically (use with caution)
|
||||
codespell --write-changes
|
||||
|
||||
# Override config file settings if needed
|
||||
codespell --ignore-words=custom-ignore.txt --skip="*.log,*.tmp" myfile.cpp
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### False Positives
|
||||
|
||||
If a word is flagged but is correct:
|
||||
1. Add it to `.codespell-ignore`
|
||||
|
||||
### Words That Should Be Fixed
|
||||
|
||||
If the spell checker suggests a change that seems wrong, check:
|
||||
- Is the word used correctly in context?
|
||||
- Is it a technical term that should be in the whitelist?
|
||||
- Is there a better/clearer word to use?
|
||||
|
||||
### Workflow Not Running
|
||||
|
||||
- Check that your changes touch files in the monitored directories
|
||||
- Check that the file extensions are supported
|
||||
- Look at the GitHub Actions tab for error messages
|
||||
Reference in new issue
Block a user