Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80257489
dumper_generic_elemental_field_tmpl.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Aug 30, 18:15
Size
2 KB
Mime Type
text/x-c
Expires
Sun, Sep 1, 18:15 (2 d)
Engine
blob
Format
Raw Data
Handle
20326331
Attached To
rAKA akantu
dumper_generic_elemental_field_tmpl.hh
View Options
/**
* Copyright (©) 2014-2023 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* This file is part of Akantu
*
* Akantu is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* Akantu is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Akantu. If not, see <http://www.gnu.org/licenses/>.
*/
/* -------------------------------------------------------------------------- */
#include "dumper_generic_elemental_field.hh"
/* -------------------------------------------------------------------------- */
namespace akantu {
namespace dumpers {
/* ------------------------------------------------------------------------ */
template <class types, template <class> class iterator>
void GenericElementalField<types, iterator>::checkHomogeneity() {
auto types =
field.elementTypes(spatial_dimension, ghost_type, element_kind);
auto tit = types.begin();
auto end = types.end();
this->nb_total_element = 0;
Int nb_comp = 0;
bool homogen = true;
if (tit != end) {
nb_comp = this->field(*tit, ghost_type).getNbComponent();
for (; tit != end; ++tit) {
const auto & vect = this->field(*tit, ghost_type);
auto nb_element = vect.size();
auto nb_comp_cur = vect.getNbComponent();
if (homogen && nb_comp != nb_comp_cur) {
homogen = false;
}
this->nb_total_element += nb_element;
// this->nb_data_per_elem(*tit,this->ghost_type) = nb_comp_cur;
}
if (!homogen) {
nb_comp = 0;
}
}
this->homogeneous = homogen;
}
/* --------------------------------------------------------------------------
*/
} // namespace dumpers
} // namespace akantu
Event Timeline
Log In to Comment