Domains
A domain in Cthonios is a group of element sections and all the associated datastructures necessary to run a finite element calculation. Different types of domains are used for different problems, e.g. quasi-static vs. dynamics problems have different requirements and solution strategies.
Input file syntax example
domains:
domain_1:
mesh:
...
boundary conditions:
...
sections:
...
time stepper:
...
Quasi-static Domain
Quasi-static domains are appropriate for problems where the following equation holds
$\nabla\cdot \mathbf{P} + \mathbf{b} = \mathbf{0},$ where $\mathbf{P}$ is the first Piola-Kirchoff stress, $\nabla$ is the gradient operator with respsect to the reference corrdinates, and $\mathbf{b}$ is a body force.
Index
Cthonios.AbstractDomain
— Typeabstract type AbstractDomain
Abstract base type for domains.
Cthonios.Domain
— Typestruct Domain{M, D, S, DBCs, DDofs} <: Cthonios.AbstractDomain
mesh::Any
dof::Any
sections::Any
dirichlet_bcs::Any
dirichlet_dofs::Any
Domain type to hold information like bcs, sections, etc. Note that the DofManager
unknown dofs are not automatically set. After setting up a Domain
you will need to run, update_unknown_dofs!
.
mesh
- Handle to an open FileMesh
. dof
- DofManager
object. sections
- A set of SectionInternal
s. dirichlet_bcs
- A set of DirichletBCInternal
s. dirichlet_dofs
- A set of dofs to apply dirichlet dofs. This is mainly for book-keeping purposes
Cthonios.Domain
— MethodDomain(
mesh_file::String,
sections_in,
dbcs_in,
n_dofs::Int64
) -> Domain{M, D, S, _A, Vector{Int64}} where {M<:(FiniteElementContainers.FileMesh{Exodus.ExodusDatabase{M, I, B, F, Init}} where {M, I, B, F, Init}), D<:(FiniteElementContainers.DofManager{Int64, _A, _B, Vector{Float64}, _C} where {_A, _B, _C<:(AbstractArray{Int64})}), S<:NamedTuple, _A}
Constructor for a Domain
type. mesh_file
- File name of a mesh to read. sections_in
- A set of Section
s. dbcs_in
- A set of DirichletBC
s. n_dofs
- The number of dofs in the problem.
Cthonios.StaticAssembler
— MethodStaticAssembler(
domain::Domain
) -> FiniteElementContainers.StaticAssembler{Float64, Int64, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, Vector{Int64}, Vector{Int64}, Vector{Float64}} where {_A<:AbstractVector{Int64}, _B<:AbstractVector{Int64}, _C<:AbstractVector{Int64}, _D<:AbstractVector{Int64}, _E<:AbstractVector{Int64}, _F<:FiniteElementContainers.NodalField, _G<:AbstractVector{Float64}, _H, _I, _J, _K}
some FEMContainers abuse
Cthonios.create_fields
— Methodcreate_fields(domain::Domain) -> Any
Create a zero field based on domain.dof
.
Cthonios.create_unknowns
— Methodcreate_unknowns(domain::Domain) -> Any
Creates an unknown vector based on domain.dof
Cthonios.dirichlet_dofs
— Methoddirichlet_dofs(domain::Domain) -> Any
Returns a sorted and unique vector of dirichlet dofs.
Cthonios.update_dirichlet_vals!
— Methodupdate_dirichlet_vals!(Ubc, domain::Domain, X, t)
Updates the values in Ubc with dirichlet boundary conditions in domain
. Ubc
- BC values to fill. domain
- Domain. X
- Nodal coordinates. t
- A scalar time value to use in the BC functions.
Cthonios.update_field_bcs!
— Methodupdate_field_bcs!(U, domain::Domain, Ubc)
Updates the Dirichlet BC dofs in U
with the values in Ubc
. U
- Nodal field to update. domain
- Domain. Ubc
- BC values to fill.
Cthonios.update_field_unknowns!
— Methodupdate_field_unknowns!(U, domain::Domain, Uu)
Updates the unknown dofs in U
with the values in Uu
. U
- Nodal field to update. domain
- Domain. Uu
- Unknown values to fill.
Cthonios.update_unknown_dofs!
— Methodupdate_unknown_dofs!(domain::Domain, asm)
Update the unknown dofs in domain.dof
, domain.dirichlet_dofs
, and asm
. TODO maybe move domain.dirichlet_dofs
to the
$DofManager$in
$FiniteElementContainers$.
$domain$- Domain object.
$asm$` - Assembly object.
Cthonios.update_unknown_dofs!
— Methodupdate_unknown_dofs!(domain::Domain)
Update the unknown dofs in domain.dof
and domain.dirichlet_dofs
. TODO maybe move domain.dirichlet_dofs
to the
$DofManager$in
$FiniteElementContainers$`.