Skip to content

Commit

Permalink
Clean-up feature branch
Browse files Browse the repository at this point in the history
  • Loading branch information
scopplestone committed Dec 5, 2022
1 parent 9e74c81 commit 2a3a9ef
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 87 deletions.
4 changes: 2 additions & 2 deletions docs/documentation/userguide/visu_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ per area per second.
WIP, PartAnalyze/FieldAnalyze

## Dynamic Mode Decomposition
The dynamic mode decomposition is an algorithm divide a temporal series into a set of modes which are associated with a frequency
and grow/decay rate.
The dynamic mode decomposition is an algorithm that divides a temporal series into a set of modes which are associated with a
frequency and grow/decay rate.
The dynamic mode decomposition (DMD) is implemented according to Schmid et al. {cite}`Schmid2009`.
To use the DMD tool, it needs to be compiled first. In cmake, set the flag

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ Plane-02-z-coord = 8.75e-2
Plane-03-z-coord = 18.75e-2
Plane-Tolerance = 1e-6

! =============================================================================== !
! LoadBalance
! =============================================================================== !
DoLoadBalance = F ! Activate this in the future
DoInitialAutoRestart = F ! Activate this in the future
81 changes: 0 additions & 81 deletions src/posti/dmd/maxwell/equationDmd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -182,84 +182,3 @@ SUBROUTINE FinalizeEquationDMD()
END SUBROUTINE FinalizeEquationDMD

END MODULE MOD_EquationDMD

! !===================================================================================================================================
! !> This routine builds the mappings from the total number of variables available for visualization to number of calculation
! !> and visualization variables.
! !> 1. Read 'VarName' options from the parameter file. This are the quantities that will be visualized.
! !> 2. Initialize the dependecy table
! !> 3. check wether gradients are needed for any quantity. If this is the case, remove the conservative quantities from the
! !> dependecies of the primitive quantities (the primitive quantities are available directly, since the DGTimeDerivative_weakForm
! !> will be executed.
! !> 4. build the 'mapCalc' that holds for each quantity that will be calculated the index in 'UCalc' array (0 if not calculated)
! !> 5. build the 'mapVisu' that holds for each quantity that will be visualized the index in 'UVisu' array (0 if not visualized)
! !===================================================================================================================================
! SUBROUTINE Build_mapCalc_mapVisu()
! USE MOD_DMD_Vars ,ONLY: VarNameDMD,nVarDMD
! USE MOD_EquationDMD_Vars
! USE MOD_ReadInTools ,ONLY: GETSTR,CountOption
! USE MOD_StringTools ,ONLY: STRICMP
! IMPLICIT NONE
! ! INPUT / OUTPUT VARIABLES
! !-----------------------------------------------------------------------------------------------------------------------------------
! ! LOCAL VARIABLESIABLES
! INTEGER :: iVar,iVar2
! CHARACTER(LEN=20) :: format
! !===================================================================================================================================
! ! Read Varnames from parameter file and fill
! ! mapVisu = map, which stores at position x the position/index of the x.th quantity in the UVisu array
! ! if a quantity is not visualized it is zero
! ALLOCATE(mapVisu(1:nVarDep))
! mapVisu = 0
! nVarVisuTotal = 0
! ! Compare varnames that should be visualized with availabe varnames
! DO iVar=1,nVarDMD
! DO iVar2=1,nVarDep
! IF (STRICMP(VarNameDMD(iVar), VarNamesAll(iVar2))) THEN
! mapVisu(iVar2) = nVarVisuTotal+1
! nVarVisuTotal = nVarVisuTotal + 1
! END IF
! END DO
! END DO
!
! ! Calculate all dependencies:
! ! For each quantity copy from all quantities that this quantity depends on the dependencies.
! DO iVar=1,nVarDep
! DepTable(iVar,iVar) = 1
! DO iVar2=1,iVar-1
! IF (DepTable(iVar,iVar2).EQ.1) &
! DepTable(iVar,:) = MAX(DepTable(iVar,:), DepTable(iVar2,:))
! END DO
! END DO
!
! ! Build :
! ! mapCalc = map, which stores at position x the position/index of the x.th quantity in the UCalc array
! ! if a quantity is not calculated it is zero
! ALLOCATE(mapCalc(1:nVarDep))
! mapCalc = 0
! DO iVar=1,nVarDep
! IF (mapVisu(iVar).GT.0) THEN
! mapCalc = MAX(mapCalc,DepTable(iVar,1:nVarDep))
! END IF
! END DO
! ! enumerate mapCalc
! nVarCalc = 0
! DO iVar=1,nVarDep
! IF (mapCalc(iVar).GT.0) THEN
! nVarCalc = nVarCalc + 1
! mapCalc(iVar) = nVarCalc
! END IF
! END DO
!
! ! print the dependecy table
! WRITE(format,'(I2)') SIZE(DepTable,2)
! DO iVar=1,nVarDep
! WRITE (*,'('//format//'I2,A)') DepTable(iVar,:), " "//TRIM(VarNamesAll(iVar))
! END DO
!
! ! print the mappings
! WRITE(format,'(I2)') nVarDep
! WRITE (*,'(A,'//format//'I3)') "mapCalc ",mapCalc
! WRITE (*,'(A,'//format//'I3)') "mapVisu ",mapVisu
!
! END SUBROUTINE Build_mapCalc_mapVisu
8 changes: 4 additions & 4 deletions src/posti/piclas2vtk/piclas2vtk.f90
Original file line number Diff line number Diff line change
Expand Up @@ -603,22 +603,22 @@ SUBROUTINE ConvertDGSolution(InputStateFile,NVisu,NodeTypeVisuOut,OutputName,DGS
REAL,POINTER :: Coords_DG_p(:,:,:,:,:)
REAL,ALLOCATABLE :: Vdm_EQNgeo_NVisu(:,:) !< Vandermonde from equidistant mesh to visualization nodes
REAL,ALLOCATABLE :: Vdm_N_NVisu(:,:) !< Vandermonde from state to visualization nodes
LOGICAL :: DGSourceExists,DGTimeDerivativeExists,TimeExists,DGSourceExtExists,DMDMode,DGolutionDatasetExists
LOGICAL :: DGSourceExists,DGTimeDerivativeExists,TimeExists,DGSourceExtExists,DMDMode,DGSolutionDatasetExists
CHARACTER(LEN=16) :: hilf
CHARACTER(LEN=255) :: DMDFields(1:16), Dataset
!===================================================================================================================================
! 1.) Open given file to get the number of elements, the order and the name of the mesh file
CALL OpenDataFile(InputStateFile,create=.FALSE.,single=.FALSE.,readOnly=.TRUE.,communicatorOpt=MPI_COMM_WORLD)

! Check if data set exists, if not return
CALL DatasetExists(File_ID,TRIM(DGSolutionDataset),DGolutionDatasetExists)
IF(.NOT.DGolutionDatasetExists)THEN
CALL DatasetExists(File_ID,TRIM(DGSolutionDataset),DGSolutionDatasetExists)
IF(.NOT.DGSolutionDatasetExists)THEN
CALL CloseDataFile()
iErrorReturn=1
RETURN
ELSE
iErrorReturn=0
END IF ! .NOT.DGolutionDatasetExists
END IF ! .NOT.DGSolutionDatasetExists

! Read-in of dimensions of the field array (might have an additional dimension, i.e., rank is 6 instead of 5)
CALL GetDataSize(File_ID,TRIM(DGSolutionDataset),nDims,HSize)
Expand Down

0 comments on commit 2a3a9ef

Please sign in to comment.