Skip to content
Snippets Groups Projects
Commit f8a200bb authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Do the right thing if the 'neumannValues' parameter is not given

[[Imported from SVN: r9551]]
parent 05c30eee
No related branches found
No related tags found
No related merge requests found
......@@ -256,8 +256,10 @@ int main (int argc, char *argv[]) try
// ////////////////////////////////////////////////////////////
const ParameterTree& materialParameters = parameterSet.sub("materialParameters");
NeumannFunction neumannFunction(parameterSet.get<FieldVector<double,3> >("neumannValues"),
homotopyParameter);
shared_ptr<NeumannFunction> neumannFunction;
if (parameterSet.hasKey("neumannValues"))
neumannFunction = make_shared<NeumannFunction>(parameterSet.get<FieldVector<double,3> >("neumannValues"),
homotopyParameter);
std::cout << "Material parameters:" << std::endl;
materialParameters.report();
......@@ -267,7 +269,7 @@ int main (int argc, char *argv[]) try
P1Basis::LocalFiniteElement,
3> cosseratEnergyLocalStiffness(materialParameters,
&neumannBoundary,
&neumannFunction);
neumannFunction.get());
GeodesicFEAssembler<P1Basis,TargetSpace> assembler(grid->leafView(),
&cosseratEnergyLocalStiffness);
......@@ -278,7 +280,7 @@ int main (int argc, char *argv[]) try
P1Basis::LocalFiniteElement,
3,adouble> cosseratEnergyADOLCLocalStiffness(materialParameters,
&neumannBoundary,
&neumannFunction);
neumannFunction.get());
LocalGeodesicFEADOLCStiffness<GridType::LeafGridView,
P1Basis::LocalFiniteElement,
TargetSpace> localGFEADOLCStiffness(&cosseratEnergyADOLCLocalStiffness);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment