Page MenuHomec4science

coupling.hh
No OneTemporary

File Metadata

Created
Wed, Oct 9, 20:26

coupling.hh

/**
* @file coupling.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Thu Nov 14 00:49:01 2013
*
* @brief Mother of all coupling classes
*
* @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_COUPLING_HH__
#define __LIBMULTISCALE_COUPLING_HH__
/* -------------------------------------------------------------------------- */
#include "container_array.hh"
#include "coupling_interface.hh"
#include "domain_interface.hh"
#include "shape_matrix.hh"
#include "spatial_grid_libmultiscale.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/** this class represent a low-level coupling zone. The Belytschko Method
for instance is based on it, as it can compute the ponderation of each DOFs,
association between atoms and elements and the shape values through the
smatrix object */
template <typename DomainA, typename DomainC, UInt Dim>
class Coupling : public CouplingInterface {
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
Coupling<DomainA, DomainC, Dim>(const std::string &name, DomainInterface &A,
DomainInterface &C)
: LMObject(name), domC(dynamic_cast<DomainC &>(C)),
domA(dynamic_cast<DomainA &>(A)), group_id_A(A.getCommGroup()),
group_id_B(C.getCommGroup()) {}
virtual ~Coupling() {}
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
//! reference to domain 1
DomainC &domC;
//! reference to domain 2
DomainA &domA;
protected:
//! group ID of DomainA
CommGroup &group_id_A;
//! group ID of DomainB
CommGroup &group_id_B;
};
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
#endif /* __LIBMULTISCALE_COUPLING_HH__ */

Event Timeline