Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121710481
variables.cpp
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
Sun, Jul 13, 08:58
Size
858 B
Mime Type
text/x-c
Expires
Tue, Jul 15, 08:58 (2 d)
Engine
blob
Format
Raw Data
Handle
27378225
Attached To
rSPECMICP SpecMiCP / ReactMiCP
variables.cpp
View Options
#include "variables.hpp"
#include "dfpm/meshes/mesh1d.hpp"
namespace
specmicp
{
namespace
reactmicp
{
namespace
systems
{
namespace
satdiff
{
SaturatedVariables
::
SaturatedVariables
(
mesh
::
Mesh1DPtr
the_mesh
,
RawDatabasePtr
the_database
)
:
m_mesh
(
the_mesh
),
m_database
(
the_database
)
{}
Vector
SaturatedVariables
::
total_concentrations
(
index_t
node
)
{
Vector
total_conc
=
porosity
(
node
)
*
displacement
().
segment
(
offset_aqueous_concentration
(
node
),
nb_component
())
+
displacement
().
segment
(
offset_solid_concentration
(
node
),
nb_component
());
for
(
index_t
r
=
0
;
r
<
total_conc
.
rows
();
++
r
)
{
if
(
std
::
abs
(
total_conc
(
r
))
<
1e-10
)
total_conc
(
r
)
=
0.0
;
}
return
total_conc
;
}
}
// end namespace satdiff
}
// end namespace systems
}
// end namespace reactmicp
}
// end namespace specmicp
Event Timeline
Log In to Comment