@@ -37,12 +37,15 @@ mutable struct SemidiscretizationHyperbolic{Mesh, Equations, InitialCondition,
37
37
source_terms:: SourceTerms ,
38
38
solver:: Solver ,
39
39
cache:: Cache ,
40
- performance_counter:: PerformanceCounter ) where {Mesh, Equations,
41
- InitialCondition,
42
- BoundaryConditions,
43
- SourceTerms,
44
- Solver,
45
- Cache}
40
+ performance_counter:: PerformanceCounter ) where {
41
+ Mesh,
42
+ Equations,
43
+ InitialCondition,
44
+ BoundaryConditions,
45
+ SourceTerms,
46
+ Solver,
47
+ Cache
48
+ }
46
49
new (mesh, equations, initial_condition, boundary_conditions, source_terms,
47
50
solver, cache, performance_counter)
48
51
end
@@ -83,7 +86,8 @@ function SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver
83
86
initial_condition,
84
87
_boundary_conditions,
85
88
source_terms, solver,
86
- cache, performance_counter)
89
+ cache,
90
+ performance_counter)
87
91
end
88
92
89
93
# Create a new semidiscretization but change some parameters compared to the input.
@@ -105,29 +109,7 @@ function remake(semi::SemidiscretizationHyperbolic; uEltype = real(semi.solver),
105
109
source_terms, boundary_conditions, uEltype)
106
110
end
107
111
108
- function Adapt. adapt_structure (to, semi:: SemidiscretizationHyperbolic )
109
- if ! (typeof (semi. mesh) <: P4estMesh )
110
- error (" Adapt.adapt is only supported for semidiscretizations based on P4estMesh" )
111
- end
112
-
113
- mesh = semi. mesh
114
- equations = Adapt. adapt_structure (to, semi. equations)
115
- initial_condition = Adapt. adapt_structure (to, semi. initial_condition)
116
- boundary_conditions = Adapt. adapt_structure (to, semi. boundary_conditions)
117
- source_terms = Adapt. adapt_structure (to, semi. source_terms)
118
- solver = Adapt. adapt_structure (to, semi. solver)
119
- cache = Adapt. adapt_structure (to, semi. cache)
120
- performance_counter = semi. performance_counter
121
-
122
- SemidiscretizationHyperbolic{typeof (mesh), typeof (equations),
123
- typeof (initial_condition),
124
- typeof (boundary_conditions), typeof (source_terms),
125
- typeof (solver), typeof (cache)}(mesh, equations,
126
- initial_condition,
127
- boundary_conditions,
128
- source_terms, solver,
129
- cache, performance_counter)
130
- end
112
+ Adapt. @adapt_structure (SemidiscretizationHyperbolic)
131
113
132
114
# general fallback
133
115
function digest_boundary_conditions (boundary_conditions, mesh, solver, cache)
0 commit comments