1 #ifndef __POISSON2DNONHOMOGENEOUS_HPP__
2 #define __POISSON2DNONHOMOGENEOUS_HPP__
19 typedef boost::function<
double(
const double,
const double,
const double)>
24 OpDomainLhs(std::string row_field_name, std::string col_field_name)
30 EntityType col_type,
EntData &row_data,
34 const int nb_row_dofs = row_data.
getIndices().size();
35 const int nb_col_dofs = col_data.
getIndices().size();
37 if (nb_row_dofs && nb_col_dofs) {
39 locLhs.resize(nb_row_dofs, nb_col_dofs,
false);
46 const int nb_integration_points =
getGaussPts().size2();
54 for (
int gg = 0; gg != nb_integration_points; gg++) {
56 const double a = t_w * area;
58 for (
int rr = 0; rr != nb_row_dofs; ++rr) {
62 for (
int cc = 0; cc != nb_col_dofs; cc++) {
64 locLhs(rr, cc) += t_row_diff_base(
i) * t_col_diff_base(
i) *
a;
81 CHKERR MatSetValues<MoFEM::EssentialBcStorage>(
85 if (row_side != col_side || row_type != col_type) {
86 transLocLhs.resize(nb_col_dofs, nb_row_dofs,
false);
88 CHKERR MatSetValues<MoFEM::EssentialBcStorage>(
116 locRhs.resize(nb_dofs,
false);
123 const int nb_integration_points =
getGaussPts().size2();
133 for (
int gg = 0; gg != nb_integration_points; gg++) {
135 const double a = t_w * area;
139 for (
int rr = 0; rr != nb_dofs; rr++) {
154 CHKERR VecSetValues<MoFEM::EssentialBcStorage>(
176 EntityType col_type,
EntData &row_data,
180 const int nb_row_dofs = row_data.
getIndices().size();
181 const int nb_col_dofs = col_data.
getIndices().size();
183 if (nb_row_dofs && nb_col_dofs) {
192 const int nb_integration_points =
getGaussPts().size2();
200 for (
int gg = 0; gg != nb_integration_points; gg++) {
201 const double a = t_w * edge;
203 for (
int rr = 0; rr != nb_row_dofs; ++rr) {
207 for (
int cc = 0; cc != nb_col_dofs; cc++) {
223 CHKERR MatSetValues<MoFEM::EssentialBcStorage>(
225 if (row_side != col_side || row_type != col_type) {
228 CHKERR MatSetValues<MoFEM::EssentialBcStorage>(
263 const int nb_integration_points =
getGaussPts().size2();
273 for (
int gg = 0; gg != nb_integration_points; gg++) {
275 const double a = t_w * edge;
276 double boundary_term =
279 for (
int rr = 0; rr != nb_dofs; rr++) {
294 CHKERR VecSetValues<MoFEM::EssentialBcStorage>(
308 #endif //__POISSON2DNONHOMOGENEOUS_HPP__