Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80153350
equilibrium_stagger.hpp
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, 04:24
Size
5 KB
Mime Type
text/x-c++
Expires
Sun, Sep 1, 04:24 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20307399
Attached To
rSPECMICP SpecMiCP / ReactMiCP
equilibrium_stagger.hpp
View Options
/* =============================================================================
Copyright (c) 2014-2017 F. Georget <fabieng@princeton.edu> Princeton University
Copyright (c) 2017 F. Georget <fabien.georget@epfl.ch> EPFL
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
============================================================================= */
#ifndef REACTMICP_CHLORIDE_EQUILIBRIUMSTAGGER_HPP
#define REACTMICP_CHLORIDE_EQUILIBRIUMSTAGGER_HPP
#include "chem_stagger_base.hpp"
#include "specmicp_common/pimpl_ptr.hpp"
#include <vector>
namespace
specmicp
{
struct
AdimensionalSystemSolution
;
struct
AdimensionalSystemConstraints
;
struct
AdimensionalSystemSolverOptions
;
namespace
micpsolver
{
enum
class
MiCPSolverReturnCode
;
}
// namespace micpsolver
namespace
reactmicp
{
namespace
systems
{
class
EquilibriumOptionsVector
;
namespace
chloride
{
class
BoundaryConditions
;
class
SPECMICP_DLL_PUBLIC
ChlorideEquilibriumStagger:
public
ChlorideChemistryStaggerBase
{
public
:
using
VariablesBase
=
solver
::
VariablesBase
;
using
StaggerReturnCode
=
solver
::
StaggerReturnCode
;
ChlorideEquilibriumStagger
(
std
::
shared_ptr
<
ChlorideVariables
>
var
,
std
::
shared_ptr
<
BoundaryConditions
>
bcs
,
std
::
shared_ptr
<
EquilibriumOptionsVector
>
opts
);
static
std
::
shared_ptr
<
ChlorideEquilibriumStagger
>
make
(
std
::
shared_ptr
<
ChlorideVariables
>
var
,
std
::
shared_ptr
<
BoundaryConditions
>
bcs
,
std
::
shared_ptr
<
EquilibriumOptionsVector
>
opts
){
return
std
::
make_shared
<
ChlorideEquilibriumStagger
>
(
var
,
bcs
,
opts
);
}
~
ChlorideEquilibriumStagger
();
//! \brief Initialize the stagger at the beginning of the computation
//!
//! \param var a raw pointer to the variables
void
initialize
(
VariablesBase
*
const
var
)
override
;
//! \brief Initialize the stagger at the beginning of an iteration
//!
//! This is where the predictor can be saved, the first trivial iteration done, ...
//!
//! \param dt the duration of the timestep
//! \param var a raw pointer to the variables
void
initialize_timestep
(
scalar_t
dt
,
VariablesBase
*
const
var
)
override
;
//! \brief Solve the equation for the timestep
//!
//! \param var a raw ptr to the variables
solver
::
StaggerReturnCode
restart_timestep
(
VariablesBase
*
const
var
)
override
;
//! \brief Return the solution for one node // when given displacements
virtual
ReturnCode
solve_equilibrium_at_node
(
index_t
node
,
VariablesBase
*
const
var
,
AdimensionalSystemSolution
&
out
)
override
;
virtual
ReturnCode
perturb_adim_solution
(
index_t
node
,
ChlorideVariables
*
const
var
,
const
Eigen
::
Ref
<
const
Vector
>&
nodal_displacement
,
const
AdimensionalSystemSolution
&
previous
,
AdimensionalSystemSolution
&
out
)
override
;
// Options
//! \brief Clear preset options, and set new default options
void
clear_options
(
const
AdimensionalSystemSolverOptions
&
options
);
void
set_options
(
index_t
node
,
const
AdimensionalSystemSolverOptions
&
options
);
void
set_options
(
const
std
::
vector
<
index_t
>&
nodes
,
const
AdimensionalSystemSolverOptions
&
options
);
// Constraints
//! \brief Clear preset constraints, and set new default constraints
//void clear_constraints(const AdimensionalSystemConstraints& constraints);
//void set_constraints(index_t node, const AdimensionalSystemConstraints& constraints);
//void set_constraints(const std::vector<index_t>& nodes, const AdimensionalSystemConstraints& constraints);
private
:
struct
ChlorideEquilibriumStaggerImpl
;
utils
::
pimpl_ptr
<
ChlorideEquilibriumStaggerImpl
>
m_impl
;
};
}
// namespace chloride
}
// namespace systems
}
// namespace reactmicp
}
// namespace specmicp
#endif
// REACTMICP_CHLORIDE_EQUILIBRIUMSTAGGER_HPP
Event Timeline
Log In to Comment