Skip to content

Commit 2f044f0

Browse files
committed
Add warning
1 parent 2d1c171 commit 2f044f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/solution-manager.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public:
7676
```
7777

7878
{: .warning }
79-
Vectors `x_sol` and `t_sol` should be defined before calling the `UserDefinedSolutionManager` constructor and must live until the end of the computation. They shouldn't be passed to the constructor as temporary objects and must **not** go out of scope before finishing the system solving (otherwise, this will lead to dangling references `&m_x_sol` and `&m_t_sol` in the class definition above).
79+
Vectors `x_sol` and `t_sol` should be defined before calling the `UserDefinedSolutionManager` constructor and must live until the end of the computation. They shouldn't be passed to the constructor as temporary objects and must **not** go out of scope before finishing the system solving (otherwise, this will lead to dangling references `&m_x_sol` and `&m_t_sol` in the class definition above).
8080

8181
Similar to the mass matrix, vector function and Jacobian matrix definitions, inhereting the `daecpp::SolutionManager` class is a good practice (it serves as a blueprint), but it is not necessary. The user is allowed to define custom Solution Managers without inhereting `daecpp::SolutionManager`.
8282

@@ -142,6 +142,9 @@ Constructs Solution class object.
142142
- `sol` - [`daecpp::SolutionHolder`](#solution-holder-class) object that will store the solution
143143
- (optional) `t_output` - a vector of output times for writing (`std::vector<double>`)
144144
145+
{: .warning }
146+
Solution Holder `sol` should be defined before calling the Solution class constructor and must live until the end of the computation. It shouldn't be passed to the constructor as a temporary and must **not** go out of scope before finishing the system solving (the solver writes data to `sol`).
147+
145148
### Example:
146149
147150
```cpp

0 commit comments

Comments
 (0)