Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92373266
dumper_grid.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
Tue, Nov 19, 19:09
Size
3 KB
Mime Type
text/x-c++
Expires
Thu, Nov 21, 19:09 (2 d)
Engine
blob
Format
Raw Data
Handle
22430392
Attached To
rLIBMULTISCALE LibMultiScale
dumper_grid.hh
View Options
/**
* @file dumper_grid.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
* @author Till Junge <till.junge@epfl.ch>
*
* @date Mon Nov 25 15:05:56 2013
*
* @brief This dumper allows to use a grid so as to reduce on a per-cell basis
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* LibMultiScale 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.
*
* LibMultiScale 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 LibMultiScale. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __LIBMULTISCALE_DUMPER_GRID_HH__
#define __LIBMULTISCALE_DUMPER_GRID_HH__
/* -------------------------------------------------------------------------- */
#include "dumper.hh"
#include "spatial_grid_libmultiscale.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/** Class DumperGrid
* Implementation of a dumper to pcontact vtu files
*/
template <typename _Input> class DumperGrid : public Dumper<_Input> {
public:
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
DumperGrid(const std::string &name, ComponentLMInterface &d)
: Dumper<_Input>(name, d) {
current_flag = 0;
for (UInt i = 0; i < 3; ++i)
gridspace[i] = -1.;
for (UInt i = 0; i < 3; ++i)
griddivision[i] = UINT_MAX;
op = OP_AVERAGE;
grid = NULL;
};
~DumperGrid(){};
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
void dump(_Input &cont);
//! fill the grid function
template <FieldType type> void FillGrid(_Input &cont);
//! initialisation of the dumper (do nothing)
void init(){};
//! set the parameters to dumper
void declareParams();
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
protected:
//! typedef to the grid
typedef SpatialGridLibMultiScale<Tensor, _Input::Dim> MyGrid;
MyGrid *grid;
private:
Quantity<Length, 3> gridspace;
Vector<3, UInt> griddivision;
FieldType field;
bool current_flag;
Operator op;
//! lagrangian min value for the atoms
Real xmin[3];
//! lagrangian max value for the atoms
Real xmax[3];
};
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
#endif /* __LIBMULTISCALE_DUMPER_GRID_HH__ */
Event Timeline
Log In to Comment