24 template <
int dim,
int spacedim>
27 const unsigned int &n_components,
28 const std::string &parsed_component_names,
29 const std::string &parsed_id_components,
30 const std::string &parsed_id_functions,
31 const std::string &parsed_constants)
36 parsed_component_names,
40 n_components(n_components)
43 template<
int dim,
int spacedim>
49 template<
int dim,
int spacedim>
55 template<
int dim,
int spacedim>
60 for (
unsigned int i=0; i<ids.size(); ++i)
68 template<
int dim,
int spacedim>
74 for (
unsigned int i=0; i<ids.size(); ++i)
83 template<
int dim,
int spacedim>
85 std::map<types::global_dof_index,double> &d_dofs)
const 88 for (
unsigned int i=0; i<ids.size(); ++i)
96 template<
int dim,
int spacedim>
99 std::map<types::global_dof_index,double> &d_dofs)
const 102 for (
unsigned int i=0; i<ids.size(); ++i)
135 dealii::DoFHandler<1, 2>
const &,
136 dealii::Quadrature<0>
const &, dealii::ConstraintMatrix &)
const 143 dealii::DoFHandler<1, 3>
const &,
144 dealii::Quadrature<0>
const &, dealii::ConstraintMatrix &)
const 153 dealii::DoFHandler<2, 3>
const &,
154 dealii::Quadrature<1>
const &, dealii::ConstraintMatrix &)
const 162 template <
int dim,
int spacedim>
169 for (
unsigned int i=0; i<ids.size(); ++i)
175 boundary_map[ids[i]] = f;
178 std::vector<unsigned int> component_mapping;
180 for (
unsigned int j=0; j<component_mapping.size(); ++j)
181 component_mapping.push_back(this->get_mapped_mask(ids[i])[j]);
192 template <
int dim,
int spacedim>
198 for (
unsigned int i=0; i<ids.size(); ++i)
204 boundary_map[ids[i]] = f;
207 std::vector<unsigned int> component_mapping;
209 for (
unsigned int j=0; j<component_mapping.size(); ++j)
210 component_mapping.push_back(this->get_mapped_mask(ids[i])[j]);
225 std::map<types::global_dof_index, double> &)
const 235 std::map<types::global_dof_index, double> &)
const 247 std::map<types::global_dof_index, double> &)
const 253 template <
int dim,
int spacedim>
257 std::map<types::global_dof_index,double> &projected_bv)
const 260 for (
unsigned int i=0; i<ids.size(); ++i)
266 boundary_map[ids[i]] = f;
269 std::vector<unsigned int> component_mapping;
272 component_mapping.push_back(this->get_mapped_mask(ids[i])[j]);
288 std::map<types::global_dof_index,double> &)
const 297 std::map<types::global_dof_index,double> &)
const 306 std::map<types::global_dof_index,double> &)
const 312 template <
int dim,
int spacedim>
315 std::map<types::global_dof_index,double> &projected_bv)
const 318 for (
unsigned int i=0; i<ids.size(); ++i)
324 boundary_map[ids[i]] = f;
327 std::vector<unsigned int> component_mapping;
330 component_mapping.push_back(this->get_mapped_mask(ids[i])[j]);
476 template <
int dim,
int spacedim>
480 std::set<types::boundary_id> no_normal_flux_boundaries;
482 typedef std::map<std::string, std::pair<std::vector<unsigned int>,
unsigned int > >::const_iterator it_type;
486 std::vector<unsigned int>
normal_ids = (it->second).first;
488 for (
unsigned int i=0; i<normal_ids.size(); ++i)
489 no_normal_flux_boundaries.insert(normal_ids[i]);
493 no_normal_flux_boundaries,
498 template <
int dim,
int spacedim>
503 std::set<types::boundary_id> no_normal_flux_boundaries;
505 typedef std::map<std::string, std::pair<std::vector<unsigned int>,
unsigned int > >::const_iterator it_type;
509 std::vector<unsigned int>
normal_ids = (it->second).first;
511 for (
unsigned int i=0; i<normal_ids.size(); ++i)
512 no_normal_flux_boundaries.insert(normal_ids[i]);
516 no_normal_flux_boundaries,
523 template <
int dim,
int spacedim>
527 std::set<types::boundary_id> no_normal_flux_boundaries;
529 typedef std::map<std::string, std::pair<std::vector<unsigned int>,
unsigned int > >::const_iterator it_type;
535 std::vector<unsigned int>
normal_ids = (it->second).first;
536 unsigned int fcv = (it->second).second;
538 for (
unsigned int i=0; i<normal_ids.size(); ++i)
542 boundary_map[normal_ids[i]] = f;
543 no_normal_flux_boundaries.insert(normal_ids[i]);
548 no_normal_flux_boundaries,
554 template <
int dim,
int spacedim>
559 std::set<types::boundary_id> no_normal_flux_boundaries;
561 typedef std::map<std::string, std::pair<std::vector<unsigned int>,
unsigned int > >::const_iterator it_type;
567 std::vector<unsigned int>
normal_ids = (it->second).first;
568 unsigned int fcv = (it->second).second;
570 for (
unsigned int i=0; i<normal_ids.size(); ++i)
575 boundary_map[normal_ids[i]] = f;
576 no_normal_flux_boundaries.insert(normal_ids[i]);
581 no_normal_flux_boundaries,
void compute_nonzero_normal_flux_constraints(const DoFHandler< dim, spacedim > &dof_handler, ConstraintMatrix &constraints) const
This function must be called in order to apply the Dirichlet boundary conditions to the normal compon...
void interpolate_boundary_values(const DoFHandler< dim, spacedim > &dof_handler, ConstraintMatrix &constraints) const
This function must be called in order to apply the boundary conditions to the ConstraintMatrix.
static ParameterHandler prm
Static parameter.
std::vector< unsigned int > ids
void compute_no_normal_flux_constraints(const DoFHandlerType< dim, spacedim > &dof_handler, const unsigned int first_vector_component, const std::set< types::boundary_id > &boundary_ids, ConstraintMatrix &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
void compute_nonzero_normal_flux_constraints(const DoFHandlerType< dim, spacedim > &dof_handler, const unsigned int first_vector_component, const std::set< types::boundary_id > &boundary_ids, typename FunctionMap< spacedim >::type &function_map, ConstraintMatrix &constraints, const Mapping< dim, spacedim > &mapping=StaticMappingQ1< dim >::mapping)
std::vector< unsigned int > normal_ids
ParsedMappedFunctions object.
std::vector< unsigned int > get_mapped_ids() const
return the list of the mapped ids
virtual void parse_parameters_call_back()
these method calls the method of the Parent class
virtual void declare_parameters(ParameterHandler &prm)
these method calls the method of the Parent class
static::ExceptionBase & ExcImpossibleInDim(int arg1)
std::map< std::string, std::pair< std::vector< unsigned int >, unsigned int > > mapped_normal_components
virtual void parse_parameters_call_back()
parse_parameters_call_back is inherithed by ParameterAcceptor
#define Assert(cond, exc)
std::map< types::boundary_id, const Function< dim, Number > *> type
virtual void declare_parameters(ParameterHandler &prm)
declare_parameters is inherithed by ParameterAcceptor
ParsedDirichletBCs(const std::string &name="Dirichlet BCs", const unsigned int &n_components=1, const std::string &component_names="", const std::string &default_id_components="0=ALL", const std::string &default_id_functions="", const std::string &default_constants="")
Constructor.
void compute_no_normal_flux_constraints(const DoFHandler< dim, spacedim > &dof_handler, ConstraintMatrix &constraints) const
This function must be called in order to apply the homogeneous Dirichlet boundary conditions to the n...
static::ExceptionBase & ExcNotImplemented()
shared_ptr< dealii::Functions::ParsedFunction< spacedim > > get_mapped_function(const unsigned int &id) const
return a shared_ptr to the ParsedFunction corresponding to the given id
void project_boundary_values(const DoFHandler< dim, spacedim > &dof_handler, const Quadrature< dim-1 > &quadrature, ConstraintMatrix &constraints) const
This function must be called in order to apply the boundary conditions to the ConstraintMatrix.
shared_ptr< dealii::Functions::ParsedFunction< spacedim > > get_mapped_normal_function(const unsigned int &id, const unsigned int &fcv) const
return a shared_ptr to the ParsedFunction corresponding to the given id the function has spacedim com...
const unsigned int n_components
Number of components of the underlying Function objects.
ComponentMask get_mapped_mask(const unsigned int &id) const
return the ComponentMask corresponding to the given id