Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
r2ogs6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
OpenGeoSys Tools
r2ogs6
Commits
8b25d402
Commit
8b25d402
authored
4 years ago
by
Ruben Heinrich
Browse files
Options
Downloads
Patches
Plain Diff
[base] Added a class for meshes (WIP)
parent
e3a64316
No related branches found
No related tags found
4 merge requests
!5
7 vtkdiff
,
!4
7 parameter
,
!3
7 process borehole heat exchanger
,
!2
Basic import and export functionality
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/vtu.R
+31
-1
31 additions, 1 deletion
R/vtu.R
with
31 additions
and
1 deletion
R/vtu.R
+
31
−
1
View file @
8b25d402
# Functions for adding .vtu data to a OGS6 simulation object
#'r2ogs6_mesh
#'@description Wrapper class, so far only has a reference to a .vtu file
#'@param mesh_ref A reference to a .vtu file
#'@export
r2ogs6_mesh
<-
function
(
mesh_ref
){
new_r2ogs6_mesh
(
mesh_ref
)
}
new_r2ogs6_mesh
<-
function
(
mesh_ref
){
assertthat
::
assert_that
(
assertthat
::
is.string
(
mesh_ref
))
structure
(
list
(
mesh_ref
=
mesh_ref
),
class
=
"r2ogs6_mesh"
)
}
#'as_node.r2ogs6_curve
#'@description Implementation of generic function as_node for S3 class r2ogs6_mesh
#'@param x A r2ogs6_mesh class object
as_node.r2ogs6_mesh
<-
function
(
x
){
node
<-
list
(
mesh
=
structure
(
list
(
x
$
mesh_ref
)))
return
(
node
)
}
#'generate_structured_mesh
#'@description Wrapper function to call generateStructuredMesh.exe (VTK mesh generator).
#'For full documentation see https://www.opengeosys.org/docs/tools/meshing/structured-mesh-generation/
...
...
@@ -29,7 +59,7 @@ generate_structured_mesh = function(ogs6_obj, call_str) {
system
(
command
=
paste0
(
ogs6_obj
$
ogs_bin_path
,
"generateStructuredMesh.exe"
,
" -o "
,
mesh_output_file
,
" "
,
call_str
))
ogs6_obj
$
add_mesh
(
mesh_output_file_name
)
ogs6_obj
$
add_mesh
(
r2ogs6_mesh
(
mesh_output_file_name
)
)
return
(
invisible
(
mesh_output_file_name
))
}
\ No newline at end of file
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