[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Konstantinos Poulios |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Mon, 11 Jun 2018 10:20:14 -0400 (EDT) |
branch: master
commit 4d70d1d35df82a3cdceccaa52ac23a1bdc611275
Author: Konstantinos Poulios <address@hidden>
Date: Mon Jun 11 16:19:59 2018 +0200
Minor cosmetic changes
---
interface/src/gf_mesh_fem_set.cc | 52 ++++++++++++++++++------------------
src/bgeot_convex_ref_simplexified.cc | 4 +--
src/bgeot_poly_composite.cc | 6 ++---
src/getfem_integration.cc | 9 ++++---
4 files changed, 36 insertions(+), 35 deletions(-)
diff --git a/interface/src/gf_mesh_fem_set.cc b/interface/src/gf_mesh_fem_set.cc
index b758f95..d681ef1 100644
--- a/interface/src/gf_mesh_fem_set.cc
+++ b/interface/src/gf_mesh_fem_set.cc
@@ -63,7 +63,7 @@ static void set_fem(getfem::mesh_fem *mf,
getfemint::mexargs_in& in)
/* set the classical fem of order on the mesh_fem, with a classical integration
method */
static void set_classical_fem(getfem::mesh_fem *mf, getfemint::mexargs_in& in,
- bool discontinuous) {
+ bool discontinuous) {
dim_type K = dim_type(in.pop().to_integer(0,255));
scalar_type alpha = 0.0;
@@ -72,7 +72,7 @@ static void set_classical_fem(getfem::mesh_fem *mf,
getfemint::mexargs_in& in,
dal::bit_vector bv;
if (in.remaining()) {
bv = in.pop().to_bit_vector(&mf->linked_mesh().convex_index(),
- -config::base_index());
+ -config::base_index());
if (!discontinuous) {
mf->set_classical_finite_element(bv, K);
} else {
@@ -100,8 +100,8 @@ static void set_classical_fem(getfem::mesh_fem *mf,
getfemint::mexargs_in& in,
struct sub_gf_mf_set : virtual public dal::static_stored_object {
int arg_in_min, arg_in_max, arg_out_min, arg_out_max;
virtual void run(getfemint::mexargs_in& in,
- getfemint::mexargs_out& out,
- getfem::mesh_fem *mf) = 0;
+ getfemint::mexargs_out& out,
+ getfem::mesh_fem *mf) = 0;
};
typedef std::shared_ptr<sub_gf_mf_set> psub_command;
@@ -110,22 +110,22 @@ typedef std::shared_ptr<sub_gf_mf_set> psub_command;
template <typename T> static inline void dummy_func(T &) {}
#define sub_command(name, arginmin, arginmax, argoutmin, argoutmax, code) { \
- struct subc : public sub_gf_mf_set { \
- virtual void run(getfemint::mexargs_in& in, \
- getfemint::mexargs_out& out, \
- getfem::mesh_fem *mf) \
- { dummy_func(in); dummy_func(out); code }
\
- }; \
- psub_command psubc = std::make_shared<subc>(); \
- psubc->arg_in_min = arginmin; psubc->arg_in_max = arginmax;
\
- psubc->arg_out_min = argoutmin; psubc->arg_out_max = argoutmax; \
- subc_tab[cmd_normalize(name)] = psubc; \
+ struct subc : public sub_gf_mf_set { \
+ virtual void run(getfemint::mexargs_in& in, \
+ getfemint::mexargs_out& out, \
+ getfem::mesh_fem *mf) \
+ { dummy_func(in); dummy_func(out); code } \
+ }; \
+ psub_command psubc = std::make_shared<subc>(); \
+ psubc->arg_in_min = arginmin; psubc->arg_in_max = arginmax; \
+ psubc->arg_out_min = argoutmin; psubc->arg_out_max = argoutmax; \
+ subc_tab[cmd_normalize(name)] = psubc; \
}
void gf_mesh_fem_set(getfemint::mexargs_in& m_in,
- getfemint::mexargs_out& m_out) {
+ getfemint::mexargs_out& m_out) {
typedef std::map<std::string, psub_command > SUBC_TAB;
static SUBC_TAB subc_tab;
@@ -188,18 +188,18 @@ void gf_mesh_fem_set(getfemint::mexargs_in& m_in,
std::shared_ptr<gsparse> R = in.pop().to_sparse();
std::shared_ptr<gsparse> E = in.pop().to_sparse();
if (R->is_complex() || E->is_complex())
- THROW_BADARG("Reduction and extension matrices should be real
matrices");
+ THROW_BADARG("Reduction and extension matrices should be real
matrices");
if (R->storage()==gsparse::CSCMAT && E->storage()==gsparse::CSCMAT)
- mf->set_reduction_matrices(R->real_csc(), E->real_csc());
+ mf->set_reduction_matrices(R->real_csc(), E->real_csc());
else if (R->storage()==gsparse::CSCMAT && E->storage()==gsparse::WSCMAT)
- mf->set_reduction_matrices(R->real_csc(), E->real_wsc());
+ mf->set_reduction_matrices(R->real_csc(), E->real_wsc());
else if (R->storage()==gsparse::WSCMAT && E->storage()==gsparse::CSCMAT)
- mf->set_reduction_matrices(R->real_wsc(), E->real_csc());
+ mf->set_reduction_matrices(R->real_wsc(), E->real_csc());
else if (R->storage()==gsparse::WSCMAT && E->storage()==gsparse::WSCMAT)
- mf->set_reduction_matrices(R->real_wsc(), E->real_wsc());
+ mf->set_reduction_matrices(R->real_wsc(), E->real_wsc());
else
- THROW_BADARG("Reduction and extension matrices should be "
- "sparse matrices");
+ THROW_BADARG("Reduction and extension matrices should be "
+ "sparse matrices");
);
@@ -236,7 +236,7 @@ void gf_mesh_fem_set(getfemint::mexargs_in& m_in,
iarray v =
in.pop().to_iarray(int(mf->linked_mesh().convex_index().last_true()+1));
for (unsigned i=0; i < v.size(); ++i)
- mf->set_dof_partition(i, v[i]);
+ mf->set_dof_partition(i, v[i]);
);
@@ -255,7 +255,7 @@ void gf_mesh_fem_set(getfemint::mexargs_in& m_in,
getfem::partial_mesh_fem *ppmf
= dynamic_cast<getfem::partial_mesh_fem *>(mf);
if (!ppmf) THROW_BADARG("The command 'set partial' can only be "
- "applied to a partial mesh_fem object");
+ "applied to a partial mesh_fem object");
ppmf->adapt(doflst, rcvlst);
);
@@ -297,8 +297,8 @@ void gf_mesh_fem_set(getfemint::mexargs_in& m_in,
SUBC_TAB::iterator it = subc_tab.find(cmd);
if (it != subc_tab.end()) {
check_cmd(cmd, it->first.c_str(), m_in, m_out, it->second->arg_in_min,
- it->second->arg_in_max, it->second->arg_out_min,
- it->second->arg_out_max);
+ it->second->arg_in_max, it->second->arg_out_min,
+ it->second->arg_out_max);
it->second->run(m_in, m_out, mf);
}
else bad_cmd(init_cmd);
diff --git a/src/bgeot_convex_ref_simplexified.cc
b/src/bgeot_convex_ref_simplexified.cc
index 5a8b175..4b1bc35 100644
--- a/src/bgeot_convex_ref_simplexified.cc
+++ b/src/bgeot_convex_ref_simplexified.cc
@@ -258,8 +258,8 @@ namespace bgeot {
static size_type simplexified_pyramid_nb = 2;
- size_type simplexified_tab(pconvex_structure cvs,
- size_type **tab) {
+ size_type simplexified_tab(pconvex_structure cvs, size_type **tab) {
+
if (cvs == parallelepiped_structure(2)) {
*tab = simplexified_parallelepiped_2;
return simplexified_parallelepiped_2_nb;
diff --git a/src/bgeot_poly_composite.cc b/src/bgeot_poly_composite.cc
index cf96621..1d907d0 100644
--- a/src/bgeot_poly_composite.cc
+++ b/src/bgeot_poly_composite.cc
@@ -384,7 +384,7 @@ namespace bgeot {
} else if (nbp == (size_type(1) << n) &&
basic_structure(cvs) == parallelepiped_structure(n)) {
structured_mesh_for_parallelepiped_(cvs,opt_gt,opt_gt_pts,k,pm);
- } else if (nbp == size_type(2 * n) &&
+ } else if (nbp == size_type(2 * n) &&
basic_structure(cvs) == prism_P1_structure(n)) {
GMM_ASSERT1(false, "Sorry, structured_mesh not implemented for
prisms.");
} else {
@@ -486,8 +486,8 @@ namespace bgeot {
pgeometric_trans sgt
= simplex_geotrans(cvr->structure()->dim(), 1);
for (size_type j=0; j < cvpts.size(); ++j) {
- cvpts[j] = basic_convex_ref(cvr)->points()
- [splx_mesh->ind_points_of_convex(ic)[j]];
+ size_type ip = splx_mesh->ind_points_of_convex(ic)[j];
+ cvpts[j] = basic_convex_ref(cvr)->points()[ip];
//cerr << "cvpts[" << j << "]=" << cvpts[j] << endl;
}
structured_mesh_for_convex_(splx_mesh->structure_of_convex(ic),
diff --git a/src/getfem_integration.cc b/src/getfem_integration.cc
index 7643d5a..437f816 100644
--- a/src/getfem_integration.cc
+++ b/src/getfem_integration.cc
@@ -1256,15 +1256,16 @@ namespace getfem {
"for simplexes of dimension " << n);
}
for (size_type k = degree; k < size_type(degree+10); ++k) {
- pintegration_method im = 0;
- std::stringstream name2; name2 << name.str() << "(" << k << ")";
- im = int_method_descriptor(name2.str(), false);
+ std::stringstream name2;
+ name2 << name.str() << "(" << k << ")";
+ pintegration_method im = int_method_descriptor(name2.str(), false);
if (im) return im;
}
GMM_ASSERT1(false, "could not find an " << name.str()
<< " of degree >= " << int(degree));
} else if (cvs->is_product(&a,&b) ||
- (bgeot::basic_structure(cvs).get() &&
bgeot::basic_structure(cvs)->is_product(&a,&b))) {
+ (bgeot::basic_structure(cvs).get() &&
+ bgeot::basic_structure(cvs)->is_product(&a,&b))) {
name << "IM_PRODUCT("
<< name_of_int_method(classical_approx_im_(a,degree)) << ","
<< name_of_int_method(classical_approx_im_(b,degree)) << ")";