From: guido Date: Fri, 9 Mar 2001 14:55:58 +0000 (+0000) Subject: 'allflags' removed X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c785bfdb4062ff405a0e1ad7a64add2f2fb1691f;p=dealii-svn.git 'allflags' removed git-svn-id: https://svn.dealii.org/trunk@4182 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index b751b31d80..106e757bd8 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -446,11 +446,13 @@ FEValues::FEValues (const Mapping &mapping, // first find out which objects // need to be recomputed on each // cell we visit. this we have to - // ask the finite element - const UpdateFlags flags = UpdateFlags(mapping.update_once (update_flags) | - mapping.update_each (update_flags) | - fe.update_once (update_flags) | - fe.update_each (update_flags) ); + // ask the finite element and mapping. + // elements are first since they + // might require update in mapping + UpdateFlags flags = fe.update_once (update_flags) + | fe.update_each (update_flags); + flags |= mapping.update_once (flags) + | mapping.update_each (flags); // then get objects into which the // FE and the Mapping can store @@ -459,29 +461,10 @@ FEValues::FEValues (const Mapping &mapping, mapping_data = mapping.get_data(flags, quadrature); fe_data = fe.get_data(flags, mapping, quadrature); - // maybe some of the flags passed - // to the get_data functions - // resulted in other flags to be - // set, so collect them again. - // - // example: a FE might need to have - // the covariant transform of the - // mapping to compute its shape - // values -//TODO: why can't the flags be obtained in one cycle?, e.g. by calling -// flags = fe.update_once(update_flags) -// flags = mapping.update_once(flags) -// if the mapping should depend on the fe to compute some things, then -// we would need to iterate, and the one cycle here isn't sufficient!? - const UpdateFlags allflags = UpdateFlags(mapping_data->update_once | - mapping_data->update_each | - fe_data->update_once | - fe_data->update_each ); - // set up objects within this class FEValuesData::initialize(n_quadrature_points, dofs_per_cell, - allflags); + flags); }; @@ -507,42 +490,25 @@ FEValues::FEValues (const FiniteElement &fe, // first find out which objects // need to be recomputed on each // cell we visit. this we have to - // ask the finite element - const UpdateFlags flags = UpdateFlags(mapping->update_once (update_flags) | - mapping->update_each (update_flags) | - fe.update_once (update_flags) | - fe.update_each (update_flags) ); - - // then get objects into which the + // ask the finite element and mapping. + // elements are first since they + // might require update in mapping + UpdateFlags flags = fe.update_once (update_flags) + | fe.update_each (update_flags); + flags |= mapping->update_once (flags) + | mapping->update_each (flags); + + // then get objects into which the // FE and the Mapping can store // intermediate data used across // calls to reinit mapping_data = mapping->get_data(flags, quadrature); fe_data = fe.get_data(flags, *mapping, quadrature); - // maybe some of the flags passed - // to the get_data functions - // resulted in other flags to be - // set, so collect them again. - // - // example: a FE might need to have - // the covariant transform of the - // mapping to compute its shape - // values -//TODO: why can't the flags be obtained in one cycle?, e.g. by calling -// flags = fe.update_once(update_flags) -// flags = mapping.update_once(flags) -// if the mapping should depend on the fe to compute some things, then -// we would need to iterate, and the one cycle here isn't sufficient!? - const UpdateFlags allflags = UpdateFlags(mapping_data->update_once | - mapping_data->update_each | - fe_data->update_once | - fe_data->update_each ); - // set up objects within this class FEValuesData::initialize(n_quadrature_points, dofs_per_cell, - allflags); + flags); } @@ -649,11 +615,13 @@ FEFaceValues::FEFaceValues (const Mapping &mapping, // first find out which objects // need to be recomputed on each // cell we visit. this we have to - // ask the finite element - const UpdateFlags flags = UpdateFlags(mapping.update_once (update_flags) | - mapping.update_each (update_flags) | - fe.update_once (update_flags) | - fe.update_each (update_flags) ); + // ask the finite element and mapping. + // elements are first since they + // might require update in mapping + UpdateFlags flags = fe.update_once (update_flags) + | fe.update_each (update_flags); + flags |= mapping.update_once (flags) + | mapping.update_each (flags); // then get objects into which the // FE and the Mapping can store @@ -662,29 +630,10 @@ FEFaceValues::FEFaceValues (const Mapping &mapping, mapping_data = mapping.get_face_data(flags, quadrature); fe_data = fe.get_face_data(flags, mapping, quadrature); - // maybe some of the flags passed - // to the get_data functions - // resulted in other flags to be - // set, so collect them again. - // - // example: a FE might need to have - // the covariant transform of the - // mapping to compute its shape - // values -//TODO: why can't the flags be obtained in one cycle?, e.g. by calling -// flags = fe.update_once(update_flags) -// flags = mapping.update_once(flags) -// if the mapping should depend on the fe to compute some things, then -// we would need to iterate, and the one cycle here isn't sufficient!? - const UpdateFlags allflags = UpdateFlags(mapping_data->update_once | - mapping_data->update_each | - fe_data->update_once | - fe_data->update_each ); - // set up objects within this class FEValuesData::initialize(n_quadrature_points, dofs_per_cell, - allflags); + flags); }; @@ -704,11 +653,13 @@ FEFaceValues::FEFaceValues (const FiniteElement &fe, // first find out which objects // need to be recomputed on each // cell we visit. this we have to - // ask the finite element - const UpdateFlags flags = UpdateFlags(mapping->update_once (update_flags) | - mapping->update_each (update_flags) | - fe.update_once (update_flags) | - fe.update_each (update_flags) ); + // ask the finite element and mapping. + // elements are first since they + // might require update in mapping + UpdateFlags flags = fe.update_once (update_flags) + | fe.update_each (update_flags); + flags |= mapping->update_once (flags) + | mapping->update_each (flags); // then get objects into which the // FE and the Mapping can store @@ -717,29 +668,10 @@ FEFaceValues::FEFaceValues (const FiniteElement &fe, mapping_data = mapping->get_face_data(flags, quadrature); fe_data = fe.get_face_data(flags, *mapping, quadrature); - // maybe some of the flags passed - // to the get_data functions - // resulted in other flags to be - // set, so collect them again. - // - // example: a FE might need to have - // the covariant transform of the - // mapping to compute its shape - // values -//TODO: why can't the flags be obtained in one cycle?, e.g. by calling -// flags = fe.update_once(update_flags) -// flags = mapping.update_once(flags) -// if the mapping should depend on the fe to compute some things, then -// we would need to iterate, and the one cycle here isn't sufficient!? - const UpdateFlags allflags = UpdateFlags(mapping_data->update_once | - mapping_data->update_each | - fe_data->update_once | - fe_data->update_each ); - // set up objects within this class FEValuesData::initialize(n_quadrature_points, dofs_per_cell, - allflags); + flags); }; @@ -798,11 +730,13 @@ FESubfaceValues::FESubfaceValues (const Mapping &mapping, // first find out which objects // need to be recomputed on each // cell we visit. this we have to - // ask the finite element - const UpdateFlags flags = UpdateFlags(mapping.update_once (update_flags) | - mapping.update_each (update_flags) | - fe.update_once (update_flags) | - fe.update_each (update_flags) ); + // ask the finite element and mapping. + // elements are first since they + // might require update in mapping + UpdateFlags flags = fe.update_once (update_flags) + | fe.update_each (update_flags); + flags |= mapping.update_once (flags) + | mapping.update_each (flags); // then get objects into which the // FE and the Mapping can store @@ -811,29 +745,10 @@ FESubfaceValues::FESubfaceValues (const Mapping &mapping, mapping_data = mapping.get_subface_data(flags, quadrature); fe_data = fe.get_subface_data(flags, mapping, quadrature); - // maybe some of the flags passed - // to the get_data functions - // resulted in other flags to be - // set, so collect them again. - // - // example: a FE might need to have - // the covariant transform of the - // mapping to compute its shape - // values -//TODO: why can't the flags be obtained in one cycle?, e.g. by calling -// flags = fe.update_once(update_flags) -// flags = mapping.update_once(flags) -// if the mapping should depend on the fe to compute some things, then -// we would need to iterate, and the one cycle here isn't sufficient!? - const UpdateFlags allflags = UpdateFlags(mapping_data->update_once | - mapping_data->update_each | - fe_data->update_once | - fe_data->update_each ); - // set up objects within this class FEValuesData::initialize(n_quadrature_points, dofs_per_cell, - allflags); + flags); } @@ -854,11 +769,13 @@ FESubfaceValues::FESubfaceValues (const FiniteElement &fe, // first find out which objects // need to be recomputed on each // cell we visit. this we have to - // ask the finite element - const UpdateFlags flags = UpdateFlags(mapping->update_once (update_flags) | - mapping->update_each (update_flags) | - fe.update_once (update_flags) | - fe.update_each (update_flags) ); + // ask the finite element and mapping. + // elements are first since they + // might require update in mapping + UpdateFlags flags = fe.update_once (update_flags) + | fe.update_each (update_flags); + flags |= mapping->update_once (flags) + | mapping->update_each (flags); // then get objects into which the // FE and the Mapping can store @@ -867,29 +784,10 @@ FESubfaceValues::FESubfaceValues (const FiniteElement &fe, mapping_data = mapping->get_subface_data(flags, quadrature); fe_data = fe.get_subface_data(flags, *mapping, quadrature); - // maybe some of the flags passed - // to the get_data functions - // resulted in other flags to be - // set, so collect them again. - // - // example: a FE might need to have - // the covariant transform of the - // mapping to compute its shape - // values -//TODO: why can't the flags be obtained in one cycle?, e.g. by calling -// flags = fe.update_once(update_flags) -// flags = mapping.update_once(flags) -// if the mapping should depend on the fe to compute some things, then -// we would need to iterate, and the one cycle here isn't sufficient!? - const UpdateFlags allflags = UpdateFlags(mapping_data->update_once | - mapping_data->update_each | - fe_data->update_once | - fe_data->update_each ); - // set up objects within this class FEValuesData::initialize(n_quadrature_points, dofs_per_cell, - allflags); + flags); }