DOLFIN-X
DOLFIN-X C++ interface
|
58 Eigen::Array<std::int32_t, Eigen::Dynamic, Eigen::Dynamic>
60 const std::vector<std::reference_wrapper<function::FunctionSpace>>& V,
61 const int dim,
const Eigen::Ref<const Eigen::ArrayXi>& entities,
80 Eigen::Array<std::int32_t, Eigen::Dynamic, Eigen::Dynamic>
82 const std::vector<std::reference_wrapper<function::FunctionSpace>>& V,
83 const std::function<Eigen::Array<bool, Eigen::Dynamic, 1>(
84 const Eigen::Ref<
const Eigen::Array<
double, 3, Eigen::Dynamic,
85 Eigen::RowMajor>>&)>& marker);
109 const std::shared_ptr<const function::Function>& g,
110 const Eigen::Ref<
const Eigen::Array<std::int32_t, Eigen::Dynamic, 1>>&
123 const std::shared_ptr<const function::Function>& g,
124 const Eigen::Ref<
const Eigen::Array<std::int32_t, Eigen::Dynamic, 2>>&
126 std::shared_ptr<const function::FunctionSpace> V);
148 std::shared_ptr<const function::FunctionSpace>
function_space()
const;
152 std::shared_ptr<const function::Function>
value()
const;
156 const Eigen::Array<std::int32_t, Eigen::Dynamic, 2>&
dofs()
const;
161 const Eigen::Ref<const Eigen::Array<std::int32_t, Eigen::Dynamic, 2>>
166 void set(Eigen::Ref<Eigen::Matrix<PetscScalar, Eigen::Dynamic, 1>> x,
167 double scale = 1.0)
const;
172 set(Eigen::Ref<Eigen::Matrix<PetscScalar, Eigen::Dynamic, 1>> x,
173 const Eigen::Ref<
const Eigen::Matrix<PetscScalar, Eigen::Dynamic, 1>>& x0,
174 double scale = 1.0)
const;
180 Eigen::Ref<Eigen::Matrix<PetscScalar, Eigen::Dynamic, 1>> values)
const;
185 void mark_dofs(std::vector<bool>& markers)
const;
189 std::shared_ptr<const function::FunctionSpace> _function_space;
192 std::shared_ptr<const function::Function> _g;
195 Eigen::Array<std::int32_t, Eigen::Dynamic, 2> _dofs;
198 int _owned_indices = -1;
~DirichletBC()=default
Destructor.
const Eigen::Ref< const Eigen::Array< std::int32_t, Eigen::Dynamic, 2 > > dofs_owned() const
Get array of dof indices owned by this process to which a Dirichlet BC is applied....
Definition: DirichletBC.cpp:584
Eigen::Array< std::int32_t, Eigen::Dynamic, Eigen::Dynamic > locate_dofs_topological(const std::vector< std::reference_wrapper< function::FunctionSpace >> &V, const int dim, const Eigen::Ref< const Eigen::ArrayXi > &entities, bool remote=true)
Build an array of degree-of-freedom indices that are associated with give mesh entities (topological)
Definition: DirichletBC.cpp:506
Eigen::Array< std::int32_t, Eigen::Dynamic, Eigen::Dynamic > locate_dofs_geometrical(const std::vector< std::reference_wrapper< function::FunctionSpace >> &V, const std::function< Eigen::Array< bool, Eigen::Dynamic, 1 >(const Eigen::Ref< const Eigen::Array< double, 3, Eigen::Dynamic, Eigen::RowMajor >> &)> &marker)
Build an array of degree-of-freedom indices based on coordinates of the degree-of-freedom (geometric)...
Definition: DirichletBC.cpp:520
std::shared_ptr< const function::FunctionSpace > function_space() const
The function space to which boundary conditions are applied.
Definition: DirichletBC.cpp:568
Interface for setting (strong) Dirichlet boundary conditions.
Definition: DirichletBC.h:98
void set(Eigen::Ref< Eigen::Matrix< PetscScalar, Eigen::Dynamic, 1 >> x, double scale=1.0) const
Set bc entries in x to scale*x_bc.
Definition: DirichletBC.cpp:589
void dof_values(Eigen::Ref< Eigen::Matrix< PetscScalar, Eigen::Dynamic, 1 >> values) const
Set boundary condition value for entres with an applied boundary condition. Other entries are not mod...
Definition: DirichletBC.cpp:619
DirichletBC(const std::shared_ptr< const function::Function > &g, const Eigen::Ref< const Eigen::Array< std::int32_t, Eigen::Dynamic, 1 >> &dofs)
Create boundary condition.
Definition: DirichletBC.cpp:536
const Eigen::Array< std::int32_t, Eigen::Dynamic, 2 > & dofs() const
Get array of dof indices to which a Dirichlet boundary condition is applied. The array is sorted and ...
Definition: DirichletBC.cpp:578
DirichletBC & operator=(const DirichletBC &bc)=default
Assignment operator.
void mark_dofs(std::vector< bool > &markers) const
Set markers[i] = true if dof i has a boundary condition applied. Value of markers[i] is not changed o...
Definition: DirichletBC.cpp:628
std::shared_ptr< const function::Function > value() const
Return boundary value function g.
Definition: DirichletBC.cpp:573