Skip to content

Commit bac716f

Browse files
committed
merge trunk
2 parents c8e9317 + ffae5f6 commit bac716f

File tree

73 files changed

+4063
-1295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4063
-1295
lines changed

Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ distclean: clean
435435
include/spatialindex include/spud include/spud.h \
436436
include/spud_enums.h include/tinystr.h include/tinyxml.h \
437437
include/version.h include/vtk.h \
438-
preprocessor/check_options.F90 schemas/flml \
438+
preprocessor/check_options.F90 \
439439
preprocessor/register_diagnostics.F90 python/setup.py > \
440440
/dev/null
441441
@for i in `find ./*/ -name Makefile.in`; do rm -f `echo $$i | sed 's/.in$$//'`; done > /dev/null
@@ -551,7 +551,7 @@ install: default fltools
551551
mkdir -p $(DESTDIR)$(datadir)/fluidity
552552
cp -r schemas/ $(DESTDIR)$(datadir)/fluidity/
553553
mkdir -p $(DESTDIR)$(datadir)/diamond/schemata
554-
cp schemas/flml $(DESTDIR)$(datadir)/diamond/schemata
554+
sed 's/$${datadir}/$(subst /,\/,$(datadir))/g' schemas/flml.in > $(DESTDIR)$(datadir)/diamond/schemata/flml
555555
cd python ; python setup.py install --root=$(shell echo ${DESTDIR} | sed 's/^$$/\//') --prefix="$(prefix)" $$FLUIDITY_PYTHON_INSTALL_ARGS
556556
cp -r examples/ $(DESTDIR)$(docdir)/fluidity
557557
find $(DESTDIR)$(docdir)/fluidity/examples -type f -exec sed -i "s/\.\.\/\.\.\/\.\.\/bin\///" '{}' \;

aclocal.m4

