Skip to content

Commit

Permalink
Fix adiabatic density gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldouglas92 committed Jul 14, 2023
1 parent 0620896 commit bdb1b22
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cookbooks/vankeken_subduction/plugin/van_Keken_mesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,16 @@ namespace aspect

template <int dim>
double
vanKeken<dim>::depth(const Point<dim> &) const
vanKeken<dim>::depth(const Point<dim> &position) const
{
return 0.0;
// Get the surface x (,y) point
Point<dim-1> surface_point;
for (unsigned int d=0; d<dim-1; ++d)
surface_point[d] = position[d];

std::vector<double> extents = {660e3, 600e3};
const double d = extents[dim-1] - (position(dim-1));
return std::min (std::max (d, 0.), maximal_depth());
}


Expand Down Expand Up @@ -305,7 +312,7 @@ namespace aspect
double
vanKeken<dim>::maximal_depth() const
{
return 0.0;
return 600e3;
}


Expand Down

0 comments on commit bdb1b22

Please sign in to comment.