39 const std::string& type = std::string());
51 const std::string& type = std::string());
58 const std::vector<std::vector<std::string>>& types);
65 std::pair<std::reference_wrapper<const common::IndexMap>,
int>>& maps);
70 std::pair<std::reference_wrapper<const common::IndexMap>,
int>>& maps);
87 const std::span<const PetscScalar>& constants,
88 const std::map<std::pair<IntegralType, int>,
89 std::pair<std::span<const PetscScalar>,
int>>& coeffs);
122 const std::vector<std::span<const PetscScalar>>& constants,
123 const std::vector<std::map<std::pair<IntegralType, int>,
124 std::pair<std::span<const PetscScalar>,
int>>>&
128 const std::vector<Vec>& x0,
double scale);
152 const std::vector<Vec>& x0,
double scale);
167 const Vec x0,
double scale = 1.0);
Object for setting (strong) Dirichlet boundary conditions.
Definition: DirichletBC.h:125
Miscellaneous classes, functions and types.
void set_bc(Vec b, const std::vector< std::shared_ptr< const DirichletBC< PetscScalar >>> &bcs, const Vec x0, double scale=1.0)
Set bc values in owned (local) part of the PETSc vector, multiplied by 'scale'. The vectors b and x0 ...
Definition: petsc.cpp:395
Mat create_matrix_nest(const std::vector< std::vector< const Form< PetscScalar > * >> &a, const std::vector< std::vector< std::string >> &types)
Create nested (MatNest) matrix.
Definition: petsc.cpp:179
void apply_lifting(Vec b, const std::vector< std::shared_ptr< const Form< PetscScalar >>> &a, const std::vector< std::span< const PetscScalar >> &constants, const std::vector< std::map< std::pair< IntegralType, int >, std::pair< std::span< const PetscScalar >, int >>> &coeffs, const std::vector< std::vector< std::shared_ptr< const DirichletBC< PetscScalar >>>> &bcs1, const std::vector< Vec > &x0, double scale)
Modify b such that:
Definition: petsc.cpp:300
Vec create_vector_nest(const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int >> &maps)
Create nested (VecNest) vector. Vector is not zeroed.
Definition: petsc.cpp:246
Mat create_matrix(const Form< PetscScalar > &a, const std::string &type=std::string())
Create a matrix.
Definition: petsc.cpp:21
Mat create_matrix_block(const std::vector< std::vector< const Form< PetscScalar > * >> &a, const std::string &type=std::string())
Initialise a monolithic matrix for an array of bilinear forms.
Definition: petsc.cpp:33
Vec create_vector_block(const std::vector< std::pair< std::reference_wrapper< const common::IndexMap >, int >> &maps)
Initialise monolithic vector. Vector is not zeroed.
Definition: petsc.cpp:221
void assemble_vector(Vec b, const Form< PetscScalar > &L, const std::span< const PetscScalar > &constants, const std::map< std::pair< IntegralType, int >, std::pair< std::span< const PetscScalar >, int >> &coeffs)
Assemble linear form into an already allocated PETSc vector. Ghost contributions are not accumulated ...
Definition: petsc.cpp:268
Finite element method functionality.
Definition: assemble_matrix_impl.h:25