Skip to content

Commit

Permalink
update vectors I missed before
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Nov 10, 2023
1 parent b771e51 commit 7e78db8
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion include/nvector/nvector_mpimanyvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ SUNDIALS_EXPORT N_Vector N_VClone_MPIManyVector(N_Vector w);
SUNDIALS_EXPORT void N_VDestroy_MPIManyVector(N_Vector v);
SUNDIALS_EXPORT void N_VSpace_MPIManyVector(N_Vector v, sunindextype *lrw,
sunindextype *liw);
SUNDIALS_EXPORT SUNComm N_VGetCommunicator_MPIManyVector(N_Vector v);
SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_MPIManyVector(N_Vector v);
SUNDIALS_EXPORT sunindextype N_VGetLength_MPIManyVector(N_Vector v);
SUNDIALS_EXPORT sunindextype N_VGetSubvectorLocalLength_MPIManyVector(N_Vector v, sunindextype vec_num);
SUNDIALS_EXPORT void N_VLinearSum_MPIManyVector(sunrealtype a, N_Vector x,
Expand Down
2 changes: 1 addition & 1 deletion include/nvector/nvector_parallel.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ SUNDIALS_EXPORT void N_VSpace_Parallel(N_Vector v, sunindextype *lrw,
sunindextype *liw);
SUNDIALS_EXPORT sunrealtype *N_VGetArrayPointer_Parallel(N_Vector v);
SUNDIALS_EXPORT void N_VSetArrayPointer_Parallel(sunrealtype *v_data, N_Vector v);
SUNDIALS_EXPORT SUNComm N_VGetCommunicator_Parallel(N_Vector v);
SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_Parallel(N_Vector v);

/* standard vector operations */
SUNDIALS_EXPORT void N_VLinearSum_Parallel(sunrealtype a, N_Vector x, sunrealtype b, N_Vector y, N_Vector z);
Expand Down
2 changes: 1 addition & 1 deletion include/nvector/nvector_parhyp.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SUNDIALS_EXPORT void N_VSpace_ParHyp(N_Vector v, sunindextype *lrw,
sunindextype *liw);
SUNDIALS_EXPORT sunrealtype *N_VGetArrayPointer_ParHyp(N_Vector v);
SUNDIALS_EXPORT void N_VSetArrayPointer_ParHyp(sunrealtype *v_data, N_Vector v);
SUNDIALS_EXPORT void *N_VGetCommunicator_ParHyp(N_Vector v);
SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_ParHyp(N_Vector v);
SUNDIALS_EXPORT sunindextype N_VGetLength_ParHyp(N_Vector v);

/* standard vector operations */
Expand Down
2 changes: 1 addition & 1 deletion include/nvector/nvector_petsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ SUNDIALS_EXPORT N_Vector N_VClone_Petsc(N_Vector w);
SUNDIALS_EXPORT void N_VDestroy_Petsc(N_Vector v);
SUNDIALS_EXPORT void N_VSpace_Petsc(N_Vector v, sunindextype *lrw, sunindextype *liw);
SUNDIALS_EXPORT void N_VSetArrayPointer_Petsc(sunrealtype *v_data, N_Vector v);
SUNDIALS_EXPORT void *N_VGetCommunicator_Petsc(N_Vector v);
SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_Petsc(N_Vector v);
SUNDIALS_EXPORT sunindextype N_VGetLength_Petsc(N_Vector v);

/* standard vector operations */
Expand Down
2 changes: 1 addition & 1 deletion include/nvector/nvector_trilinos.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SUNDIALS_EXPORT N_Vector N_VCloneEmpty_Trilinos(N_Vector w);
SUNDIALS_EXPORT N_Vector N_VClone_Trilinos(N_Vector w);
SUNDIALS_EXPORT void N_VDestroy_Trilinos(N_Vector v);
SUNDIALS_EXPORT void N_VSpace_Trilinos(N_Vector v, sunindextype *lrw, sunindextype *liw);
SUNDIALS_EXPORT void *N_VGetCommunicator_Trilinos(N_Vector v);
SUNDIALS_EXPORT MPI_Comm N_VGetCommunicator_Trilinos(N_Vector v);
SUNDIALS_EXPORT sunindextype N_VGetLength_Trilinos(N_Vector v);
SUNDIALS_EXPORT void N_VLinearSum_Trilinos(sunrealtype a, N_Vector x, sunrealtype b, N_Vector y, N_Vector z);
SUNDIALS_EXPORT void N_VConst_Trilinos(sunrealtype c, N_Vector z);
Expand Down
10 changes: 7 additions & 3 deletions src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,15 @@ SWIGEXPORT void _wrap_FN_VSpace_MPIManyVector(N_Vector farg1, int64_t *farg2, in
SWIGEXPORT int _wrap_FN_VGetCommunicator_MPIManyVector(N_Vector farg1) {
int fresult ;
N_Vector arg1 = (N_Vector) 0 ;
SUNComm result;
MPI_Comm result;

arg1 = (N_Vector)(farg1);
result = (SUNComm)N_VGetCommunicator_MPIManyVector(arg1);
fresult = (SUNComm)(result);
result = N_VGetCommunicator_MPIManyVector(arg1);
#ifdef SUNDIALS_MPI_ENABLED
fresult = (int)(MPI_Comm_c2f(result));
#else
fresult = result;
#endif
return fresult;
}

Expand Down
4 changes: 2 additions & 2 deletions src/nvector/manyvector/fmod/fnvector_mpimanyvector_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,14 @@ subroutine FN_VSpace_MPIManyVector(v, lrw, liw)
function FN_VGetCommunicator_MPIManyVector(v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer :: swig_result
type(N_Vector), target, intent(inout) :: v
integer(C_INT) :: fresult
type(C_PTR) :: farg1

farg1 = c_loc(v)
fresult = swigc_FN_VGetCommunicator_MPIManyVector(farg1)
swig_result = fresult
swig_result = int(fresult)
end function

function FN_VGetLength_MPIManyVector(v) &
Expand Down
10 changes: 7 additions & 3 deletions src/nvector/parallel/fmod/fnvector_parallel_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,15 @@ SWIGEXPORT void _wrap_FN_VSetArrayPointer_Parallel(double *farg1, N_Vector farg2
SWIGEXPORT int _wrap_FN_VGetCommunicator_Parallel(N_Vector farg1) {
int fresult ;
N_Vector arg1 = (N_Vector) 0 ;
SUNComm result;
MPI_Comm result;

arg1 = (N_Vector)(farg1);
result = (SUNComm)N_VGetCommunicator_Parallel(arg1);
fresult = (SUNComm)(result);
result = N_VGetCommunicator_Parallel(arg1);
#ifdef SUNDIALS_MPI_ENABLED
fresult = (int)(MPI_Comm_c2f(result));
#else
fresult = result;
#endif
return fresult;
}

Expand Down
4 changes: 2 additions & 2 deletions src/nvector/parallel/fmod/fnvector_parallel_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -891,14 +891,14 @@ subroutine FN_VSetArrayPointer_Parallel(v_data, v)
function FN_VGetCommunicator_Parallel(v) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_INT) :: swig_result
integer :: swig_result
type(N_Vector), target, intent(inout) :: v
integer(C_INT) :: fresult
type(C_PTR) :: farg1

farg1 = c_loc(v)
fresult = swigc_FN_VGetCommunicator_Parallel(farg1)
swig_result = fresult
swig_result = int(fresult)
end function

subroutine FN_VLinearSum_Parallel(a, x, b, y, z)
Expand Down

0 comments on commit 7e78db8

Please sign in to comment.