Commit 11a413b2 authored by Adam Powell's avatar Adam Powell

Imported Upstream version 5.5.0.svn.5185.dfsg

parent e3056d8f
......@@ -3646,7 +3646,7 @@ int SaveElmerInputPartitioned(struct FemType *data,struct BoundaryType *bound,
*/
{
int noknots,noelements,sumsides,partitions,hit,maxelemdim,elemdim,parent,parent2;
int nodesd2,nodesd1,discont,maxelemtype,minelemtype,sidehits,elemsides,side;
int nodesd2,nodesd1,discont,maxelemtype,minelemtype,sidehits,elemsides,side,bctype;
int part,otherpart,part2,part3,elemtype,sideelemtype,*needednodes,*neededtwice;
int **bulktypes,*sidetypes,tottypes;
int i,j,k,l,l2,m,ind,ind2,sideind[MAXNODESD1],sidehit[MAXNODESD1],elemhit[MAXNODESD2];
......@@ -4083,6 +4083,7 @@ int SaveElmerInputPartitioned(struct FemType *data,struct BoundaryType *bound,
GetElementSide(bound[j].parent[i],bound[j].side[i],bound[j].normal[i],
data,sideind,&sideelemtype);
bctype = bound[j].types[i];
nodesd1 = sideelemtype%100;
bcneeded = 0;
......@@ -4119,14 +4120,14 @@ int SaveElmerInputPartitioned(struct FemType *data,struct BoundaryType *bound,
if(halo) {
if(trueparent)
fprintf(out,"%d/%d %d %d %d %d",
sumsides,part,bound[j].types[i],parent,parent2,sideelemtype);
sumsides,part,bctype,parent,parent2,sideelemtype);
else
fprintf(out,"%d/%d %d %d %d %d",
sumsides,elempart[bound[j].parent[i]],bound[j].types[i],parent,parent2,sideelemtype);
sumsides,elempart[bound[j].parent[i]],bctype,parent,parent2,sideelemtype);
}
else {
fprintf(out,"%d %d %d %d %d",
sumsides,bound[j].types[i],parent,parent2,sideelemtype);
sumsides,bctype,parent,parent2,sideelemtype);
}
if(reorder) {
for(l=0;l<nodesd1;l++)
......@@ -4140,10 +4141,14 @@ int SaveElmerInputPartitioned(struct FemType *data,struct BoundaryType *bound,
/* Memorize that the node has already been saved as a regular BC. */
for(l=0;l<nodesd1;l++) {
k = sideind[l];
if(bcnodesaved[k])
bcnodesaved2[k] = bound[j].types[i];
if(bcnodesaved[k] == bctype || bcnodesaved2[k] == bctype ) continue;
if(!bcnodesaved[k])
bcnodesaved[k] = bctype;
else if(!bcnodesaved2[k])
bcnodesaved2[k] = bctype;
else
bcnodesaved[k] = bound[j].types[i];
if(0) printf("Node %d shared by more than two BCs (%d)\n",k,bctype);
}
}
}
......@@ -4158,6 +4163,7 @@ int SaveElmerInputPartitioned(struct FemType *data,struct BoundaryType *bound,
GetElementSide(bound[j].parent[i],bound[j].side[i],bound[j].normal[i],
data,sideind,&sideelemtype);
nodesd1 = sideelemtype%100;
bctype = bound[j].types[i];
for(l=0;l<nodesd1;l++) {
ind = sideind[l];
......@@ -4170,14 +4176,14 @@ int SaveElmerInputPartitioned(struct FemType *data,struct BoundaryType *bound,
if( elempart[bound[j].parent2[i]] == part) continue;
/* Check whether the nodes was not already saved */
if( bcnodesaved[ind] == bound[j].types[i]) continue;
if( bcnodesaved2[ind] == bound[j].types[i]) continue;
if( bcnodesaved[ind] == bctype ) continue;
if( bcnodesaved2[ind] == bctype ) continue;
/* Memorize if the node really was saved. */
if(!bcnodesaved[ind])
bcnodesaved[ind] = bound[j].types[i];
bcnodesaved[ind] = bctype;
else if(!bcnodesaved2[ind])
bcnodesaved2[ind] = bound[j].types[i];
bcnodesaved2[ind] = bctype;
orphannodes++;
......@@ -4185,10 +4191,10 @@ int SaveElmerInputPartitioned(struct FemType *data,struct BoundaryType *bound,
sidetypes[101] += 1;
if(reorder) {
fprintf(out,"%d %d 0 0 101 %d\n",sumsides,bound[j].types[i],order[ind]);
fprintf(out,"%d %d 0 0 101 %d\n",sumsides,bctype,order[ind]);
}
else {
fprintf(out,"%d %d 0 0 101 %d\n",sumsides,bound[j].types[i],ind);
fprintf(out,"%d %d 0 0 101 %d\n",sumsides,bctype,ind);
}
}
}
......
......@@ -535,6 +535,8 @@ CONTAINS
!------------------------------------------------------------------------------
SUBROUTINE Mumps_SolveSystem( Solver,A,x,b,Free_Fact )
!------------------------------------------------------------------------------
LOGICAL, OPTIONAL :: Free_Fact
TYPE(Matrix_t) :: A
TYPE(Solver_t) :: Solver
......@@ -627,7 +629,7 @@ CONTAINS
A % MumpsID % icntl(4) = 1 ! the same as the two above, but doesn't seem to work.
A % MumpsID % icntl(5) = 0 ! matrix format 'assembled'
icntlft=ListGetConstReal(Solver % Values, 'mumps percentage increase working space', stat)
icntlft = ListGetInteger(Solver % Values, 'mumps percentage increase working space', stat)
IF (stat) THEN
A % MumpsID % icntl(14) = icntlft
END IF
......
......@@ -559,10 +559,16 @@ CONTAINS
UseOptimized = ListGetLogical( Solver % Values, &
'Optimize Bandwidth Use Always', GotIt )
Matrix => Null()
! check if matrix structures really need to be created:
! -----------------------------------------------------
IF ( ListGetLogical( Solver % Values, 'No matrix',GotIt)) RETURN
!------------------------------------------------------------------------------
! Compute matrix structure and do bandwidth optimization if requested
!------------------------------------------------------------------------------
ALLOCATE( Model % RowNonZeros(k) )
ALLOCATE( Model % RowNonZeros(k) ); Model % RowNonzeros=0
NULLIFY( ListMatrix )
IF ( PRESENT(Equation) ) THEN
......@@ -575,6 +581,8 @@ CONTAINS
n = OptimizeBandwidth( ListMatrix, Perm, InvInitialReorder, &
k, OptimizeBW,UseOptimized, ' ' )
ENDIF
!------------------------------------------------------------------------------
! Ok, create and initialize the matrix
!------------------------------------------------------------------------------
......
This diff is collapsed.
This diff is collapsed.
......@@ -596,8 +596,8 @@ CONTAINS
END IF
IF ( Nrows > 0 ) THEN
ALLOCATE( Solution( Nrows ) )
IF (Nrows>0) THEN
ALLOCATE(Solution(Nrows))
Solution = InitValue
CALL VariableAdd( Solver % Mesh % Variables, Solver % Mesh, Solver, &
......@@ -614,11 +614,9 @@ CONTAINS
END IF
END IF
IF ( ASSOCIATED(Solver % Matrix) ) THEN
Solver % Matrix % Comm = MPI_COMM_WORLD
IF ( Solver % Matrix % DGMatrix ) &
Solver % Variable % TYPE = Variable_on_nodes_on_elements
END IF
IF (ASSOCIATED(Solver % Matrix)) Solver % Matrix % Comm = MPI_COMM_WORLD
IF ( ListGetLogical( SolverParams, 'Discontinuous Galerkin', Found) ) &
Solver % Variable % TYPE = Variable_on_nodes_on_elements
END IF
!------------------------------------------------------------------------------
END IF
......
......@@ -6047,20 +6047,22 @@ CONTAINS
!---------------------------------------------------------------
TYPE(Mesh_t), POINTER :: Mesh
LOGICAL :: MaskExists,GotIt
INTEGER :: i,j,k,l,ind,n,dim,dir,nsize,Sweep,MaxSweep
LOGICAL :: MaskExists,FixBestDirection,FoundBetter, GotIt
INTEGER :: i,j,k,l,ind,n,dim,dir,nsize,Sweep,MaxSweep,DirBest
INTEGER :: PosMeasureIndex, NegMeasureIndex, FixingNodes(6)
LOGICAL, ALLOCATABLE :: ForbiddenNodes(:)
REAL(KIND=dp), POINTER :: Parray(:,:)
REAL(KIND=dp) :: Normal(3), Tangent1(3), Tangent2(3), Coord(3), &
SumCoord(3), AveCoord(3), Weights(3), RefScore, Score, &
PosMeasure, NegMeasure, OffLineCoeff, &
InLine, OffLine, Dist, MinDist, InLineMeasure
PosMeasure, NegMeasure, OffLineCoeff, DirDistance, &
InLine, OffLine, Dist, MinDist, InLineMeasure, ScoreLimit
CHARACTER(LEN=MAX_NAME_LEN) :: Method
!---------------------------------------------------------------
CALL Info('FindRigidBodyFixingNodes','Starting')
Mesh => Solver % Mesh
dim = Mesh % MeshDim
......@@ -6070,7 +6072,6 @@ CONTAINS
! PRINT *,'Number of allowed Nodes:',nsize
! Find the center from the average of node positions
!-----------------------------------------------------------
SumCoord = 0.0_dp
......@@ -6117,6 +6118,11 @@ CONTAINS
OffLineCoeff = ListGetConstReal( Solver % Values,'Fixing Nodes Off Line Coefficient',GotIt)
IF(.NOT. GotIt) OffLineCoeff = 1.0_dp
ScoreLimit = ListGetConstReal( Solver % Values,'Fixing Nodes Limit Score',GotIt)
IF(.NOT. GotIt) ScoreLimit = 0.99_dp
FixBestDirection = ListGetLogical( Solver % Values,'Fixing Nodes Axis Freeze',GotIt)
Parray => ListGetConstRealArray( Solver % Values,'Fixing Nodes Normal Vector',GotIt )
IF( GotIt ) THEN
Normal = Parray(1:3,1)
......@@ -6129,6 +6135,8 @@ CONTAINS
! Find the fixing nodes by looping over all nodes
!-----------------------------------------------------------
DirDistance = 0.0_dp
DirBest = 0
DO dir = 1, dim
! Use the three principal directions as the weight
......@@ -6184,6 +6192,28 @@ CONTAINS
FixingNodes(2*dir-1) = NegMeasureIndex
FixingNodes(2*dir) = PosMeasureIndex
IF( NegMeasureIndex > 0 .AND. PosMeasureIndex > 0 ) THEN
IF( PosMeasure + NegMeasure > DirDistance ) THEN
DirDistance = PosMeasure + NegMeasure
DirBest = dir
END IF
END IF
END DO
! To be on the safe side check that no node is used twice
! However, do not break the best direction
!-----------------------------------------------------------------------------------
DO i=1,2*dim
DO j=1,2*dim
IF( FixBestDirection ) THEN
IF( j == 2*DirBest-1 .OR. j == 2*DirBest ) CYCLE
END IF
IF( FixingNodes(j) == FixingNodes(i) ) FixingNodes(j) = 0
END DO
END DO
......@@ -6192,22 +6222,40 @@ CONTAINS
!-----------------------------------------------------------------------------------
MaxSweep = ListGetInteger( Solver % Values,'Fixing Nodes Search Loops',GotIt)
DO Sweep = 0,MaxSweep
FoundBetter = .FALSE.
DO j=1,2*dim
RefScore = FixingNodesScore(j,FixingNodes(j))
! The first round set the unfixed nodes
IF( Sweep == 0 .AND. FixingNodes(j) /= 0 ) CYCLE
IF( Sweep == 0 ) THEN
PRINT *,'Initial Score:',j,RefScore
IF( FixingNodes(j) /= 0 ) CYCLE
END IF
! Fir the best direction because otherwise there are too
! many moving parts.
IF( FixBestDirection ) THEN
IF( j == 2*DirBest-1 .OR. j == 2*DirBest ) CYCLE
END IF
RefScore = FixingNodesScore(j,FixingNodes(j))
DO i=1,Mesh % NumberOfNodes
IF( ForbiddenNodes(i) ) CYCLE
Score = FixingNodesScore(j,i)
IF( Score < RefScore ) THEN
IF( Score < ScoreLimit * RefScore ) THEN
RefScore = Score
FixingNodes(j) = i
FoundBetter = .TRUE.
END IF
END DO
END DO
IF(.NOT. FoundBetter ) EXIT
END DO
DO j=1,2*dim
RefScore = FixingNodesScore(j,FixingNodes(j))
PRINT *,'Final Score:',j,RefScore
END DO
! Output the selected nodes
......
......@@ -3082,13 +3082,15 @@ CONTAINS
DO WHILE( ASSOCIATED(Var) )
IF ( .NOT. Var % Output ) THEN
Var => Var % Next
CYCLE
Var => Var % Next; CYCLE
END IF
IF( SIZE( Var % Values ) == Var % Dofs ) THEN
Var => Var % Next
CYCLE
Var => Var % Next; CYCLE
END IF
IF( Var % Type /= Variable_on_nodes ) THEN
Var => Var % Next; CYCLE
END IF
SELECT CASE(Var % Name(1:Var % NameLen))
......@@ -3120,16 +3122,6 @@ CONTAINS
CASE( 'magnetic field 1','magnetic field 2','magnetic field 3')
CASE( 'electric current' )
DOFs = DOFs + 3
CASE( 'electric current 1','electric current 2','electric current 3')
CASE( 'magnetic flux density' )
DOFs = DOFs + 3
CASE( 'magnetic flux density 1','magnetic flux density 2','magnetic flux density 3')
CASE DEFAULT
nDOFs = 1
......@@ -3176,13 +3168,15 @@ CONTAINS
DO WHILE( ASSOCIATED( Var ) )
IF ( .NOT. Var % Output ) THEN
Var => Var % Next
CYCLE
Var => Var % Next; CYCLE
END IF
IF( SIZE( Var % Values ) == Var % Dofs ) THEN
Var => Var % Next
CYCLE
Var => Var % Next; CYCLE
END IF
IF( Var % Type /= Variable_on_nodes ) THEN
Var => Var % Next; CYCLE
END IF
SELECT CASE(Var % Name(1:Var % Namelen))
......@@ -3221,16 +3215,6 @@ CONTAINS
CASE( 'magnetic field 1','magnetic field 2','magnetic field 3')
CASE( 'electric current' )
WRITE(PostFileUNit,'(a)',ADVANCE='NO' ) ' vector: Current'
CASE( 'electric current 1','electric current 2','electric current 3')
CASE( 'magnetic flux density' )
WRITE(PostFileUnit,'(a)',ADVANCE='NO' ) ' vector: MagneticFlux'
CASE( 'magnetic flux density 1','magnetic flux density 2','magnetic flux density 3')
CASE( 'coordinate 1','coordinate 2','coordinate 3' )
CASE DEFAULT
......@@ -3538,13 +3522,15 @@ CONTAINS
Var => Model % Variables
DO WHILE( ASSOCIATED( Var ) )
IF ( .NOT. Var % Output ) THEN
Var => Var % Next
CYCLE
Var => Var % Next; CYCLE
END IF
IF( SIZE( Var % Values ) == Var % DOFs ) THEN
Var => Var % Next
CYCLE
Var => Var % Next; CYCLE
END IF
IF( Var % Type /= Variable_on_nodes ) THEN
Var => Var % Next; CYCLE
END IF
SELECT CASE(Var % Name(1:Var % Namelen))
......@@ -3650,36 +3636,8 @@ CONTAINS
CASE( 'magnetic field 1','magnetic field 2','magnetic field 3')
CASE( 'electric current' )
k = i
IF ( ASSOCIATED(Var % Perm) ) k = Var % Perm(k)
IF ( k > 0 ) THEN
DO j=1,Var % DOFs
WRITE(PostFileUnit,'(ES17.8E3)',ADVANCE='NO') Var % Values(Var % DOFs*(k-1)+j)
END DO
IF ( Var % DOFs < 3 ) WRITE(PostFileUnit,'(ES17.8E3)',ADVANCE='NO') 0.0D0
ELSE
WRITE(PostFileUnit,'(4ES17.8E3)',ADVANCE='NO') 0.0D0,0.0D0,0.0D0
END IF
CASE( 'electric current 1','electric current 2','electric current 3')
CASE( 'coordinate 1','coordinate 2','coordinate 3' )
CASE( 'magnetic flux density' )
k = i
IF ( ASSOCIATED(Var % Perm) ) k = Var % Perm(k)
IF ( k > 0 ) THEN
DO j=1,Var % DOFs
WRITE(PostFileUnit,'(ES17.8E3)',ADVANCE='NO') Var % Values(Var % DOFs*(k-1)+j)
END DO
IF ( Var % DOFs < 3 ) WRITE(PostFileUnit,'(ES17.8E3)',ADVANCE='NO') 0.0D0
ELSE
WRITE(PostFileUnit,'(4ES17.8E3)',ADVANCE='NO') 0.0D0,0.0D0,0.0D0
END IF
CASE( 'magnetic flux density 1','magnetic flux density 2','magnetic flux density 3')
CASE DEFAULT
IF ( Var % DOFs == 1 ) THEN
......
......@@ -1888,19 +1888,8 @@ CONTAINS
VtkUnit)
CASE( 'magnetic field 1','magnetic field 2', 'magnetic field 3' )
CASE( 'electric current' )
CALL WriteVector( "Current", Var, Model % NumberOfNodes, 3, &
VtkUnit)
CASE('electric current 1','electric current 2','electric current 3')
CASE( 'coordinate 1','coordinate 2','coordinate 3' )
CASE( 'magnetic flux density' )
CALL WriteVector("MagneticFlux", Var, Model % NumberOfNodes, 3,&
VtkUnit)
CASE( 'magnetic flux density 1','magnetic flux density 2', &
'magnetic flux density 3' )
CASE DEFAULT
IF ( Var % DOFs == 1 ) THEN
DO i=1,Var % NameLen
......
......@@ -1054,8 +1054,10 @@ real(kind=dp) :: realtime,tt
! --------------------------------------------------
DO i=1,Mesh % NumberOfBulkElements+Mesh % NumberOfBoundaryElements
Element => Mesh % Elements(i)
j = Element % Type % NumberOfEdges
Element % EdgeIndexes(1:j)=grevorder(Element % EdgeIndexes(1:j))
IF (ASSOCIATED(Element % EdgeIndexes)) THEN
j = Element % Type % NumberOfEdges
Element % EdgeIndexes(1:j)=grevorder(Element % EdgeIndexes(1:j))
END IF
END DO
DO i=1,Mesh % NumberOfFaces
......
......@@ -1829,11 +1829,12 @@ real(kind=dp) :: s, RealTime
v(1:n) = 0.0
DO i = 1, ParEnv % PEs
CurrIf => GlobalData % SplittedMatrix % IfMatrix(i)
IfV => GlobalData % SplittedMatrix % IfVecs(i)
IfL => GlobalData % SplittedMatrix % IfLCols(i)
IfO => GlobalData % SplittedMatrix % IfORows(i)
IF ( CurrIf % NumberOfRows /= 0 ) THEN
IfV => GlobalData % SplittedMatrix % IfVecs(i)
IfL => GlobalData % SplittedMatrix % IfLCols(i)
IfO => GlobalData % SplittedMatrix % IfORows(i)
IfV % IfVec(1:CurrIf % NumberOfRows) = 0.0
DO j = 1, CurrIf % NumberOfRows
IF ( Currif % RowOwner(j) == ParEnv % MyPE ) THEN
......@@ -1941,17 +1942,16 @@ SUBROUTINE SParCMatrixVector( u, v, ipar )
IF ( CurrIf % NumberOfRows /= 0 ) THEN
IfV => GlobalData % SplittedMatrix % IfVecs(i)
IfL => GlobalData % SplittedMatrix % IfLCols(i)
IfO => GlobalData % SplittedMatrix % IfORows(i)
IfV % IfVec(1:CurrIf % NumberOfRows) = 0.0d0
DO j = 1, CurrIf % NumberOfRows / 2
IF ( Currif % RowOwner(j) == ParEnv % MyPE ) THEN
rowind = IfO % IfVec(j)
IF ( Currif % RowOwner(2*j-1) == ParEnv % MyPE ) THEN
rowind = (IfO % IfVec(2*j-1)+1)/2
DO k = CurrIf % Rows(2*j-1), CurrIf % Rows(2*j)-1,2
Colind = (IfL % IfVec(k)+1)/2
A = CMPLX( CurrIf % Values(k), -CurrIf % Values(k+1), KIND=dp )
A = A * u(ColInd)
v(2*rowind-1)=v(2*rowind-1) + REAL(A)
v(2*rowind-0)=v(2*rowind-0) + AIMAG(A)
v(rowind) = v(rowind) + A * u(ColInd)
END DO
ELSE
DO k = CurrIf % Rows(2*j-1), CurrIf % Rows(2*j)-1, 2
......
......@@ -98,7 +98,8 @@ SUBROUTINE SaveScalars( Model,Solver,dt,TransientSimulation )
NodeIndexes(:), MPIOper(:)
CHARACTER(LEN=MAX_NAME_LEN), ALLOCATABLE :: ValueNames(:)
CHARACTER(LEN=MAX_NAME_LEN) :: ScalarsFile, ScalarNamesFile, DateStr, &
VariableName, ResultPrefix, Oper, ParOper, Name, CoefficientName, ScalarParFile
VariableName, ResultPrefix, Oper, ParOper, Name, CoefficientName, ScalarParFile, &
OutputDirectory
INTEGER :: i,j,k,l,q,n,ierr,No,NoPoints,NoCoordinates,NoLines,NumberOfVars,&
NoDims, NoDofs, NoOper, NoElements, NoVar, NoValues, PrevNoValues=0, DIM, &
MaxVars, NoEigenValues, Ind, EigenDofs, LineInd, NormInd, CostInd, istat
......@@ -132,10 +133,18 @@ SUBROUTINE SaveScalars( Model,Solver,dt,TransientSimulation )
IF(.NOT.SubroutineVisited) THEN
ScalarsFile = ListGetString(SolverParams,'Filename',SaveToFile )
IF( SaveToFile ) THEN
OutputDirectory = ListGetString( SolverParams,'Output Directory',GotIt)
IF( GotIt ) THEN
CALL MakeDirectory( TRIM(OutputDirectory) // CHAR(0) )
ScalarsFile = TRIM(OutputDirectory)//"/"//TRIM(ScalarsFile)
END IF
IF(ListGetLogical(SolverParams,'Filename Numbering',GotIt)) THEN
ScalarsFile = NextFreeFilename( ScalarsFile )
END IF
ScalarNamesFile = TRIM(ScalarsFile) // '.' // TRIM("names")
LiveGraph = ListGetLogical(SolverParams,'Live Graph',GotIt)
END IF
......@@ -145,6 +154,7 @@ SUBROUTINE SaveScalars( Model,Solver,dt,TransientSimulation )
ResultPrefix = ListGetString(SolverParams,'Scalars Prefix',GotIt )
IF(.NOT. gotIt) ResultPrefix = 'res:'
IsParallel = .FALSE.
WriteCore = .TRUE.
......@@ -2596,7 +2606,7 @@ SUBROUTINE SaveLine( Model,Solver,dt,TransientSimulation )
TYPE(Nodes_t) :: ElementNodes, LineNodes
TYPE(Element_t), POINTER :: CurrentElement
CHARACTER(LEN=MAX_NAME_LEN) :: SideFile, SideNamesFile, VarName, Name, CondName, &
TempName, MaskName, PrevMaskName, SideParFile, DateStr
TempName, MaskName, PrevMaskName, SideParFile, DateStr, OutputDirectory
CHARACTER(LEN=MAX_NAME_LEN), ALLOCATABLE :: ValueNames(:)
......@@ -2644,15 +2654,22 @@ SUBROUTINE SaveLine( Model,Solver,dt,TransientSimulation )
END IF
TimesVisited = TimesVisited + 1
SideFile = ListGetString(SolverParams,'Filename',GotIt )
IF(.NOT. GotIt) SideFile = DefaultSideFile
OutputDirectory = ListGetString( SolverParams,'Output Directory',GotIt)
IF( GotIt ) THEN
IF( TimesVisited == 1 ) THEN
CALL MakeDirectory( TRIM(OutputDirectory) // CHAR(0) )
END IF
SideFile = TRIM(OutputDirectory)//"/"//TRIM(SideFile)
END IF
IF(ListGetLogical(SolverParams,'Filename Numbering',GotIt)) THEN
SideFile = NextFreeFilename( SideFile )
END IF
FileAppend = ListGetLogical(SolverParams,'File Append',GotIt )
MovingMesh = ListGetLogical(SolverParams,'Moving Mesh',GotIt )
......
# A
#
run:
$(ELMER_SOLVER)
clean:
/bin/rm test.log temp.log
Header
CHECK KEYWORDS Warn
Mesh DB "." "torus2"
End
Simulation
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Angular Frequency = 1
Simulation Type = Steady
Steady State Max Iterations = 1
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.67e-08
Permittivity of Vacuum = 8.8542e-12
Boltzmann Constant = 1.3807e-23
Unit Charge = 1.602e-19
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 1
End
Body 2
Target Bodies(1) = 2
Name = "Body 2"
Equation = 1
Material = 2
Body Force = 1
End
Solver 1
Equation = MGDynamics
Procedure = "MagnetoDynamics" "WhitneyAVHarmonicSolver"
Variable = P[P re:1 P im:1]
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = iterative
Linear System Symmetric = True
Linear System Iterative Method = CG
Linear System Max Iterations = 3000
Linear System Convergence Tolerance = 1.0e-7
Linear System Preconditioning = Ilu
Linear System Residual Output = 10
Linear System Abort Not Converged = False
End
Solver 2
Equation = MGDynamicsCalc
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
Potential Variable = String "P"
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 20
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Solver = Iterative
Linear System Symmetric = True
Linear System Iterative Method = CG
Linear System Max Iterations = 5000
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Equation 1
Name = "MGDyn"
Active Solvers(2) = 1 2
End
Material 1
Name = "Space"
Permeability = real 1
Electric Conductivity = 1e-12
End
Material 2
Name = "Conductor"
Permeability = real 1
Electric Conductivity = 1
End
Body Force 1
Name = "Current"
Current Density im 1 = Variable coordinate
Real MATC "-0.32e5*tx(2)"
Current Density im 3 = Variable coordinate
Real MATC " 0.32e5*tx(0)"
End
Boundary Condition 1
Target Boundaries(6) = 1 2 3 4 5 6
Name = "far"
P re {e} = real 0
P im {e} = real 0
End
$fprintf( stderr, "TEST CASE 1\n");
RUN
$fprintf( stderr, "END TEST CASE 1: Target NRM=2.5874020\n" );
This diff is collapsed.
This diff is collapsed.
4007 21624 2236
2
303 2236
504 21624
This diff is collapsed.
......@@ -4,8 +4,8 @@ DEPENDPATH += . src
INCLUDEPATH += . src
win32 {
INCLUDEPATH += C:/Stuff/Elmerfem/include src/win32
QMAKE_LIBDIR += C:/Stuff/Elmerfem/bin
INCLUDEPATH += D:/ffmpeg/include src/win32
QMAKE_LIBDIR += D:/ffmpeg/bin
LIBS += -lavcodec -lavutil -lswscale
DESTDIR = ElmerClips
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment