-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LevelsetFactory: abstract interface for various levelsets.
- Loading branch information
1 parent
2527828
commit ee7bcdc
Showing
12 changed files
with
344 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include "config.h" | ||
|
||
module LevelsetFactory_mod | ||
|
||
implicit none | ||
|
||
type, abstract, public :: t_LevelsetFactory | ||
|
||
contains | ||
|
||
procedure(setup), pass, deferred :: setup | ||
procedure(cleanup), pass, deferred :: cleanup | ||
procedure(updateLevelset), pass, deferred :: updateLevelset | ||
|
||
end type t_LevelsetFactory | ||
|
||
abstract interface | ||
|
||
subroutine setup(this, grids, states) | ||
|
||
use Grid_mod, only : t_Grid | ||
use State_mod, only : t_State | ||
|
||
import :: t_LevelsetFactory | ||
|
||
class(t_LevelsetFactory) :: this | ||
class(t_Grid), intent(in) :: grids(:) | ||
class(t_State) :: states(:) | ||
|
||
end subroutine setup | ||
|
||
end interface | ||
|
||
abstract interface | ||
|
||
subroutine cleanup(this) | ||
|
||
import :: t_LevelsetFactory | ||
|
||
class(t_LevelsetFactory) :: this | ||
|
||
end subroutine cleanup | ||
|
||
end interface | ||
|
||
abstract interface | ||
|
||
subroutine updateLevelset(this, mode, grids, states) | ||
|
||
use Grid_mod, only : t_Grid | ||
use State_mod, only : t_State | ||
|
||
import :: t_LevelsetFactory | ||
|
||
class(t_LevelsetFactory) :: this | ||
integer, intent(in) :: mode | ||
class(t_Grid), intent(in) :: grids(:) | ||
class(t_State) :: states(:) | ||
|
||
end subroutine updateLevelset | ||
|
||
end interface | ||
|
||
end module LevelsetFactory_mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#include "config.h" | ||
|
||
module SinusoidalWallLevelset_mod | ||
|
||
use LevelsetFactory_mod, only : t_LevelsetFactory | ||
|
||
implicit none | ||
|
||
type, private :: t_SWInternal | ||
SCALAR_TYPE, allocatable :: buffer(:) | ||
end type t_SWInternal | ||
|
||
type, extends(t_LevelsetFactory), public :: t_SinusoidalWallLevelset | ||
|
||
type(t_SWInternal), dimension(:), allocatable :: wallShapes | ||
real(SCALAR_KIND) :: levelsetLoc, levelsetWidth, levelsetAmp, levelsetPeriod | ||
|
||
contains | ||
|
||
procedure, pass :: setup => setupSinusoidalWallLevelset | ||
procedure, pass :: cleanup => cleanupSinusoidalWallLevelset | ||
procedure, pass :: updateLevelset => updateSinusoidalWallLevelset | ||
|
||
end type t_SinusoidalWallLevelset | ||
|
||
interface | ||
|
||
subroutine setupSinusoidalWallLevelset(this, grids, states) | ||
|
||
use Grid_mod, only : t_Grid | ||
use State_mod, only : t_State | ||
|
||
import :: t_SinusoidalWallLevelset | ||
|
||
class(t_SinusoidalWallLevelset) :: this | ||
class(t_Grid), intent(in) :: grids(:) | ||
class(t_State) :: states(:) | ||
|
||
end subroutine setupSinusoidalWallLevelset | ||
|
||
end interface | ||
|
||
interface | ||
|
||
subroutine cleanupSinusoidalWallLevelset(this) | ||
|
||
import :: t_SinusoidalWallLevelset | ||
|
||
class(t_SinusoidalWallLevelset) :: this | ||
|
||
end subroutine cleanupSinusoidalWallLevelset | ||
|
||
end interface | ||
|
||
interface | ||
|
||
subroutine updateSinusoidalWallLevelset(this, mode, grids, states) | ||
|
||
use Grid_mod, only : t_Grid | ||
use State_mod, only : t_State | ||
|
||
import :: t_SinusoidalWallLevelset | ||
|
||
class(t_SinusoidalWallLevelset) :: this | ||
integer, intent(in) :: mode | ||
class(t_Grid), intent(in) :: grids(:) | ||
class(t_State) :: states(:) | ||
|
||
end subroutine updateSinusoidalWallLevelset | ||
|
||
end interface | ||
|
||
end module SinusoidalWallLevelset_mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.