Loading...
Searching...
No Matches
zero.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "linalg/operator.hpp"
5#include "linalg/vector.hpp"
7
9
10template < typename ScalarT >
11class Zero
12{
13 private:
14 linalg::OperatorApplyMode operator_apply_mode_;
15
16 public:
19 using ScalarType = ScalarT;
20
22 : operator_apply_mode_( operator_apply_mode ) {};
23
24 void apply_impl( const SrcVectorType& src, DstVectorType& dst )
25 {
26 if ( operator_apply_mode_ == linalg::OperatorApplyMode::Replace )
27 {
28 assign( dst, 0 );
29 }
30 }
31};
32
34
35} // namespace terra::fe::wedge::operators::shell
ScalarT ScalarType
Definition zero.hpp:19
Zero(linalg::OperatorApplyMode operator_apply_mode=linalg::OperatorApplyMode::Replace)
Definition zero.hpp:21
void apply_impl(const SrcVectorType &src, DstVectorType &dst)
Definition zero.hpp:24
Q1 scalar finite element vector on a distributed shell grid.
Definition vector_q1.hpp:21
Concept for types that behave like linear operators.
Definition operator.hpp:57
Definition boundary_mass.hpp:14
OperatorApplyMode
Modes for applying an operator to a vector.
Definition operator.hpp:30
@ Replace
Overwrite the destination vector.