Commit e3056d8f authored by Adam Powell's avatar Adam Powell

Imported Upstream version 5.5.0.svn.5159.dfsg

parent e071c60e
***** ElmerGrid input file for structured grid generation *****
Version = 210903
Coordinate System = Cartesian 3D
Subcell Divisions in 3D = 1 1 1
Subcell Sizes 1 = 1
Subcell Sizes 2 = 1
Subcell Sizes 3 = 1
Material Structure in 2D
1
End
Materials Interval = 1 1
Boundary Definitions
! type out int
1 0 1 1
End
Numbering = Horizontal
Element Degree = 1
Element Innernodes = False
Reference Density = 0.25
......@@ -18,3 +18,23 @@ Our policy regarding the distribution of METIS with third-party applications is
o METIS is a relatively small portion of the overall application.
elmergrid GPL Exception v. 1.0
==============================
Additional rights granted by the copyright holder, beyond GPL version 2.
-------------------------------------------------------------------------
As an exception to the conditions of Gnu General Public Licence version 2
(GPL-2), CSC - IT Center for Science Ltd., the copyright holder of
elmergrid, hereby grants you the right to link the source code within this
directory against the libraries of
"METIS" v. 4.0.1 by Regents of the University of Minnesota
"Scotch" v. 5.0 by François Pellegrini
You may also link ElmerGUI against any later versions of METIS or Scotch,
provided that the license permits such usage. The license terms for the
METIS library are above, and the CeCILL-C license terms for the Scotch
library can be found from
http://www.labri.fr/perso/pelegrin/scotch/
dnl ----------------------------------------------------
dnl Platform specific autoconf tests
dnl
dnl This is part of the input for the ./configure script of
dnl the deal.II libraries. All options and paths are stored in
dnl the file common/Make.global_options.
dnl
dnl In doc/Makefile some information on the kind of documentation
dnl is stored.
dnl
dnl
dnl Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors
dnl
dnl $Id: aclocal.m4 17530 2008-11-10 14:55:13Z bangerth $
dnl ------------------------------------------------------------
dnl Check whether Metis is installed, and if so store the
dnl respective links
dnl
dnl Usage: DEAL_II_CONFIGURE_METIS
dnl
dnl ------------------------------------------------------------
AC_DEFUN(DEAL_II_CONFIGURE_METIS, dnl
[
dnl First check for the Metis directory
AC_ARG_WITH(metis,
[ --with-metis=/path/to/metis Specify the path to the Metis installation,
of which the include and library directories
are subdirs; use this if you want to override
the METIS_DIR environment variable.],
[
USE_CONTRIB_METIS=yes
DEAL_II_METIS_DIR=$withval
AC_MSG_RESULT($DEAL_II_METIS_DIR)
dnl Make sure that what was specified is actually correct
if test ! -d $DEAL_II_METIS_DIR/Lib ; then
AC_MSG_WARN([Path to Metis specified with --with-metis does not
point to a complete Metis installation])
fi
DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR"
DEAL_II_METIS_INCDIR="$DEAL_II_METIS_DIR/Lib"
],
[
dnl Take something from the environment variables, if it is there
if test "x$METIS_DIR" != "x" ; then
USE_CONTRIB_METIS=yes
DEAL_II_METIS_DIR="$METIS_DIR"
AC_MSG_RESULT($DEAL_II_METIS_DIR)
dnl Make sure that what this is actually correct
if test ! -d $DEAL_II_METIS_DIR/Lib ; then
AC_MSG_ERROR([The path to Metis specified in the METIS_DIR
environment variable does not
point to a complete Metis installation])
fi
DEAL_II_METIS_LIBDIR="$DEAL_II_METIS_DIR"
DEAL_II_METIS_INCDIR="$DEAL_II_METIS_DIR/Lib"
else
USE_CONTRIB_METIS=no
DEAL_II_METIS_DIR=""
fi
])
AC_ARG_WITH(metis-include,
[ --with-metis-include=/path/to/metis Specify the path to the METIS headers file;
use this if you want to override the
METIS_INCLUDE_DIR environment variable.],
[
METIS_INCLUDE_DIR=$withval
DEAL_II_METIS_INCDIR="$METIS_INCLUDE_DIR"
])
AC_ARG_WITH(metis-libs,
[ --with-metis-libs=/path/to/metis Specify the path to the METIS libraries;
use this if you want to override the
METIS_LIBDIR environment variable.],
[
USE_CONTRIB_METIS=yes
DEAL_II_METIS_LIBDIR=$withval
AC_MSG_RESULT($DEAL_II_METIS_LIBDIR)
dnl Make sure that what was specified is actually correct
if test ! -d $DEAL_II_METIS_LIBDIR ; then
AC_MSG_ERROR([Path to Metis specified with --with-metis does not
point to a complete Metis installation])
fi
],
[
dnl Take something from the environment variables, if it is there
if test "x$METIS_LIBDIR" != "x" ; then
USE_CONTRIB_METIS=yes
DEAL_II_METIS_LIBDIR="$METIS_LIBDIR"
AC_MSG_RESULT($DEAL_II_METIS_LIBDIR)
dnl Make sure that what this is actually correct
if test ! -d $DEAL_II_METIS_LIBDIR ; then
AC_MSG_ERROR([The path to Metis specified in the METIS_DIR
environment variable does not
point to a complete Metis installation])
fi
else
dnl Unless --with-metis has been set before, declare that METIS
dnl is not desired.
if test "x$USE_CONTRIB_METIS" != "xyes" ; then
USE_CONTRIB_METIS=no
DEAL_II_METIS_LIBDIR=""
fi
fi
])
if test "x$USE_CONTRIB_METIS" = "xyes" ; then
AC_DEFINE(DEAL_II_USE_METIS, 1,
[Defined if a Metis installation was found and is going
to be used])
LDFLAGS="$LDFLAGS -L$DEAL_II_METIS_LIBDIR -lmetis"
dnl AC_MSG_CHECKING(for Metis version)
dnl DEAL_II_METIS_VERSION=`cat $DEAL_II_METIS_DIR/VERSION`
dnl AC_MSG_RESULT($DEAL_II_METIS_VERSION)
fi
])
......@@ -3977,7 +3977,7 @@ int LoadUniversalMesh(struct FemType *data,char *prefix,int info)
return(1);
}
}
printf("Reading mesh from universal mesh file %s.\n",filename);
InitializeKnots(data);
......@@ -4015,6 +4015,8 @@ omstart:
for(;;) {
if(0) printf("line: %d %s\n",mode,line);
nextline:
if( !strncmp(line," -1",6)) mode = 0;
if(Getrow(line,in,FALSE)) goto end;
......@@ -4025,12 +4027,15 @@ omstart:
else if( !strncmp(line," 2412",6)) mode = 2412;
else if( !strncmp(line," 2467",6)) mode = 2467;
else if( !strncmp(line," 2435",6)) mode = 2435;
else if( !strncmp(line," 781",6)) mode = 781;
else if( !strncmp(line," 780",6)) mode = 780;
else if(1 && allocated && strncmp(line," ",6)) printf("Unknown mode: %s",line);
if(debug && mode) printf("Current mode is %d\n",mode);
/* node definition */
if( mode == 2411) {
if( mode == 2411 || mode == 781 ) {
if(debug) printf("Reading nodes\n");
for(;;) {
Getrow(line,in,FALSE);
......@@ -4063,7 +4068,7 @@ omstart:
}
if( mode == 2412) {
if( mode == 2412 ) {
if(debug) printf("Reading elements\n");
for(;;) {
Getrow(line,in,FALSE);
......@@ -4097,8 +4102,66 @@ omstart:
printf("new elementtype in elmer: %d (unv: %d)\n",elmertype,unvtype);
}
if(elmertype%100 != nonodes)
if(elmertype % 100 != nonodes) {
printf("nonodes = %d elemtype = %d elid = %d\n",nonodes,elmertype,elid);
nonodes = elmertype % 100;
}
data->elementtypes[noelements] = elmertype;
for(i=0;i<nonodes;i++)
data->topology[noelements][i] = next_int(&cp);
CheckRedundantIndexes(nonodes,data->topology[noelements]);
/* should this be physical property or material property? */
data->material[noelements] = physind;
}
}
}
if( mode == 780 ) {
int physind2,matind2;
if(debug) printf("Reading elements\n");
for(;;) {
Getrow(line,in,FALSE);
if( !strncmp(line," -1",6)) goto nextline;
noelements += 1;
cp = line;
elid = next_int(&cp);
unvtype = next_int(&cp);
physind = next_int(&cp);
physind2 = next_int(&cp);
matind = next_int(&cp);
matind2 = next_int(&cp);
colorind = next_int(&cp);
nonodes = next_int(&cp);
if (!allocated) {
maxnodes = MAX(maxnodes, nonodes);
if(elid != noelements) reorderelements = TRUE;
maxelem = MAX(maxelem, elid);
}
if(unvtype == 11) Getrow(line,in,FALSE);
Getrow(line,in,FALSE);
cp = line;
if(allocated) {
if(reorderelements) u2eelem[elid] = noelements;
elmertype = UnvToElmerType(unvtype);
if(debug && !elementtypes[elmertype]) {
elementtypes[elmertype] = TRUE;
printf("new elementtype in elmer: %d (unv: %d)\n",elmertype,unvtype);
}
if(elmertype % 100 != nonodes) {
printf("nonodes = %d elemtype = %d elid = %d\n",nonodes,elmertype,elid);
nonodes = elmertype % 100;
}
data->elementtypes[noelements] = elmertype;
for(i=0;i<nonodes;i++)
......
......@@ -1028,6 +1028,7 @@ CONTAINS
NewMesh => AllocateMesh()
NewMesh % MaxElementNodes = 3
NewMesh % MaxElementDOFs = 3
NewMesh % MeshDim = RefMesh % MeshDim
! Create node tables for the new mesh:
! ------------------------------------
......
......@@ -1008,6 +1008,18 @@ END FUNCTION CRS_RowSum
END DO
END SUBROUTINE CRS_PrintMatrix
!------------------------------------------------------------------------------
SUBROUTINE CRS_PrintRHS( A )
!------------------------------------------------------------------------------
TYPE(Matrix_t) :: A
INTEGER :: i
DO i=1,A % NumberOfRows
WRITE(1,*) i,A % RHS(i)
END DO
END SUBROUTINE CRS_PrintRHS
!------------------------------------------------------------------------------
......
......@@ -2012,7 +2012,7 @@ CONTAINS
LOGICAL :: Found
TYPE(Solver_t), POINTER :: Solver
CHARACTER(LEN=MAX_NAME_LEN) :: linsolver, precond
CHARACTER(LEN=MAX_NAME_LEN) :: linsolver, precond, dumpfile
Solver => CurrentModel % Solver
......@@ -2024,6 +2024,19 @@ CONTAINS
x => Solver % Variable
SOL => x % Values
dumpfile=GetString( GetSolverParams(), 'Dump system matrix', Found)
IF ( Found ) THEN
OPEN(1,FILE=dumpfile, STATUS='Unknown')
CALL CRS_PrintMatrix(A)
CLOSE(1)
END IF
dumpfile=GetString( GetSolverParams(), 'Dump system RHS', Found)
IF ( Found ) THEN
OPEN(1,FILE=dumpfile, STATUS='Unknown')
CALL CRS_PrintRHS(A)
CLOSE(1)
END IF
CALL SolveSystem( A, ParMatrix, b, x % Values, x % Norm, x % DOFs, Solver )
Norm = x % Norm
......@@ -3015,7 +3028,7 @@ CONTAINS
DOF, local, numEdgeDofs,istat, n_start, Offset
LOGICAL :: Flag,Found, ConstantValue
TYPE(ValueList_t), POINTER :: BC, ptr
TYPE(ValueList_t), POINTER :: BC, ptr, Params
TYPE(Element_t), POINTER :: Element, Parent, Edge, Face, SaveElement
CHARACTER(LEN=MAX_NAME_LEN) :: name
......@@ -3027,6 +3040,12 @@ CONTAINS
ELSE
Solver => CurrentModel % Solver
END IF
Params => GetSolverParams(Solver)
IF ( GetString(Params,'Linear System Solver',Found)=='feti') THEN
IF ( GetLogical(Params,'Total FETI', Found)) RETURN
END IF
A => Solver % Matrix
b => A % RHS
IF ( PRESENT(Ux) ) THEN
......@@ -3133,6 +3152,7 @@ CONTAINS
CALL SetDirichletBoundaries( CurrentModel, A, b, &
Name, DOF, x % DOFs, x % Perm, Offset, OffDiagonalMatrix )
! Dirichlet BCs for face & edge DOFs:
! -----------------------------------
SaveElement => CurrentModel % CurrentElement
......@@ -3314,7 +3334,7 @@ CONTAINS
CASE(3)
! If no faces present do not try to set boundary conditions
! @todo This should be changed to EXIT
IF ( .NOT. ASSOCIATED( Solver % Mesh % Faces ) ) CYCLE
IF ( .NOT. ASSOCIATED(Solver % Mesh % Faces) ) CYCLE
! Parameters of element
n = Element % TYPE % NumberOfNodes
......@@ -4110,5 +4130,4 @@ CONTAINS
!------------------------------------------------------------------------------
END MODULE DefUtils
......@@ -57,8 +57,8 @@ CONTAINS
!------------------------------------------------------------------------------
LOGICAL, OPTIONAL :: Free_Fact
TYPE(Matrix_t) :: A
REAL(KIND=dp) :: x(*),b(*)
TYPE(Matrix_t), POINTER :: A
!------------------------------------------------------------------------------
......@@ -172,8 +172,8 @@ CONTAINS
SUBROUTINE BandSolver( A,x,b,Free_Fact )
!------------------------------------------------------------------------------
LOGICAL, OPTIONAL :: Free_Fact
TYPE(Matrix_t) :: A
REAL(KIND=dp) :: x(*),b(*)
TYPE(Matrix_t), POINTER :: A
!------------------------------------------------------------------------------
INTEGER :: i,j,k,istat,Subband,N
......@@ -289,7 +289,7 @@ CONTAINS
SUBROUTINE UMFPack_SolveSystem( Solver,A,x,b,Free_Fact )
!------------------------------------------------------------------------------
LOGICAL, OPTIONAL :: Free_Fact
TYPE(Matrix_t), POINTER :: A
TYPE(Matrix_t) :: A
TYPE(Solver_t) :: Solver
REAL(KIND=dp), TARGET :: x(*), b(*)
......@@ -469,11 +469,74 @@ CONTAINS
!------------------------------------------------------------------------------
!------------------------------------------------------------------------------
SUBROUTINE Cholmod_SolveSystem( Solver,A,x,b,Free_fact)
!------------------------------------------------------------------------------
LOGICAL, OPTIONAL :: Free_Fact
TYPE(Matrix_t) :: A
TYPE(Solver_t) :: Solver
REAL(KIND=dp) :: x(*), b(*)
INTEGER(KIND=AddrInt) :: cholmod_ffactorize
LOGICAL :: Factorize, FreeFactorize, Found
REAL(KIND=dp), POINTER CONTIG :: Vals(:)
INTEGER, POINTER CONTIG :: Rows(:), Cols(:), Diag(:)
#ifdef HAVE_CHOLMOD
IF ( PRESENT(Free_Fact) ) THEN
IF ( Free_Fact ) THEN
IF ( A % Cholmod/=0 ) THEN
CALL cholmod_ffree(A % cholmod)
A % cholmod = 0
END IF
RETURN
END IF
END IF
Factorize = ListGetLogical( Solver % Values, &
'Linear System Refactorize', Found )
IF ( .NOT. Found ) Factorize = .TRUE.
IF ( Factorize .OR. A% cholmod==0 ) THEN
IF ( A % cholmod==0 ) THEN
CALL cholmod_ffree(A % cholmod)
A % cholmod = 0
END IF
Rows => A % Rows
Cols => A % Cols
Vals => A % Values
Rows=Rows-1; Cols=Cols-1 ! c numbering
A % Cholmod=cholmod_ffactorize(A % NumberOfRows, Rows, Cols, Vals)
Rows=Rows+1; Cols=Cols+1 ! fortran numbering
END IF
CALL cholmod_fsolve(A % cholmod, A % NumberOfRows, x, b);
FreeFactorize = ListGetLogical( Solver % Values, &
'Linear System Free Factorization', Found )
IF ( .NOT. Found ) FreeFactorize = .TRUE.
IF ( Factorize .AND. FreeFactorize ) THEN
CALL cholmod_ffree(A % cholmod)
A % cholmod = 0
END IF
#else
CALL Fatal( 'Cholmod_SolveSystem', 'Cholmod Solver has not been installed.' )
#endif
!------------------------------------------------------------------------------
END SUBROUTINE Cholmod_SolveSystem
!------------------------------------------------------------------------------
!------------------------------------------------------------------------------
SUBROUTINE Mumps_SolveSystem( Solver,A,x,b,Free_Fact )
!------------------------------------------------------------------------------
LOGICAL, OPTIONAL :: Free_Fact
TYPE(Matrix_t), POINTER :: A
TYPE(Matrix_t) :: A
TYPE(Solver_t) :: Solver
REAL(KIND=dp), TARGET :: x(*), b(*)
......@@ -645,7 +708,7 @@ CONTAINS
SUBROUTINE SuperLU_SolveSystem( Solver,A,x,b,Free_Fact )
!------------------------------------------------------------------------------
LOGICAL, OPTIONAL :: Free_fact
TYPE(Matrix_t), POINTER :: A
TYPE(Matrix_t) :: A
TYPE(Solver_t) :: Solver
REAL(KIND=dp), TARGET :: x(*), b(*)
......@@ -744,8 +807,8 @@ CONTAINS
IMPLICIT NONE
TYPE(Matrix_t), POINTER :: A
LOGICAL, OPTIONAL :: Free_fact
TYPE(Matrix_t) :: A
TYPE(Solver_t) :: Solver
REAL(KIND=dp), TARGET :: x(*), b(*)
......@@ -940,7 +1003,7 @@ CONTAINS
TYPE(Solver_t) :: Solver
REAL(KIND=dp) :: x(*),b(*)
TYPE(Matrix_t), POINTER :: A
TYPE(Matrix_t) :: A
LOGICAL, OPTIONAL :: Free_Fact
!------------------------------------------------------------------------------
......@@ -963,6 +1026,9 @@ CONTAINS
#endif
#ifdef HAVE_UMFPACK
CALL Umfpack_SolveSystem( Solver, A, x, b, Free_Fact )
#endif
#ifdef HAVE_CHOLMOD
CALL Cholmod_SolveSystem( Solver, A, x, b, Free_Fact )
#endif
RETURN
END IF
......@@ -982,6 +1048,9 @@ CONTAINS
CASE( 'umfpack', 'big umfpack' )
CALL Umfpack_SolveSystem( Solver, A, x, b )
CASE( 'cholmod' )
CALL Cholmod_SolveSystem( Solver, A, x, b )
CASE( 'mumps' )
CALL Mumps_SolveSystem( Solver, A, x, b )
......
This diff is collapsed.
......@@ -74,7 +74,6 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
!------------------------------------------------------------------------------
TYPE(Solver_t) :: Solver
TYPE(Model_t) :: Model
REAL(KIND=dp) :: dt
LOGICAL :: TransientSimulation
!------------------------------------------------------------------------------
......@@ -83,7 +82,6 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
REAL(KIND=dp), ALLOCATABLE :: Pressure(:), Velocity(:,:), Viscosity(:)
REAL(KIND=dp), ALLOCATABLE :: ShearData(:,:)
REAL(KIND=dp), ALLOCATABLE :: MomentAbout(:,:), Forces(:,:), Moments(:,:), Areas(:)
TYPE(Solver_t), POINTER :: FlowSolver
REAL(KIND=dp) :: Force(3), Moment(3), Area, ShearStress
LOGICAL :: Stat, CalculateMoment, ViscousForce, Compressible, SumForces
LOGICAL :: ShearOutput
......@@ -98,22 +96,11 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
CHARACTER(LEN=MAX_NAME_LEN) :: ShearFilename, MessageL, ViscosityFlag
CHARACTER(LEN=MAX_NAME_LEN) :: CompressibilityFlag, BoundaryName, VariableName
DO i=1,Model % NumberOfSolvers
FlowSolver => Model % Solvers(i)
IF ( ListGetString( FlowSolver % Values, 'Equation' ) == 'navier-stokes' ) EXIT
END DO
Mesh => Model % Meshes
DO WHILE( ASSOCIATED(Mesh) )
IF ( Mesh % OutputActive ) EXIT
Mesh => Mesh % Next
END DO
CALL Info( 'ForceCompute', '-------------------------------------',Level=4 )
CALL Info( 'ForceCompute', 'Computing Fluidic Force: ', Level=4 )
CALL Info( 'ForceCompute', '-------------------------------------',Level=4 )
CALL SetCurrentMesh( Model, Mesh )
Mesh => GetMesh()
VariableName = GetString( Solver % Values, 'Velocity Field Name', stat )
IF ( .NOT. stat ) THEN
......@@ -122,23 +109,16 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
Var => VariableGet( Mesh % Variables, VariableName, .TRUE. )
END IF
ALLOCATE( ElementNodes % x(Mesh % MaxElementNodes) )
ALLOCATE( ElementNodes % y(Mesh % MaxElementNodes) )
ALLOCATE( ElementNodes % z(Mesh % MaxElementNodes) )
ALLOCATE( Pressure( Mesh % MaxElementNodes ) )
ALLOCATE( Viscosity( Mesh % MaxElementNodes ) )
ALLOCATE( Velocity( 3,Mesh % MaxElementNodes ) )
n = Mesh % MaxElementNodes
ALLOCATE( ElementNodes % x(n), ElementNodes % y(n), ElementNodes % z(n))
ALLOCATE( ParentNodes % x(n), ParentNodes % y(n), ParentNodes % z(n) )
ALLOCATE( Pressure( n ), Viscosity( n ), Velocity( 3, n ) )
ALLOCATE( MomentAbout(3,n) )
ALLOCATE( MomentAbout(3,Mesh % MaxElementNodes) )
ALLOCATE( Forces(Model % NumberOfBCs,3) )
ALLOCATE( Moments(Model % NumberOfBCs,3) )
ALLOCATE( Areas(Model % NumberOfBCs) )
ALLOCATE( ParentNodes % x(Mesh % MaxElementNodes) )
ALLOCATE( ParentNodes % y(Mesh % MaxElementNodes) )
ALLOCATE( ParentNodes % z(Mesh % MaxElementNodes) )
MomentAbout = 0.0d0
Forces = 0.0d0
Moments = 0.0d0
......@@ -181,8 +161,7 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
DO t = Mesh % NumberOfBulkElements + 1, &
Mesh % NumberOfBulkElements + &
Mesh % NumberOfBoundaryElements
Mesh % NumberOfBulkElements + Mesh % NumberOfBoundaryElements
!------------------------------------------------------------------------------
CurrentElement => Mesh % Elements(t)
......@@ -231,6 +210,7 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
minv=1, maxv=Model % NumberOFMaterials )
Material => Model % Materials(j) % Values
Model % CurrentElement => Parent
Compressible = .FALSE.
CompressibilityFlag = ListGetString( Material, &
'Compressibility Model', stat)
......@@ -342,8 +322,6 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
IF ( ShearOutput ) THEN
! IF ( .FALSE. ) THEN
ALLOCATE( Indices( NbrShearValues ) )
Indices = 0
Indices = (/ ( i, i= 1,NbrShearValues ) /)
......@@ -364,7 +342,6 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
ShearData(1:NbrShearValues,1) = ShearData(Indices,1)
ShearData(1:NbrShearValues,2) = ShearData(Indices,2)
END IF
! END IF
OPEN(10, FILE=ShearFilename)
DO t = 1, NbrShearValues
......@@ -388,16 +365,11 @@ SUBROUTINE ForceCompute( Model,Solver,dt,TransientSimulation )
END IF
DEALLOCATE( ElementNodes % x )
DEALLOCATE( ElementNodes % y )
DEALLOCATE( ElementNodes % z )
DEALLOCATE( ElementNodes % x, ElementNodes % y, ElementNodes % z )
DEALLOCATE( ParentNodes % x, ParentNodes % y, ParentNodes % z )
DEALLOCATE( Forces, Moments, Areas)
DEALLOCATE( Pressure, Viscosity, Velocity )
DEALLOCATE( ParentNodes % x )
DEALLOCATE( ParentNodes % y )
DEALLOCATE( ParentNodes % z )
CONTAINS
......
This diff is collapsed.
......@@ -131,7 +131,8 @@ CONTAINS
!------------------------------------------------------------------------------
RECURSIVE SUBROUTINE IterSolver( A,x,b,SolverParam,ndim,DotF,NormF,MatvecF,PrecF )
RECURSIVE SUBROUTINE IterSolver( A,x,b,SolverParam,ndim,DotF, &
NormF,MatvecF,PrecF,StopcF )
!------------------------------------------------------------------------------
USE SParIterGlobals
......@@ -142,7 +143,7 @@ CONTAINS
REAL(KIND=dp), DIMENSION(:) CONTIG :: x,b
TYPE(Matrix_t), POINTER :: A, Adiag
INTEGER, OPTIONAL :: ndim
INTEGER(KIND=AddrInt), OPTIONAL :: DotF, NormF, MatVecF, PrecF
INTEGER(KIND=AddrInt), OPTIONAL :: DotF, NormF, MatVecF, PrecF, StopcF
!------------------------------------------------------------------------------
REAL(KIND=dp) :: dpar(50),stopfun
......@@ -175,7 +176,7 @@ CONTAINS
INTEGER(KIND=Addrint) :: dotProc, normProc, pcondProc, &
pcondrProc=0, mvProc, AddrFunc, iterProc
pcondrProc=0, mvProc, AddrFunc, iterProc, StopcProc
INTERFACE
SUBROUTINE VankaCreate(A,Solver)
......@@ -287,7 +288,13 @@ CONTAINS
END SELECT
!------------------------------------------------------------------------------
HUTI_STOPC = HUTI_TRESID_SCALED_BYB
IF (PRESENT(StopcF)) THEN
StopcProc = StopcF
HUTI_STOPC = HUTI_USUPPLIED_STOPC
ELSE
StopcProc = AddrFunc(Stopc)
HUTI_STOPC = HUTI_TRESID_SCALED_BYB
END IF
HUTI_NDIM = N
HUTI_DBUGLVL = ListGetInteger( SolverParam % Values, &
......@@ -563,7 +570,7 @@ CONTAINS
GlobalMatrix => A
CALL IterCall( iterProc, x, b, ipar, dpar, work, &
mvProc, pcondProc, pcondrProc, dotProc, normProc, STOPC )
mvProc, pcondProc, pcondrProc, dotProc, normProc, stopcProc )
IF ( A % COMPLEX ) HUTI_NDIM = HUTI_NDIM * 2
!------------------------------------------------------------------------------
......
......@@ -243,6 +243,11 @@ void *STDCALLBULL FC_FUNC(loadfunction,LOADFUNCTION) ( int *Quiet,
static char appPath[MAX_PATH_LEN] = "";
char *exeName = NULL;
int n = 0;
/*--------------------------------------------------------------------------*/
memset(appPath, 0, MAX_PATH_LEN);
memset(ElmerLib, 0, 2*MAX_PATH_LEN);
memset(NewLibName, 0, 3*MAX_PATH_LEN);
memset(NewName, 0, MAX_PATH_LEN);
/*--------------------------------------------------------------------------*/
fortranMangle( Name, NewName );
strncpy( NewLibName, Library, 3*MAX_PATH_LEN );
......
......@@ -137,6 +137,10 @@ CONTAINS
CASE( 'pardiso' )
#ifndef HAVE_PARDISO
CALL Fatal( 'GetMatrixFormat', 'Pardiso solver has not been installed.' )
#endif
CASE( 'cholmod' )
#ifndef HAVE_CHOLMOD
CALL Fatal( 'GetMatrixFormat', 'Cholmod solver has not been installed.' )
#endif
CASE DEFAULT
CALL Warn( 'GetMatrixFormat', 'Unknown direct solver method: ' // TRIM(str) )
......@@ -3658,7 +3662,6 @@ CONTAINS
END IF
END IF
END IF
str = ListGetString( Solver % Values,'Procedure', Found )
#ifdef SGIn32
SolverAddr = Solver % PROCEDURE
......
......@@ -196,6 +196,7 @@ EXTRA_DIST = \
ArtificialCompressibility.src \
BandMatrix.src \
BandwidthOptimize.src \
cholmod.c \
ClusteringMethods.src \
CoordinateSystems.src \
CPUTime.c \
......@@ -224,6 +225,7 @@ EXTRA_DIST = \
ExchangeCorrelations.src \
fft.c \
FDiffusion.src \
Feti.src \
FindOptimum.src \
FlowSolve.src \
FluidicForce.src \
......
......@@ -410,6 +410,8 @@ SOLVEROBJS = \
umf4_f77wrapper$(OBJ_EXT) \
VankaCreate$(OBJ_EXT) \
ParticleUtils$(OBJ_EXT) \
Feti$(OBJ_EXT) \
cholmod$(OBJ_EXT) \
ElmerSolver$(OBJ_EXT)