Skip to content

Commit

Permalink
Fix Compilation Errors with Trilino: change input arguments in trilin…
Browse files Browse the repository at this point in the history
…os_doassem_ and added a header file within shell.cpp (#81)

Co-authored-by: Weiguang Yang <[email protected]>
  • Loading branch information
wgyang and Weiguang Yang authored Aug 9, 2023
1 parent 44c1859 commit 9aa4bc0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Code/Source/svFSI/shells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include "nn.h"
#include "utils.h"

#ifdef WITH_TRILINOS
#include "trilinos_linear_solver.h"
#endif

namespace shells {

//-----------------
Expand Down Expand Up @@ -163,7 +167,7 @@ void construct_shell(ComMod& com_mod, const mshType& lM, const Array<double>& Ag
// Assembly
#ifdef WITH_TRILINOS
if (eq.assmTLS) {
trilinos_doassem_(eNoN, ptr, lK, lR);
trilinos_doassem_(const_cast<int&>(eNoN), const_cast<int*>(ptr.data()), lK.data(), lR.data());
} else {
#endif
lhsa_ns::do_assem(com_mod, eNoN, ptr, lK, lR);
Expand Down Expand Up @@ -1650,7 +1654,7 @@ void shell_cst(ComMod& com_mod, const mshType& lM, const int e, const int eNoN,

#ifdef WITH_TRILINOS
if (eq.assmTLS) {
trilinos_doassem_(eNoN, ptr, lK, lR);
trilinos_doassem_(const_cast<int&>(eNoN), const_cast<int*>(ptr.data()), lK.data(), lR.data());
} else {
#endif
lhsa_ns::do_assem(com_mod, eNoN, ptr, lK, lR);
Expand Down

0 comments on commit 9aa4bc0

Please sign in to comment.