Commit 89bcf002 authored by David Vincent's avatar David Vincent Committed by Valentin Vallaeys
Browse files

add getbathymetryGradient in shallowwater and getBathymetry in Tracer

parent abc34505
......@@ -21,7 +21,7 @@ mesh_file_name = 'o2_utm.msh'
data_proj = "+proj=latlong +ellps=WGS84 +a=2574730 +b=2574730"
mesh_proj = "+proj=utm +ellps=WGS84 +zone=60 +a=2574730 +b=2574730"
domain = slim.Domain(mesh_file_name,"bathy_WD_COMP_0.msh", g=1.352, density=662)
domain = slim.Domain(mesh_file_name,"bathy_COMP_0.msh", g=1.352, density=662)
eq = slim.ShallowWater2d(domain, wetting_drying = 0.5, initial_time=0, final_time=n_day*T, export_every_sub_time_step = False)
eq.set_viscosity("smagorinsky")
......@@ -33,17 +33,17 @@ eq.set_temporal_scheme("implicit")
#eq.compute_mass()
#eq2 = slim.ShallowWaterTracer2d(domain,initial_time=0, final_time=n_day*T, export_every_sub_time_step = False)
#eq2.set_hydro_solution(equation=eq)
#eq2.set_diffusivity("okubo")
#eq2.set_boundary_coast("Wall")
#eq2.set_temporal_scheme("implicit")
eq2 = slim.ShallowWaterTracer2d(domain, initial_time=0, final_time=n_day*T, export_every_sub_time_step = False)
eq2.set_hydro_solution(equation=eq)
eq2.set_diffusivity("okubo")
eq2.set_boundary_coast("Wall")
eq2.set_temporal_scheme("implicit")
loop=slim.Loop(maximum_time_step = dt, export_time = dt,path="./output")
loop.add_equation(eq)
#loop.add_equation(eq2)
loop.add_equation(eq2)
#loop.export_on_structured_grid(["sw2d"], 4.7e5, 5e5, -3.23e6, -3.2e6, 0.2e5, 0.2e5)
loop.run()
......
......@@ -106,6 +106,9 @@ class dgConservationLawShallowWater2d : public dgConservationLawFunction {
inline const functor *getBathymetry() {
return _bathymetry;
}
inline const functor *getBathymetryGradient() {
return _bathymetryGradient;
}
inline const functor *getElevation() {
return functionExtractCompNew(function::getSolution(),0);
}
......
......@@ -52,7 +52,9 @@ class dgConservationLawShallowWaterTracer2d : public dgConservationLawFunction {
_alphaMovingBathWD = alphaMovingBathWD;
_originalBathymetry = _bathymetry;
}
inline const functor *getBathymetry() {
return _bathymetry;
}
//boundary conditions
/**slip wall boundary */
dgBoundaryCondition *newBoundaryWall();
......
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