Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91123286
bridging_atomic_continuum.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, Nov 8, 03:51
Size
3 KB
Mime Type
text/x-c++
Expires
Sun, Nov 10, 03:51 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22194124
Attached To
rLIBMULTISCALE LibMultiScale
bridging_atomic_continuum.hh
View Options
/**
* @file bridging_atomic_continuum.hh
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
*
* @date Thu Oct 03 16:50:49 2013
*
* @brief Bridging object between atomistic and finite elements
*
* @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 BRIDGING_ATOMIC_CONTINUUM_H
#define BRIDGING_ATOMIC_CONTINUUM_H
/* -------------------------------------------------------------------------- */
#include "bridging.hh"
#include "lib_continuum.hh"
#include "lib_md.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
/** TODO: review doc */
class
BridgingAtomicContinuum
:
public
Bridging
{
//****************************************************************
// non templated functions
//****************************************************************
public
:
BridgingAtomicContinuum
(
const
std
::
string
&
name
);
virtual
~
BridgingAtomicContinuum
();
void
projectAtomicFieldOnMesh
(
FieldType
field
);
void
projectAtomicFieldOnMesh
(
FieldType
field
,
ContainerArray
<
Real
>
&
array
);
//! sync migrated data with atoms
void
updateForMigration
()
override
;
protected
:
private
:
//! average atomic velocities per elements
// virtual void averageDOFsOnElements(ContainerArray<Real> &data_mesh,
// FieldType field);
//! Perform a leastsquare on a set of atoms returning and nodal array
void
leastSquareAtomicDOFs
(
ContainerArray
<
Real
>
&
data_mesh
,
FieldType
field
);
//! Perform a leastsquare on a set of atoms returning and nodal array
void
leastSquareAtomicData
(
ContainerArray
<
Real
>
&
data_mesh
,
ContainerArray
<
Real
>
&
data_atom
);
//! build atomic DOFs vector noise (u-sum_I \varphi_I u_I)
void
buildAtomicDOFsNoiseVector
(
std
::
vector
<
Real
>
&
v_out
,
FieldType
field
);
//! checks migration did not affect positions
void
checkPositionCoherency
();
//****************************************************************
// templated functions
//****************************************************************
public
:
DECORATE_FUNCTION_DISPATCH
(
init
,
domMD
,
domCONTINUUM
)
//! generic initializing function
template
<
typename
DomainA
,
typename
DomainC
>
void
init
(
DomainA
&
contA
,
DomainC
&
contC
);
protected
:
//! checks coherency of DOFs redistribution based on atomic positions
template
<
typename
DomainA
,
typename
DomainC
>
void
checkPositionCoherency
(
DomainA
&
domA
,
DomainC
&
domC
);
//! search a given atom by coordinates
template
<
typename
Cont
,
typename
Vec
>
void
searchAtomInLocalPool
(
Cont
&
container
,
Vec
&
X
);
protected
:
//! group ID of the continuum side
CommGroup
&
comm_group_continuum
;
//! group IF of the atomic side
CommGroup
&
comm_group_atomic
;
};
__END_LIBMULTISCALE__
/* -------------------------------------------------------------------------- */
#endif
// BRIDGING
Event Timeline
Log In to Comment