[cig-commits] commit 2034 by dannberg to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Thu Nov 21 13:01:00 PST 2013
Revision 2034
declare parameters for visualization postprocessors
U trunk/aspect/source/postprocess/visualization.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2034&peg=2034
Diff:
Modified: trunk/aspect/source/postprocess/visualization.cc
===================================================================
--- trunk/aspect/source/postprocess/visualization.cc 2013-11-21 20:53:51 UTC (rev 2033)
+++ trunk/aspect/source/postprocess/visualization.cc 2013-11-21 21:00:29 UTC (rev 2034)
@@ -590,6 +590,10 @@
prm.leave_subsection();
}
prm.leave_subsection();
+
+ // now declare the parameters of each of the registered
+ // visualization postprocessors in turn
+ std_cxx1x::get<dim>(registered_plugins).declare_parameters (prm);
}
@@ -599,6 +603,7 @@
{
Assert (std_cxx1x::get<dim>(registered_plugins).plugins != 0,
ExcMessage ("No postprocessors registered!?"));
+ std::vector<std::string> viz_names;
prm.enter_subsection("Postprocess");
{
@@ -609,8 +614,7 @@
group_files = prm.get_integer("Number of grouped files");
// now also see which derived quantities we are to compute
- std::vector<std::string> viz_names
- = Utilities::split_string_list(prm.get("List of output variables"));
+ viz_names = Utilities::split_string_list(prm.get("List of output variables"));
// see if 'all' was selected (or is part of the list). if so
// simply replace the list with one that contains all names
@@ -624,37 +628,37 @@
p != std_cxx1x::get<dim>(registered_plugins).plugins->end(); ++p)
viz_names.push_back (std_cxx1x::get<0>(*p));
}
-
- // then go through the list, create objects and let them parse
- // their own parameters
- for (unsigned int name=0; name<viz_names.size(); ++name)
- {
- VisualizationPostprocessors::Interface<dim> *
- viz_postprocessor = std_cxx1x::get<dim>(registered_plugins)
- .create_plugin (viz_names[name],
- "Visualization plugins",
- prm);
-
- // make sure that the postprocessor is indeed of type
- // dealii::DataPostprocessor or of type
- // VisualizationPostprocessors::CellDataVectorCreator
- Assert ((dynamic_cast<DataPostprocessor<dim>*>(viz_postprocessor)
- != 0)
- ||
- (dynamic_cast<VisualizationPostprocessors::CellDataVectorCreator<dim>*>(viz_postprocessor)
- != 0)
- ,
- ExcMessage ("Can't convert visualization postprocessor to type "
- "dealii::DataPostprocessor or "
- "VisualizationPostprocessors::CellDataVectorCreator!?"));
-
- postprocessors.push_back (std_cxx1x::shared_ptr<VisualizationPostprocessors::Interface<dim> >
- (viz_postprocessor));
- }
}
prm.leave_subsection();
}
prm.leave_subsection();
+
+ // then go through the list, create objects and let them parse
+ // their own parameters
+ for (unsigned int name=0; name<viz_names.size(); ++name)
+ {
+ VisualizationPostprocessors::Interface<dim> *
+ viz_postprocessor = std_cxx1x::get<dim>(registered_plugins)
+ .create_plugin (viz_names[name],
+ "Visualization plugins",
+ prm);
+
+ // make sure that the postprocessor is indeed of type
+ // dealii::DataPostprocessor or of type
+ // VisualizationPostprocessors::CellDataVectorCreator
+ Assert ((dynamic_cast<DataPostprocessor<dim>*>(viz_postprocessor)
+ != 0)
+ ||
+ (dynamic_cast<VisualizationPostprocessors::CellDataVectorCreator<dim>*>(viz_postprocessor)
+ != 0)
+ ,
+ ExcMessage ("Can't convert visualization postprocessor to type "
+ "dealii::DataPostprocessor or "
+ "VisualizationPostprocessors::CellDataVectorCreator!?"));
+
+ postprocessors.push_back (std_cxx1x::shared_ptr<VisualizationPostprocessors::Interface<dim> >
+ (viz_postprocessor));
+ }
}
More information about the CIG-COMMITS
mailing list