DOLFIN-X
DOLFIN-X C++ interface
|
9 #include "CoordinateElement.h"
11 #include "ElementDofLayout.h"
12 #include <dolfinx/common/types.h>
13 #include <dolfinx/la/PETScMatrix.h>
14 #include <dolfinx/la/PETScVector.h>
15 #include <dolfinx/mesh/cell_types.h>
22 struct ufc_coordinate_mapping;
23 struct ufc_function_space;
57 std::array<std::vector<std::shared_ptr<const function::FunctionSpace>>, 2>
59 const Eigen::Ref<
const Eigen::Array<
const fem::Form*, Eigen::Dynamic,
60 Eigen::Dynamic, Eigen::RowMajor>>& a);
77 const Eigen::Ref<
const Eigen::Array<
const fem::Form*, Eigen::Dynamic,
78 Eigen::Dynamic, Eigen::RowMajor>>& a);
82 const Eigen::Ref<
const Eigen::Array<
const fem::Form*, Eigen::Dynamic,
83 Eigen::Dynamic, Eigen::RowMajor>>& a);
97 const int field,
const std::int64_t index);
102 const std::vector<int>& parent_map
109 DofMap
create_dofmap(MPI_Comm comm,
const ufc_dofmap& dofmap,
110 mesh::Topology& topology);
120 const std::vector<std::shared_ptr<const function::FunctionSpace>>& spaces);
126 const ufc_form& ufc_form,
127 const std::vector<std::shared_ptr<const function::FunctionSpace>>& spaces);
130 std::vector<std::tuple<int, std::string, std::shared_ptr<function::Function>>>
134 std::vector<std::pair<std::string, std::shared_ptr<const function::Constant>>>
140 fem::CoordinateElement
147 fem::CoordinateElement
159 std::shared_ptr<function::FunctionSpace>
161 const std::string function_name,
162 std::shared_ptr<mesh::Mesh> mesh);
166 Eigen::Array<PetscScalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
171 Eigen::Array<PetscScalar, Eigen::Dynamic, 1>
std::shared_ptr< Form > create_form(ufc_form *(*fptr)(), const std::vector< std::shared_ptr< const function::FunctionSpace >> &spaces)
Create a form from a form_create function returning a pointer to a ufc_form, taking care of memory al...
Definition: utils.cpp:569
std::vector< std::tuple< int, std::string, std::shared_ptr< function::Function > > > get_coeffs_from_ufc_form(const ufc_form &ufc_form)
Extract coefficients from a UFC form.
Definition: utils.cpp:545
la::PETScVector create_vector_nest(const std::vector< const common::IndexMap * > &maps)
Create nested (VecNest) vector. Vector is not zeroed.
Definition: utils.cpp:387
CellType
Cell type identifier.
Definition: cell_types.h:22
la::SparsityPattern create_sparsity_pattern(const Form &a)
Create a sparsity pattern for a given form. The pattern is not finalised, i.e. the caller is responsi...
Definition: utils.cpp:141
fem::CoordinateElement create_coordinate_map(const ufc_coordinate_mapping &ufc_cmap)
Create a CoordinateElement from ufc.
Definition: utils.cpp:671
std::array< std::vector< std::shared_ptr< const function::FunctionSpace > >, 2 > block_function_spaces(const Eigen::Ref< const Eigen::Array< const fem::Form *, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &a)
Extract FunctionSpaces for (0) rows blocks and (1) columns blocks from a rectangular array of bilinea...
Definition: utils.cpp:93
std::shared_ptr< function::FunctionSpace > create_functionspace(ufc_function_space *(*fptr)(const char *), const std::string function_name, std::shared_ptr< mesh::Mesh > mesh)
Create FunctionSpace from UFC.
Definition: utils.cpp:707
la::PETScMatrix create_matrix_nest(const Eigen::Ref< const Eigen::Array< const fem::Form *, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &a)
Create nested (MatNest) matrix. Matrix is not zeroed.
Definition: utils.cpp:315
la::PETScVector create_vector_block(const std::vector< const common::IndexMap * > &maps)
Initialise monolithic vector. Vector is not zeroed.
Definition: utils.cpp:355
std::int64_t get_global_offset(const std::vector< const common::IndexMap * > &maps, const int field, const std::int64_t index)
Definition: utils.cpp:412
ElementDofLayout create_element_dof_layout(const ufc_dofmap &dofmap, const mesh::CellType cell_type, const std::vector< int > &parent_map={})
Create an ElementDofLayout from a ufc_dofmap.
Definition: utils.cpp:444
DofMap create_dofmap(MPI_Comm comm, const ufc_dofmap &dofmap, mesh::Topology &topology)
Create dof map on mesh from a ufc_dofmap.
Definition: utils.cpp:514
Eigen::Array< PetscScalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > pack_coefficients(const fem::Form &form)
Pack form coefficients ready for assembly.
Definition: utils.cpp:726
la::PETScMatrix create_matrix(const Form &a)
Create a matrix.
Definition: utils.cpp:194
Eigen::Array< PetscScalar, Eigen::Dynamic, 1 > pack_constants(const fem::Form &form)
Pack form constants ready for assembly.
Definition: utils.cpp:782
la::PETScMatrix create_matrix_block(const Eigen::Ref< const Eigen::Array< const fem::Form *, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >> &a)
Initialise monolithic matrix for an array for bilinear forms. Matrix is not zeroed.
Definition: utils.cpp:210
std::vector< std::pair< std::string, std::shared_ptr< const function::Constant > > > get_constants_from_ufc_form(const ufc_form &ufc_form)
Extract coefficients from a UFC form.
Definition: utils.cpp:559