Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
7aac11e5
Commit
7aac11e5
authored
10 months ago
by
Emmanuel Labourasse
Browse files
Options
Downloads
Patches
Plain Diff
new mesh management
parent
637eed8c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/HyperplasticSolver.cpp
+10
-10
10 additions, 10 deletions
src/scheme/HyperplasticSolver.cpp
with
10 additions
and
10 deletions
src/scheme/HyperplasticSolver.cpp
+
10
−
10
View file @
7aac11e5
...
@@ -469,8 +469,8 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
...
@@ -469,8 +469,8 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
const
std
::
shared_ptr
<
const
DiscreteFunctionVariant
>&
sigma_v
,
const
std
::
shared_ptr
<
const
DiscreteFunctionVariant
>&
sigma_v
,
const
std
::
vector
<
std
::
shared_ptr
<
const
IBoundaryConditionDescriptor
>>&
bc_descriptor_list
)
const
const
std
::
vector
<
std
::
shared_ptr
<
const
IBoundaryConditionDescriptor
>>&
bc_descriptor_list
)
const
{
{
std
::
shared_ptr
i_
mesh
=
getCommonMesh
({
rho_v
,
aL_v
,
aT_v
,
u_v
,
sigma_v
});
std
::
shared_ptr
mesh
_v
=
getCommonMesh
({
rho_v
,
aL_v
,
aT_v
,
u_v
,
sigma_v
});
if
(
not
i_
mesh
)
{
if
(
not
mesh
_v
)
{
throw
NormalError
(
"discrete functions are not defined on the same mesh"
);
throw
NormalError
(
"discrete functions are not defined on the same mesh"
);
}
}
...
@@ -478,7 +478,7 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
...
@@ -478,7 +478,7 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
throw
NormalError
(
"hyperplastic solver expects P0 functions"
);
throw
NormalError
(
"hyperplastic solver expects P0 functions"
);
}
}
const
MeshType
&
mesh
=
*
i_
mesh
->
get
<
MeshType
>
();
const
MeshType
&
mesh
=
*
mesh
_v
->
get
<
MeshType
>
();
const
DiscreteScalarFunction
&
rho
=
rho_v
->
get
<
DiscreteScalarFunction
>
();
const
DiscreteScalarFunction
&
rho
=
rho_v
->
get
<
DiscreteScalarFunction
>
();
const
DiscreteVectorFunction
&
u
=
u_v
->
get
<
DiscreteVectorFunction
>
();
const
DiscreteVectorFunction
&
u
=
u_v
->
get
<
DiscreteVectorFunction
>
();
const
DiscreteScalarFunction
&
aL
=
aL_v
->
get
<
DiscreteScalarFunction
>
();
const
DiscreteScalarFunction
&
aL
=
aL_v
->
get
<
DiscreteScalarFunction
>
();
...
@@ -491,7 +491,7 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
...
@@ -491,7 +491,7 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
parallel_for
(
parallel_for
(
mesh
.
numberOfCells
(),
PUGS_LAMBDA
(
CellId
j
)
{
tensor_values3d
[
j
]
=
sigma3d
[
j
];
});
mesh
.
numberOfCells
(),
PUGS_LAMBDA
(
CellId
j
)
{
tensor_values3d
[
j
]
=
sigma3d
[
j
];
});
CellValue
<
const
Rdxd
>
tensor_values
=
toDimension
(
mesh
,
tensor_values3d
);
CellValue
<
const
Rdxd
>
tensor_values
=
toDimension
(
mesh
,
tensor_values3d
);
DiscreteTensorFunction
sigma
(
i_
mesh
,
tensor_values
);
DiscreteTensorFunction
sigma
(
mesh
_v
,
tensor_values
);
NodeValuePerCell
<
const
Rdxd
>
Ajr
=
this
->
_computeAjr
(
solver_type
,
mesh
,
rho
*
aL
,
rho
*
aT
);
NodeValuePerCell
<
const
Rdxd
>
Ajr
=
this
->
_computeAjr
(
solver_type
,
mesh
,
rho
*
aL
,
rho
*
aT
);
...
@@ -595,8 +595,8 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
...
@@ -595,8 +595,8 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur
,
const
std
::
shared_ptr
<
const
ItemValueVariant
>&
ur
,
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>&
Fjr
)
const
const
std
::
shared_ptr
<
const
SubItemValuePerItemVariant
>&
Fjr
)
const
{
{
std
::
shared_ptr
i_
mesh
=
getCommonMesh
({
rho
,
u
,
E
});
std
::
shared_ptr
mesh
_v
=
getCommonMesh
({
rho
,
u
,
E
});
if
(
not
i_
mesh
)
{
if
(
not
mesh
_v
)
{
throw
NormalError
(
"discrete functions are not defined on the same mesh"
);
throw
NormalError
(
"discrete functions are not defined on the same mesh"
);
}
}
...
@@ -605,7 +605,7 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
...
@@ -605,7 +605,7 @@ class HyperplasticSolverHandler::HyperplasticSolver final : public HyperplasticS
}
}
return
this
->
apply_fluxes
(
dt
,
//
return
this
->
apply_fluxes
(
dt
,
//
*
i_
mesh
->
get
<
MeshType
>
(),
//
*
mesh
_v
->
get
<
MeshType
>
(),
//
rho
->
get
<
DiscreteScalarFunction
>
(),
//
rho
->
get
<
DiscreteScalarFunction
>
(),
//
u
->
get
<
DiscreteVectorFunction
>
(),
//
u
->
get
<
DiscreteVectorFunction
>
(),
//
E
->
get
<
DiscreteScalarFunction
>
(),
//
E
->
get
<
DiscreteScalarFunction
>
(),
//
...
@@ -1029,9 +1029,9 @@ class HyperplasticSolverHandler::HyperplasticSolver<MeshType>::SymmetryBoundaryC
...
@@ -1029,9 +1029,9 @@ class HyperplasticSolverHandler::HyperplasticSolver<MeshType>::SymmetryBoundaryC
~
SymmetryBoundaryCondition
()
=
default
;
~
SymmetryBoundaryCondition
()
=
default
;
};
};
HyperplasticSolverHandler
::
HyperplasticSolverHandler
(
const
std
::
shared_ptr
<
const
MeshVariant
>&
i_
mesh
)
HyperplasticSolverHandler
::
HyperplasticSolverHandler
(
const
std
::
shared_ptr
<
const
MeshVariant
>&
mesh
_v
)
{
{
if
(
not
i_
mesh
)
{
if
(
not
mesh
_v
)
{
throw
NormalError
(
"discrete functions are not defined on the same mesh"
);
throw
NormalError
(
"discrete functions are not defined on the same mesh"
);
}
}
...
@@ -1044,5 +1044,5 @@ HyperplasticSolverHandler::HyperplasticSolverHandler(const std::shared_ptr<const
...
@@ -1044,5 +1044,5 @@ HyperplasticSolverHandler::HyperplasticSolverHandler(const std::shared_ptr<const
throw
NormalError
(
"unexpected mesh type"
);
throw
NormalError
(
"unexpected mesh type"
);
}
}
},
},
i_
mesh
->
variant
());
mesh
_v
->
variant
());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment