Skip to content

Commit 81e10b8

Browse files
committed
fix time output and some formating
1 parent 20cc4ce commit 81e10b8

3 files changed

Lines changed: 27 additions & 22 deletions

File tree

Common/include/linear_algebra/vector_expressions.hpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -146,28 +146,28 @@ MAKE_UNARY_FUN(sign, sign_, sign_impl)
146146

147147
/*--- Macro to create expressions and overloads for binary functions. ---*/
148148

149-
#define MAKE_BINARY_FUN(FUN, EXPR, IMPL) \
150-
/*!--- Expression class. ---*/ \
151-
template <class U, class V, class Scalar> \
152-
class EXPR : public CVecExpr<EXPR<U, V, Scalar>, Scalar> { \
153-
store_t<const U> u; \
154-
store_t<const V> v; \
155-
\
156-
public: \
157-
static constexpr bool StoreAsRef = false; \
158-
FORCEINLINE EXPR(const U& u_, const V& v_) : u(u_), v(v_) {} \
159-
FORCEINLINE auto operator[](size_t i) const RETURNS(IMPL(u[i], v[i])) \
160-
}; \
161-
/*!--- Vector with vector function overload. ---*/ \
162-
template <class U, class V, class S> \
163-
FORCEINLINE auto FUN(const CVecExpr<U, S>& u, const CVecExpr<V, S>& v) \
164-
RETURNS(EXPR<U, V, S>(u.derived(), v.derived())) /*!--- Vector with scalar function overload. ---*/ \
165-
template <class U, class S> \
166-
FORCEINLINE auto FUN(const CVecExpr<U, S>& u, decay_t<S> v) \
167-
RETURNS(EXPR<U, Bcast<S>, S>(u.derived(), Bcast<S>(v))) /*!--- Scalar with vector function overload. ---*/ \
168-
template <class S, class V> \
169-
FORCEINLINE auto FUN(decay_t<S> u, const CVecExpr<V, S>& v) \
170-
RETURNS(EXPR<Bcast<S>, V, S>(Bcast<S>(u), v.derived()))
149+
#define MAKE_BINARY_FUN(FUN, EXPR, IMPL) \
150+
/*!--- Expression class. ---*/ \
151+
template <class U, class V, class Scalar> \
152+
class EXPR : public CVecExpr<EXPR<U, V, Scalar>, Scalar> { \
153+
store_t<const U> u; \
154+
store_t<const V> v; \
155+
\
156+
public: \
157+
static constexpr bool StoreAsRef = false; \
158+
FORCEINLINE EXPR(const U& u_, const V& v_) : u(u_), v(v_) {} \
159+
FORCEINLINE auto operator[](size_t i) const RETURNS(IMPL(u[i], v[i])) \
160+
}; \
161+
/*!--- Vector with vector function overload. ---*/ \
162+
template <class U, class V, class S> \
163+
FORCEINLINE auto FUN(const CVecExpr<U, S>& u, const CVecExpr<V, S>& v) \
164+
RETURNS(EXPR<U, V, S>(u.derived(), v.derived())); \
165+
/*!--- Vector with scalar function overload. ---*/ \
166+
template <class U, class S> \
167+
FORCEINLINE auto FUN(const CVecExpr<U, S>& u, decay_t<S> v) RETURNS(EXPR<U, Bcast<S>, S>(u.derived(), Bcast<S>(v))); \
168+
/*!--- Scalar with vector function overload. ---*/ \
169+
template <class S, class V> \
170+
FORCEINLINE auto FUN(decay_t<S> u, const CVecExpr<V, S>& v) RETURNS(EXPR<Bcast<S>, V, S>(Bcast<S>(u), v.derived()));
171171

172172
/*--- std::max/min have issues (because they return by reference).
173173
* fmin and fmax return by value and thus are fine, but they would force

Common/src/linear_algebra/CSysSolve.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,9 @@ unsigned long CSysSolve<ScalarType>::FGMRES_LinSolver(const CSysVector<ScalarTyp
452452

453453
/*--- Modified Gram-Schmidt orthogonalization ---*/
454454

455+
SU2_OMP_PARALLEL_(if (!omp_in_parallel()))
455456
ModGramSchmidt(i, H, W);
457+
END_SU2_OMP_PARALLEL
456458

457459
/*--- Apply old Givens rotations to new column of the Hessenberg matrix then generate the
458460
new Givens rotation matrix and apply it to the last two elements of H[:][i] and g ---*/
@@ -480,9 +482,11 @@ unsigned long CSysSolve<ScalarType>::FGMRES_LinSolver(const CSysVector<ScalarTyp
480482

481483
const auto& basis = flexible ? Z : W;
482484

485+
SU2_OMP_PARALLEL_(if (!omp_in_parallel()))
483486
for (unsigned long k = 0; k < i; k++) {
484487
x += y[k] * basis[k];
485488
}
489+
END_SU2_OMP_PARALLEL
486490

487491
/*--- Recalculate final (neg.) residual (this should be optional) ---*/
488492

SU2_CFD/src/drivers/CDiscAdjMultizoneDriver.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ void CDiscAdjMultizoneDriver::Run() {
308308

309309
const unsigned long nOuterIter = driver_config->GetnOuter_Iter();
310310
const bool time_domain = driver_config->GetTime_Domain();
311+
driver_config->Set_StartTime(SU2_MPI::Wtime());
311312

312313
/*--- If the gradient of the objective function is 0 so are the adjoint variables.
313314
* Unless in unsteady problems where there are other contributions to the RHS. ---*/

0 commit comments

Comments
 (0)