[cig-commits] commit 2398 by bangerth to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Wed Apr 2 06:21:26 PDT 2014
Revision 2398
Do not duplicate information but ask the right object for it instead.
U trunk/aspect/include/aspect/velocity_boundary_conditions/function.h
U trunk/aspect/source/velocity_boundary_conditions/function.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2398&peg=2398
Diff:
Modified: trunk/aspect/include/aspect/velocity_boundary_conditions/function.h
===================================================================
--- trunk/aspect/include/aspect/velocity_boundary_conditions/function.h 2014-04-02 13:14:54 UTC (rev 2397)
+++ trunk/aspect/include/aspect/velocity_boundary_conditions/function.h 2014-04-02 13:21:24 UTC (rev 2398)
@@ -24,6 +24,7 @@
#define __aspect__velocity_boundary_conditions_function_h
#include <aspect/velocity_boundary_conditions/interface.h>
+#include <aspect/simulator_access.h>
#include <deal.II/base/parsed_function.h>
@@ -40,7 +41,7 @@
* @ingroup VelocityBoundaryConditionsModels
*/
template <int dim>
- class Function : public Interface<dim>
+ class Function : public Interface<dim>, public SimulatorAccess<dim>
{
public:
/**
@@ -92,11 +93,6 @@
* A function object representing the components of the velocity.
*/
Functions::ParsedFunction<dim> boundary_velocity_function;
-
- /**
- * Whether to interpret time in years or seconds.
- */
- bool use_years_instead_of_seconds;
};
}
}
Modified: trunk/aspect/source/velocity_boundary_conditions/function.cc
===================================================================
--- trunk/aspect/source/velocity_boundary_conditions/function.cc 2014-04-02 13:14:54 UTC (rev 2397)
+++ trunk/aspect/source/velocity_boundary_conditions/function.cc 2014-04-02 13:21:24 UTC (rev 2398)
@@ -52,7 +52,7 @@
// means "5 meters/year" and we need to convert it to the Aspect
// time system by dividing by the number of seconds per year
// to get MKS units
- if (use_years_instead_of_seconds)
+ if (this->convert_output_to_years())
return velocity / year_in_seconds;
else
return velocity;
@@ -65,7 +65,7 @@
{
// we get time passed as seconds (always) but may want
// to reinterpret it in years
- if (use_years_instead_of_seconds)
+ if (this->convert_output_to_years())
boundary_velocity_function.set_time (time / year_in_seconds);
else
boundary_velocity_function.set_time (time);
@@ -101,10 +101,6 @@
prm.leave_subsection();
}
prm.leave_subsection();
-
- // also query the unit system for time
- use_years_instead_of_seconds
- = prm.get_bool ("Use years in output instead of seconds");
}
}
More information about the CIG-COMMITS
mailing list