|
BSpline Finite Element Exterior Calculus
|
The object that represents linear constraints imposed on the coefficients of an m-form. More...
Public Member Functions | |
| procedure | init (this, space, mode) |
| The projection matrix (if mode == CONSTRAINT_PROJECTION) or the extraction matrix (if mode == CONSTRAINT_EXTRACTION) | |
| procedure | insert (this, local_constraint, coord_transform) |
| Insert a local constraint into the MFormConstraint object. | |
| procedure | assemble (this) |
| Assemble the MFormConstraint object (i.e., assemble the PETSc matrix) | |
| procedure | destroy (this) |
| Destroy the MFormConstraint object. | |
Public Attributes | |
| type(mformspace) | space |
| The m-form space to which the constraint applies. | |
| integer | mode |
| The mode of the constraint, either CONSTRAINT_PROJECTION or CONSTRAINT_EXTRACTION. | |
| logical | is_symmetric |
| Whether the constraint is symmetric (i.e., the projection matrix is symmetric) | |
| logical | is_assembled |
| Whether the constraint has been assembled. | |
| type(constraintlocalholder), dimension(max_nr_constraints) | constraints |
| The local constraints that are imposed on the m-form space. | |
| integer | nr_constraints |
| The number of constraints that have been inserted (less than or equal to MAX_NR_CONSTRAINTS) | |
| integer | nr_cols |
| The number of columns in the projection/extraction matrix. | |
| integer | my_nr_cols |
| The number of columns in the projection/extraction matrix on this rank. | |
| logical, dimension(0:max_nr_constraints) | unknowns_are_on_this_rank |
| Whether the unknowns corresponding to each constraint are present on this rank. | |
| integer, dimension(:), allocatable | total_local_nz_per_row |
| The total number of nonzeros per row in the projection/extraction matrix P. | |
| integer, dimension(:), allocatable | total_nonlocal_nz_per_row |
| The total number of nonzeros per row in the projection/extraction matrix P (off rank part) | |
| integer, dimension(:), allocatable | total_local_nz_per_row_perp |
| The total number of nonzeros per row in the perpendicular projection matrix I - P. | |
| integer, dimension(:), allocatable | col_type |
| The type of the column, 0 means no constraint, > 0 means corresponding to constraints(col_type) | |
| integer, dimension(:), allocatable | col_mapping |
| The mapping from the original matrix indices to the new matrix indices (this is non-trivial if mode==CONSTRAINT_EXTRACTION) | |
| type(tensorprodindexlist), dimension(:), allocatable | resp_inds |
| The responsible tensor product indices of the coefficients that are kept in the projection/extraction matrix (this is non-trivial if mode==CONSTRAINT_EXTRACTION) | |
The object that represents linear constraints imposed on the coefficients of an m-form.
| procedure m_mform_constraint_global::mformconstraint::assemble | ( | class(mformconstraint), intent(inout) | this | ) |
Assemble the MFormConstraint object (i.e., assemble the PETSc matrix)
| [in,out] | this | The MFormConstraint object to assemble |
| procedure m_mform_constraint_global::mformconstraint::destroy | ( | class(mformconstraint), intent(inout) | this | ) |
Destroy the MFormConstraint object.
| [in,out] | this | The MFormConstraint object to destroy |
| procedure m_mform_constraint_global::mformconstraint::init | ( | class(mformconstraint), intent(inout) | this, |
| type(mformspace), intent(in) | space, | ||
| character(*), intent(in), optional | mode ) |
The projection matrix (if mode == CONSTRAINT_PROJECTION) or the extraction matrix (if mode == CONSTRAINT_EXTRACTION)
The perpendicular projection matrix (I - P) (if mode == CONSTRAINT_PROJECTION) The mass matrix that is used to compute the constrained operator
| procedure m_mform_constraint_global::mformconstraint::insert | ( | class(mformconstraint), intent(inout) | this, |
| class(mformconstraintlocal), intent(in) | local_constraint, | ||
| class(coordtransformabstract), intent(in), optional | coord_transform ) |
Insert a local constraint into the MFormConstraint object.
This subroutine does not actually insert the constraint into the projection matrix yet, but keeps a pointer to the constraint. This is because the PETSc matrix assembly is more efficient if all of the nonzeros per row are known before inserting the values, thus requiring us to first compute the number of nonzeros per row for all constraints, and then actually insert the values into the PETSc matrix.
| [in,out] | this | The MFormConstraint object in which the local constraint is inserted |
| [in] | local_constraint | The local constraint to insert |
| [in] | coord_transform | _(optional)_ The coordinate transformation associated with the m-form space |