-70
Original file line numberDiff line numberDiff line change
@@ -945,76 +945,6 @@ EOD`
945945
#
946946
])
947947

948-
AC_DEFUN([ACX_zoltan], [
949-
# Set variables...
950-
AC_ARG_WITH(
951-
[zoltan],
952-
[ --with-zoltan=prefix Prefix where zoltan is installed],
953-
[zoltan="$withval"],
954-
[])
955-
956-
tmpLIBS=$LIBS
957-
tmpCPPFLAGS=$CPPFLAGS
958-
if test $zoltan != no; then
959-
if test $zoltan != yes; then
960-
zoltan_LIBS_PATH="$zoltan/lib"
961-
zoltan_INCLUDES_PATH="$zoltan/include"
962-
# Ensure the comiler finds the library...
963-
tmpLIBS="$tmpLIBS -L$zoltan_LIBS_PATH"
964-
tmpCPPFLAGS="$tmpCPPFLAGS -I/$zoltan_INCLUDES_PATH"
965-
fi
966-
tmpLIBS="$tmpLIBS -L/usr/lib -L/usr/local/lib/ -lzoltan -lparmetis -lmetis $ZOLTAN_DEPS"
967-
tmpCPPFLAGS="$tmpCPPFLAGS -I/usr/include/ -I/usr/local/include/"
968-
fi
969-
LIBS=$tmpLIBS
970-
CPPFLAGS=$tmpCPPFLAGS
971-
# Check that the compiler uses the library we specified...
972-
if test -e $zoltan_LIBS_PATH/libzoltan.a; then
973-
echo "note: using $zoltan_LIBS_PATH/libzoltan.a"
974-
fi
975-
976-
# Check that the compiler uses the include path we specified...
977-
if test -e $zoltan_INCLUDES_PATH/zoltan.mod; then
978-
echo "note: using $zoltan_INCLUDES_PATH/zoltan.mod"
979-
fi
980-
981-
AC_LANG_SAVE
982-
AC_LANG_C
983-
AC_CHECK_LIB(
984-
[zoltan],
985-
[Zoltan_Initialize],
986-
[AC_DEFINE(HAVE_ZOLTAN,1,[Define if you have zoltan library.])],
987-
[AC_MSG_ERROR( [Could not link in the zoltan library... exiting] )] )
988-
989-
# Small test for zoltan .mod files:
990-
AC_LANG(Fortran)
991-
ac_ext=F90
992-
# In fluidity's makefile we explicitly add CPPFLAGS, temporarily add it to
993-
# FCFLAGS here for this zoltan test:
994-
tmpFCFLAGS="$FCFLAGS"
995-
FCFLAGS="$FCFLAGS $CPPFLAGS"
996-
AC_LINK_IFELSE(
997-
[AC_LANG_SOURCE([
998-
program test_zoltan
999-
use zoltan
1000-
end program test_zoltan
1001-
])],
1002-
[
1003-
AC_MSG_NOTICE([Great success! Zoltan .mod files exist and are usable])
1004-
],
1005-
[
1006-
cp conftest.F90 test_zoltan.F90
1007-
AC_MSG_FAILURE([Failed to find zoltan.mod files])])
1008-
# And now revert FCFLAGS
1009-
FCFLAGS="$tmpFCFLAGS"
1010-
AC_LANG_RESTORE
1011-
1012-
ZOLTAN="yes"
1013-
AC_SUBST(ZOLTAN)
1014-
1015-
echo $LIBS
1016-
])dnl ACX_zoltan
1017-
1018948
AC_DEFUN([ACX_adjoint], [
1019949
# Set variables...
1020950
AC_ARG_WITH(

assemble/Full_Projection.F90

+25-27
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,24 @@ subroutine petsc_solve_setup_full_projection(y,A,b,ksp,petsc_numbering_p,name,so
336336
state, inner_mesh, blocks(div_matrix_comp,2), inner_option_path, matrix_has_solver_cache=.false., &
337337
mesh_positions=mesh_positions)
338338
rotation_matrix => extract_petsc_csr_matrix(state, "RotationMatrix", stat=rotation_stat)
339+
340+
if (associated(mesh_positions)) then
341+
if (rotation_stat==0) then
342+
call attach_null_space_from_options(inner_M%M, inner_solver_option_path, &
343+
positions=mesh_positions, rotation_matrix=rotation_matrix%M, &
344+
petsc_numbering=petsc_numbering_u)
345+
else
346+
call attach_null_space_from_options(inner_M%M, inner_solver_option_path, &
347+
positions=mesh_positions, petsc_numbering=petsc_numbering_u)
348+
end if
349+
elseif (rotation_stat==0) then
350+
call attach_null_space_from_options(inner_M%M, inner_solver_option_path, &
351+
rotation_matrix=rotation_matrix%M, petsc_numbering=petsc_numbering_u)
352+
else
353+
call attach_null_space_from_options(inner_M%M, inner_solver_option_path, &
354+
petsc_numbering=petsc_numbering_u)
355+
end if
356+
339357
if (associated(prolongators)) then
340358
if (rotation_stat==0) then
341359
FLExit("Rotated boundary conditions do not work with mg prolongators")
@@ -344,31 +362,13 @@ subroutine petsc_solve_setup_full_projection(y,A,b,ksp,petsc_numbering_p,name,so
344362
if (associated(surface_nodes)) then
345363
FLExit("Internal smoothing not available for inner solve")
346364
end if
347-
if (associated(mesh_positions)) then
348-
call setup_ksp_from_options(ksp_schur, inner_M%M, inner_M%M, &
349-
inner_solver_option_path, petsc_numbering=petsc_numbering_u, startfromzero_in=.true., &
350-
prolongators=prolongators, positions=mesh_positions)
351-
else
352-
call setup_ksp_from_options(ksp_schur, inner_M%M, inner_M%M, &
353-
inner_solver_option_path, petsc_numbering=petsc_numbering_u, startfromzero_in=.true., &
354-
prolongators=prolongators)
355-
end if
365+
call setup_ksp_from_options(ksp_schur, inner_M%M, inner_M%M, &
366+
inner_solver_option_path, petsc_numbering=petsc_numbering_u, startfromzero_in=.true., &
367+
prolongators=prolongators)
356368
do i=1, size(prolongators)
357369
call deallocate(prolongators(i))
358370
end do
359371
deallocate(prolongators)
360-
else if (associated(mesh_positions) .and. rotation_stat==0) then
361-
call setup_ksp_from_options(ksp_schur, inner_M%M, inner_M%M, &
362-
inner_solver_option_path, petsc_numbering=petsc_numbering_u, startfromzero_in=.true., &
363-
positions=mesh_positions, rotation_matrix=rotation_matrix%M)
364-
else if (associated(mesh_positions)) then
365-
call setup_ksp_from_options(ksp_schur, inner_M%M, inner_M%M, &
366-
inner_solver_option_path, petsc_numbering=petsc_numbering_u, startfromzero_in=.true., &
367-
positions=mesh_positions)
368-
else if (rotation_stat==0) then
369-
call setup_ksp_from_options(ksp_schur, inner_M%M, inner_M%M, &
370-
inner_solver_option_path, petsc_numbering=petsc_numbering_u, startfromzero_in=.true., &
371-
rotation_matrix=rotation_matrix%M)
372372
else
373373
call setup_ksp_from_options(ksp_schur, inner_M%M, inner_M%M, &
374374
inner_solver_option_path, petsc_numbering=petsc_numbering_u, startfromzero_in=.true.)
@@ -388,6 +388,8 @@ subroutine petsc_solve_setup_full_projection(y,A,b,ksp,petsc_numbering_p,name,so
388388

389389
if(have_preconditioner_matrix) then
390390
pmat=csr2petsc(preconditioner_matrix, petsc_numbering_p, petsc_numbering_p)
391+
else
392+
pmat=A
391393
end if
392394

393395
! Set up RHS and Solution vectors (note these are loaded later):
@@ -399,12 +401,8 @@ subroutine petsc_solve_setup_full_projection(y,A,b,ksp,petsc_numbering_p,name,so
399401

400402
parallel=IsParallel()
401403

402-
if(have_preconditioner_matrix) then
403-
call SetupKSP(ksp,A,pmat,solver_option_path,parallel,petsc_numbering_p, lstartfromzero)
404-
else
405-
! If preconditioner matrix is not required, send in A instead:
406-
call SetupKSP(ksp,A,A,solver_option_path,parallel,petsc_numbering_p, lstartfromzero)
407-
end if
404+
call attach_null_space_from_options(A, solver_option_path, pmat=pmat, petsc_numbering=petsc_numbering_p)
405+
call SetupKSP(ksp,A,pmat,solver_option_path,parallel,petsc_numbering_p, lstartfromzero)
408406

409407
! Destroy the matrices setup for the schur complement computation. While
410408
! these matrices are destroyed here, they are still required for the inner solve,

0 commit comments

Comments
 (0)