Skip to content

Commit

Permalink
Move enable_elasticity to Formulation subsection
Browse files Browse the repository at this point in the history
  • Loading branch information
naliboff committed Apr 5, 2018
1 parent 66fa9e6 commit 397a4fb
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 11 deletions.
Expand Up @@ -64,6 +64,11 @@ subsection Mesh refinement
set Time steps between mesh refinement = 0
end

# Formulation classification
subsection Formulation
set Enable elasticity = true
end

# Boundary classifications
subsection Model settings
set Fixed composition boundary indicators = bottom, top, right
Expand All @@ -72,7 +77,6 @@ subsection Model settings
set Free surface boundary indicators =
set Tangential velocity boundary indicators = bottom, top, right
set Zero velocity boundary indicators = left
set Enable elasticity = true
end

# Number and name of compositional fields
Expand Down
Expand Up @@ -73,6 +73,11 @@ subsection Mesh refinement
set Time steps between mesh refinement = 0
end

# Formulation classification
subsection Formulation
set Enable elasticity = true
end

# Boundary classifications
subsection Model settings
set Fixed composition boundary indicators = bottom, top, left, right
Expand All @@ -81,7 +86,6 @@ subsection Model settings
set Free surface boundary indicators =
set Tangential velocity boundary indicators = top, left
set Zero velocity boundary indicators =
set Enable elasticity = true
end

# Velocity boundary conditions
Expand Down
7 changes: 6 additions & 1 deletion include/aspect/parameters.h
Expand Up @@ -372,6 +372,12 @@ namespace aspect
*/
typename Formulation::TemperatureEquation::Kind formulation_temperature_equation;

/**
* This variable determines whether additional terms related to elastic forces
* are added to the Stokes equation.
*/
bool enable_elasticity;

/**
* @}
*/
Expand All @@ -382,7 +388,6 @@ namespace aspect
*/
bool include_melt_transport;
bool enable_additional_stokes_rhs;
bool enable_elasticity;

std::set<types::boundary_id> fixed_temperature_boundary_indicators;
std::set<types::boundary_id> fixed_composition_boundary_indicators;
Expand Down
10 changes: 5 additions & 5 deletions source/simulator/parameters.cc
Expand Up @@ -449,6 +449,10 @@ namespace aspect
"Note that this parameter is only evaluated "
"if `Formulation' is set to `custom'. Other formulations ignore "
"the value of this parameter.");
prm.declare_entry ("Enable elasticity", "false",
Patterns::Bool (),
"Whether to ask the material model for additional terms for the right-hand side "
"of the Stokes equation related to elasticity.");
}
prm.leave_subsection();

Expand Down Expand Up @@ -586,10 +590,6 @@ namespace aspect
"of the Stokes equation. This feature is likely only used when implementing force "
"vectors for manufactured solution problems and requires filling additional outputs "
"of type AdditionalMaterialOutputsStokesRHS.");
prm.declare_entry ("Enable elasticity", "false",
Patterns::Bool (),
"Whether to ask the material model for additional terms for the right-hand side "
"of the Stokes equation related to elasticity.");

}
prm.leave_subsection ();
Expand Down Expand Up @@ -1162,6 +1162,7 @@ namespace aspect
formulation_temperature_equation = Formulation::TemperatureEquation::parse(prm.get("Temperature equation"));
}
else AssertThrow(false, ExcNotImplemented());
enable_elasticity = prm.get_bool("Enable elasticity");
}
prm.leave_subsection ();

Expand All @@ -1170,7 +1171,6 @@ namespace aspect
{
include_melt_transport = prm.get_bool ("Include melt transport");
enable_additional_stokes_rhs = prm.get_bool ("Enable additional Stokes RHS");
enable_elasticity = prm.get_bool("Enable elasticity");

{
nullspace_removal = NullspaceRemoval::none;
Expand Down
6 changes: 5 additions & 1 deletion tests/viscoelastic_fixed_elastic_time_step.prm
Expand Up @@ -40,6 +40,11 @@ subsection Mesh refinement
set Time steps between mesh refinement = 0
end

# Formulation classification
subsection Formulation
set Enable elasticity = true
end

# Boundary classifications
subsection Model settings
set Fixed composition boundary indicators = bottom, top, left, right
Expand All @@ -48,7 +53,6 @@ subsection Model settings
set Free surface boundary indicators =
set Tangential velocity boundary indicators = top, left
set Zero velocity boundary indicators =
set Enable elasticity = true
end

subsection Boundary velocity model
Expand Down
6 changes: 5 additions & 1 deletion tests/viscoelastic_numerical_elastic_time_step.prm
Expand Up @@ -39,6 +39,11 @@ subsection Mesh refinement
set Time steps between mesh refinement = 0
end

# Formulation classification
subsection Formulation
set Enable elasticity = true
end

# Boundary classifications
subsection Model settings
set Fixed composition boundary indicators = bottom, top, left, right
Expand All @@ -47,7 +52,6 @@ subsection Model settings
set Free surface boundary indicators =
set Tangential velocity boundary indicators = top, left
set Zero velocity boundary indicators =
set Enable elasticity = true
end

subsection Boundary velocity model
Expand Down
6 changes: 5 additions & 1 deletion tests/viscoelastic_stress_averaging.prm
Expand Up @@ -42,6 +42,11 @@ subsection Mesh refinement
set Time steps between mesh refinement = 0
end

# Formulation classification
subsection Formulation
set Enable elasticity = true
end

# Boundary classifications
subsection Model settings
set Fixed composition boundary indicators = bottom, top, left, right
Expand All @@ -50,7 +55,6 @@ subsection Model settings
set Free surface boundary indicators =
set Tangential velocity boundary indicators = top, left
set Zero velocity boundary indicators =
set Enable elasticity = true
end

subsection Boundary velocity model
Expand Down

0 comments on commit 397a4fb

Please sign in to comment.