18 #ifndef __POINT_SOURCE_H 19 #define __POINT_SOURCE_H 24 #include <dolfin/geometry/Point.h> 50 double magnitude=1.0);
54 const std::vector<std::pair<const Point*, double>> sources);
57 PointSource(std::shared_ptr<const FunctionSpace> V0,
58 std::shared_ptr<const FunctionSpace> V1,
60 double magnitude=1.0);
63 PointSource(std::shared_ptr<const FunctionSpace> V0,
64 std::shared_ptr<const FunctionSpace> V1,
65 const std::vector<std::pair<const Point*, double>> sources);
80 void distribute_sources(
const Mesh& mesh,
81 const std::vector<std::pair<Point, double>>& sources);
87 std::shared_ptr<const FunctionSpace> _function_space0;
88 std::shared_ptr<const FunctionSpace> _function_space1;
91 std::vector<std::pair<Point, double>> _sources;
Definition: PointSource.h:44
void apply(GenericVector &b)
Apply (add) point source to right-hand side vector.
Definition: PointSource.cpp:206
Definition: FunctionSpace.h:53
~PointSource()
Destructor.
Definition: PointSource.cpp:116
PointSource(std::shared_ptr< const FunctionSpace > V, const Point &p, double magnitude=1.0)
Create point source at given point of given magnitude.
Definition: PointSource.cpp:37
This class defines a common interface for matrices.
Definition: GenericMatrix.h:46
This class defines a common interface for vectors.
Definition: GenericVector.h:47