DOLFIN
DOLFIN C++ interface
Classes | Public Member Functions | List of all members
dolfin::MultiMeshDirichletBC Class Reference

#include <MultiMeshDirichletBC.h>

Public Member Functions

 MultiMeshDirichletBC (std::shared_ptr< const MultiMeshFunctionSpace > V, std::shared_ptr< const GenericFunction > g, std::shared_ptr< const SubDomain > sub_domain, std::string method="topological", bool check_midpoint=true, bool exclude_overlapped_boundaries=true)
 
 MultiMeshDirichletBC (std::shared_ptr< const MultiMeshFunctionSpace > V, std::shared_ptr< const GenericFunction > g, std::shared_ptr< const SubDomain > sub_domain, std::size_t part, std::string method="topological", bool check_midpoint=true, bool exclude_overlapped_boundaries=true)
 
 MultiMeshDirichletBC (std::shared_ptr< const MultiMeshFunctionSpace > V, std::shared_ptr< const GenericFunction > g, std::shared_ptr< const MeshFunction< std::size_t >> sub_domains, std::size_t sub_domain, std::size_t part, std::string method="topological")
 
 MultiMeshDirichletBC (const MultiMeshDirichletBC &bc)
 
 ~MultiMeshDirichletBC ()
 Destructor.
 
std::shared_ptr< const MultiMeshFunctionSpacefunction_space () const
 
std::shared_ptr< DirichletBCview (std::size_t part) const
 
void apply (GenericMatrix &A) const
 
void apply (GenericVector &b) const
 
void apply (GenericMatrix &A, GenericVector &b) const
 
void apply (GenericVector &b, const GenericVector &x) const
 
void apply (GenericMatrix &A, GenericVector &b, const GenericVector &x) const
 
void zero (GenericMatrix &A) const
 
void homogenize ()
 Set value to 0.0.
 

Detailed Description

This class is used to set Dirichlet boundary conditions for multimesh function spaces.

Constructor & Destructor Documentation

◆ MultiMeshDirichletBC() [1/4]

MultiMeshDirichletBC::MultiMeshDirichletBC ( std::shared_ptr< const MultiMeshFunctionSpace V,
std::shared_ptr< const GenericFunction g,
std::shared_ptr< const SubDomain sub_domain,
std::string  method = "topological",
bool  check_midpoint = true,
bool  exclude_overlapped_boundaries = true 
)

Create boundary condition for subdomain

Parameters
V(MultiMeshFunctionSpace) The function space
g(GenericFunction) The value
sub_domain(SubDomain) The subdomain
method(std::string) Option passed to DirichletBC.
check_midpoint(bool) Option passed to DirichletBC.
exclude_overlapped_boundaries(bool) If true, then the variable on_boundary will be set to false for facets that are overlapped by another mesh (irrespective of the layering order of the meshes).

◆ MultiMeshDirichletBC() [2/4]

MultiMeshDirichletBC::MultiMeshDirichletBC ( std::shared_ptr< const MultiMeshFunctionSpace V,
std::shared_ptr< const GenericFunction g,
std::shared_ptr< const SubDomain sub_domain,
std::size_t  part,
std::string  method = "topological",
bool  check_midpoint = true,
bool  exclude_overlapped_boundaries = true 
)

Create boundary condition for subdomain on specified part

Parameters
V(MultiMeshFunctionSpace) The function space
g(GenericFunction) The value
sub_domain(SubDomain) The subdomain
part(std::size_t) The part on which to set boundary conditions
method(std::string) Option passed to DirichletBC.
check_midpoint(bool) Option passed to DirichletBC.
exclude_overlapped_boundaries(bool) If true, then the variable on_boundary will be set to false for facets that are overlapped by another mesh (irrespective of the layering order of the meshes).

◆ MultiMeshDirichletBC() [3/4]

MultiMeshDirichletBC::MultiMeshDirichletBC ( std::shared_ptr< const MultiMeshFunctionSpace V,
std::shared_ptr< const GenericFunction g,
std::shared_ptr< const MeshFunction< std::size_t >>  sub_domains,
std::size_t  sub_domain,
std::size_t  part,
std::string  method = "topological" 
)

Create boundary condition for subdomain specified by index

Parameters
V(FunctionSpace) The function space.
g(GenericFunction) The value.
sub_domains(MeshFunction <std::size_t>) Subdomain markers
sub_domain(std::size_t) The subdomain index (number)
part(std::size_t) The part on which to set boundary conditions
method(std::string) Optional argument: A string specifying the method to identify dofs.

◆ MultiMeshDirichletBC() [4/4]

MultiMeshDirichletBC::MultiMeshDirichletBC ( const MultiMeshDirichletBC bc)

Copy constructor. Either cached DOF data are copied.

Arguments bc (MultiMeshDirichletBC) The object to be copied.

Member Function Documentation

◆ apply() [1/5]

void MultiMeshDirichletBC::apply ( GenericMatrix A) const

Apply boundary condition to a matrix

Parameters
A(GenericMatrix) The matrix to apply boundary condition to.

◆ apply() [2/5]

void MultiMeshDirichletBC::apply ( GenericVector b) const

Apply boundary condition to a vector

Parameters
b(GenericVector) The vector to apply boundary condition to.

◆ apply() [3/5]

void MultiMeshDirichletBC::apply ( GenericMatrix A,
GenericVector b 
) const

Apply boundary condition to a linear system

Parameters
A(GenericMatrix) The matrix to apply boundary condition to.
b(GenericVector) The vector to apply boundary condition to.

◆ apply() [4/5]

void MultiMeshDirichletBC::apply ( GenericVector b,
const GenericVector x 
) const

Apply boundary condition to vectors for a nonlinear problem

Parameters
b(GenericVector) The vector to apply boundary conditions to.
x(GenericVector) Another vector (nonlinear problem).

◆ apply() [5/5]

void MultiMeshDirichletBC::apply ( GenericMatrix A,
GenericVector b,
const GenericVector x 
) const

Apply boundary condition to a linear system for a nonlinear problem

Parameters
A(GenericMatrix) The matrix to apply boundary conditions to.
b(GenericVector) The vector to apply boundary conditions to.
x(GenericVector) Another vector (nonlinear problem).

◆ function_space()

std::shared_ptr<const MultiMeshFunctionSpace> dolfin::MultiMeshDirichletBC::function_space ( ) const
inline

Return multimesh function space V

Returns
FunctionSpace The multimesh function space to which boundary conditions are applied.

◆ view()

std::shared_ptr<DirichletBC> dolfin::MultiMeshDirichletBC::view ( std::size_t  part) const
inline

Return a view of boundary conditions on a part of the multimesh

Parameters
part(std::size_t) The part number

◆ zero()

void MultiMeshDirichletBC::zero ( GenericMatrix A) const

Zero the rows in a matrix A corresponding to boundary dofs

Parameters
A(GenericMatrix) The matrix to zero rows in.

The documentation for this class was generated from the following files: